<div dir="ltr">Here it the code¬†<div><br></div><div><a href="http://pasted.co/5ab2f9cf">http://pasted.co/5ab2f9cf</a><br></div><div><br></div><div>I encrypted a simple text file of 23 bytes which yields a binary file of 32 bytes (does that sound OK ?)</div><div><br></div><div>The problem is that i get the following error while decrypting things</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">140350823843504:error:0406506C:rsa routines:RSA_EAY_PRIVATE_DECRYPT:data greater than mod len:rsa_eay.c:518:</span><br>
<br></span></div><div><span style="font-family:monospace">happens on the openinit</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Keys seem ok</span></div><div><span style="font-family:monospace"><br></span></div><div><font face="monospace">$ cat priv</font></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">-----BEGIN ENCRYPTED PRIVATE KEY-----
</span><br>MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIZEIWKYNmNVYCAggA
<br>--snip--</span></div><div><span style="font-family:monospace">3pybWIfq8MjxXMAsCPoW4OIA2MSSD+q5iqhAVJXo9GyiQkwOzRKkoYbUgOTWbncV
<br>j2I=
<br>-----END ENCRYPTED PRIVATE KEY-----
<br><span style="color:rgb(24,178,24)">u19809@gcv </span><span style="color:rgb(178,104,24)">~/projects/AP/Touch-n-Go/NFC Reader Service/RaspberryPI</span><span style="color:rgb(0,0,0)">
</span><br>$ cat pub ¬†<br>-----BEGIN PUBLIC KEY-----
<br>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Ysq2lWawes7Be6FReHe
<br></span><div><span style="font-family:monospace">--snip--</span></div><span style="font-family:monospace">m+o5CS9QYXDIy8U1HduHMeaFz2QNYAUH6mHRFuGdPgiQ4L6/DXwaQ78lknHlrP4M
<br>WQIDAQAB
<br>-----END PUBLIC KEY-----</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Help !</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">thx</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">W<br>
<br></span></div></div>