RE: Error Encrytping Symmetric key with RSA Public Key

2008-09-30 Thread Bill Colvin
The answer is in: data too large for key size According to Secure Programming Cookbook, when using RSA PKCS #1 v1.5 padding you can only encrypt messages up to 11 bytes smaller than the modulus size in bytes. If you are using RSA-1024, then that is (1024/8)-11=117 bytes. Bill -Original

Re: Error Encrytping Symmetric key with RSA Public Key

2008-09-30 Thread William Estrada
Bill, You are 100% right. I increased my buffer from 1024 to 1115 and it works fine now. I guess I should RTFM more? Thanks. Bill Colvin wrote: The answer is in: data too large for key size According to Secure Programming Cookbook, when using RSA PKCS #1 v1.5 padding you can only