linkeddata / gold

Linked Data server for Go
151 stars 35 forks source link

strings more than 245 characters cant be signed #51

Open melvincarvalho opened 9 years ago

melvincarvalho commented 9 years ago

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:
dmitrizagidulin commented 8 years ago

@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)