[Botan-devel] Problem with RSA Encryption/decryption

Ruben Quintero Lores rubenql at iti.upv.es
Tue Jul 5 13:55:51 EDT 2005


> These are not passing the right things in. sizeof(sessionkey) is not likely to
> be the same as sessionkey.length() -- if you remove those second parameters,
> then the objects will figure out the right size themselves. These versions of
> the calls trust you to get the size correct, which is probably why they are not
> working. On my system, sizeof(SymmetricKey) will return 16, which would mean,
> if you were using 128 bit session keys it would coincidentally work for
> encryption (as long as you don't change the size), but it will never work for
> decryption.

When I remove the second parameter (the size) I get the error:
terminate called after throwing an instance of 'Botan::Exception'
  what():  Botan: EME1: Input is too large

What do you think about??

Another question, please...how can I show or print the resulting
encrypted/desencrypted session key??




More information about the botan-devel mailing list