Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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) };
        }
Ejemplo n.º 3
0
 public ElGamalModifiedDecryptor(ElGamalModifiedKeyStruct p_struct)
     : base(p_struct)
 {
     o_block_size = o_ciphertext_blocksize;
 }
Ejemplo n.º 4
0
 public ElGamalModifiedEncryptor(ElGamalModifiedKeyStruct p_struct)
     : base(p_struct)
 {
     o_random = RandomNumberGenerator.Create();
 }