Example #1
0
        private BigInteger decryptU(BigInteger Krec, byte[] Ukrec)
        {
            blmat aes = new blmat(Ukrec);
            aes.acceptKeyStr(Krec.ToString());
            aes.generateRKeyList();
            aes.deCrypt();

            BigInteger U = new BigInteger(aes.retblmatstr(), 10);
            //Console.WriteLine("\nU': " + U);

            return U;
        }
Example #2
0
        private byte[] cryptU(BigInteger d, BigInteger Km)
        {
            String s = d.ToString();

            blmat aes = new blmat(s);
            aes.acceptKeyStr(Km.ToString());
            aes.generateRKeyList();
            aes.Crypt();

            byte[] Uk = aes.retblmatbyte();
            //Console.WriteLine("\nUk: " + Uk);

            return Uk;
        }