gold icon indicating copy to clipboard operation
gold copied to clipboard

strings more than 245 characters cant be signed

Open melvincarvalho opened this issue 9 years ago • 1 comments

A typical RSA key 2048 bit cannot sign the nonces returned using WebID + RSA

PKCS1v15 uses 11 bytes padding and so can have a max message size of 256 - 11 = 245 bytes

Typically the host + nonce string to sign is of length greater than this.

Would it be possible to use a shorter nonce?

openssl rsautl -sign -in tmp -inkey id_rsa.pem -out sig 
RSA operation error
140315110823584:error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too large for key size:rsa_pk1.c:73:

melvincarvalho avatar Aug 02 '15 13:08 melvincarvalho

@melvincarvalho - is this a WebID+RSA spec issue? Or an issue with the particular implementation on Gold? (If it's a spec issue, I want to make sure we also open it on solid/solid, so it doesn't get lost)

dmitrizagidulin avatar Jan 22 '16 16:01 dmitrizagidulin