Beispiel #1
0
        public ElGamalAbstractCipher(ElGamalKeyStruct p_key_struct)
        {
            o_key_struct = p_key_struct;

            o_plaintext_blocksize  = (p_key_struct.P.bitCount() - 1) / 8;
            o_ciphertext_blocksize = ((p_key_struct.P.bitCount() + 7) / 8) * 2;

            o_block_size = o_plaintext_blocksize;
        }
 public ElGamalManaged()
 {
     o_key_struct       = new ElGamalKeyStruct();
     o_key_struct.P     = new BigInteger(0);
     o_key_struct.G     = new BigInteger(0);
     o_key_struct.Y     = new BigInteger(0);
     o_key_struct.X     = new BigInteger(0);
     KeySizeValue       = 1024;
     LegalKeySizesValue = new KeySizes[] { new KeySizes(384, 1088, 8) };
 }
Beispiel #3
0
 public ElGamalDecryptor(ElGamalKeyStruct p_struct) : base(p_struct)
 {
     o_block_size = o_ciphertext_blocksize;
 }
 public ElGamalEncryptor(ElGamalKeyStruct p_struct) : base(p_struct)
 {
     o_random = new Random();
 }