[openssl-users] issue with using openssl_seal/openssl_open calls

wim delvaux wim.delvaux at adaptiveplanet.com
Wed Apr 13 11:04:10 UTC 2016


Here it the code

http://pasted.co/5ab2f9cf

I encrypted a simple text file of 23 bytes which yields a binary file of 32
bytes (does that sound OK ?)

The problem is that i get the following error while decrypting things

140350823843504:error:0406506C:rsa routines:RSA_EAY_PRIVATE_DECRYPT:data
greater than mod len:rsa_eay.c:518:

happens on the openinit

Keys seem ok

$ cat priv
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIZEIWKYNmNVYCAggA
--snip--
3pybWIfq8MjxXMAsCPoW4OIA2MSSD+q5iqhAVJXo9GyiQkwOzRKkoYbUgOTWbncV
j2I=
-----END ENCRYPTED PRIVATE KEY-----
u19809 at gcv ~/projects/AP/Touch-n-Go/NFC Reader Service/RaspberryPI
$ cat pub
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Ysq2lWawes7Be6FReHe
--snip--
m+o5CS9QYXDIy8U1HduHMeaFz2QNYAUH6mHRFuGdPgiQ4L6/DXwaQ78lknHlrP4M
WQIDAQAB
-----END PUBLIC KEY-----

Help !

thx

W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160413/d287dce3/attachment.html>


More information about the openssl-users mailing list