public ElGamalModifiedAbstractCipher(ElGamalModifiedKeyStruct p_key_struct) { o_key_struct = p_key_struct; o_plaintext_blocksize = p_key_struct.getPlaintextBlocksize(); o_ciphertext_blocksize = p_key_struct.getCiphertextBlocksize(); o_block_size = o_plaintext_blocksize; }
public ElGamalModifiedManaged() { // create the key struct and set all of the big integers to zero o_key_struct = new ElGamalModifiedKeyStruct { P = BigInteger.Zero, G = BigInteger.Zero, Y = BigInteger.Zero, X = BigInteger.Zero }; // set the default key size value KeySizeValue = 384; // set the default padding mode //Padding = ElGamalPaddingMode.BigIntegerPadding; // set the range of legal keys LegalKeySizesValue = new[] { new KeySizes(384, 1088, 8) }; }
public ElGamalModifiedDecryptor(ElGamalModifiedKeyStruct p_struct) : base(p_struct) { o_block_size = o_ciphertext_blocksize; }
public ElGamalModifiedEncryptor(ElGamalModifiedKeyStruct p_struct) : base(p_struct) { o_random = RandomNumberGenerator.Create(); }