[Botan-devel] Errors

Jack Lloyd lloyd at randombit.net
Wed Jul 6 11:14:42 EDT 2005


Because a DH key created in such a way will produce a key that is 1024 bits (or
128 bytes) long. An RSA key cannot encrypt any value longer than the modulus,
and there is additional overhead for using the OAEP/EME1 encoding.  If you
wanted to encrypt that much data with the RSA key, you will have to use a
larger RSA key (1536 bits will do).

-Jack

On Wed, Jul 06, 2005 at 05:11:48PM +0200, Ruben Quintero Lores wrote:
> In the function to encrypt the symmetric key. When I try to call 
> 
> SecureVector<byte> enc_sym_key = rsa_enc->encrypt(sessionkey.bits_of());
> 
> whitout a second parameter or with sessionkey.length() I get the error
> 
> terminate called after throwing an instance of 'Botan::Exception'
>   what():  Botan: EME1: Input is too large
> 
> My private key is constructed from
> 
> aprivatekey=new DH_PrivateKey(get_dl_group("IETF-1024")); and the
> publickey is created from this privatekey.
> 
> and the session symmetric key is constructed calling the function
> aprivatekey->derive_key(apublickey)
> 
> What do you think is happening???
> 
> Thank a lot,
> 
> Ruben
> 
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel



More information about the botan-devel mailing list