JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
Throw CryptoException when signing
Throw CryptoException when signing
When I used Signature to sign, it always threw CryptoException, reason value is 5. Does anyone have this experience? How can I solve this issue?
Thanks a lot.
Thanks a lot.
Re: Throw CryptoException when signing
Tell us the Signature algorithm and padding type you used.
Last edited by mabel on Fri Oct 28, 2016 4:33 am, edited 1 time in total.
Re: Throw CryptoException when signing
mabel wrote:Tell us the Signature algorithm and filler type you used.
Signature algorithm: ALG_RSA_SHA_512_PKCS1
RSA key length: 512bits
Re: Throw CryptoException when signing
The Signature data length that pkcs1 padding algorithm needs should be less than (64-11) bytes.
However, SHA512 Hash result is just 512, which doesnot satisfy with Signature data length requirement. So it will throw exception.
However, SHA512 Hash result is just 512, which doesnot satisfy with Signature data length requirement. So it will throw exception.
Re: Throw CryptoException when signing
Don't use RSA512 to do the computations. Use RSA1024 or RSA2048 instead. The computation speed of RSA1024 and RSA2048 is also very fast.
Re: Throw CryptoException when signing
Thanks for all the help. I got it.
Re: Throw CryptoException when signing
Just curious, which card are you using that will support Signature.ALG_RSA_SHA_512_PKCS1 ?
I am interested in getting one too.
I am interested in getting one too.
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Throw CryptoException when signing
tay00000 wrote:Just curious, which card are you using that will support Signature.ALG_RSA_SHA_512_PKCS1 ?
I am interested in getting one too.
My colleague gave it to me. I don't know the card model either. It's just a white blank card. Sorry.
Re: Throw CryptoException when signing
UNKNwYSHSA wrote:Same question.
My colleague gave it to me. I don't know the card model either. It's just a white blank card. Sorry.
Who is online
Users browsing this forum: No registered users and 35 guests