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
Why the byte length of KeyAgreement.generateSecret() is 20
Why the byte length of KeyAgreement.generateSecret() is 20
Hello,
I write a applet to implement KeyAgreement recently. I create a 256 bits EC key, then call KeyAgreement.generateSecret(). In the end, the length of result is 20 bytes. Why? My EC key length is 256 bits, 32 bytes. Why my result length is 20 bytes?
I write a applet to implement KeyAgreement recently. I create a 256 bits EC key, then call KeyAgreement.generateSecret(). In the end, the length of result is 20 bytes. Why? My EC key length is 256 bits, 32 bytes. Why my result length is 20 bytes?
-
- Posts: 35
- Joined: Wed Jun 20, 2018 4:06 am
- Points :218
- Contact:
Re: Why the byte length of KeyAgreement.generateSecret() is 20
Because the function implements SHA_1 calculation in the last step.
Re: Why the byte length of KeyAgreement.generateSecret() is 20
But my sample card which installed other's applet return 32 bytes. I think there maybe something I don't know....
Re: Why the byte length of KeyAgreement.generateSecret() is 20
The sample applet maybe use ALG_EC_SVDP_DH_PLAIN.
Who is online
Users browsing this forum: No registered users and 73 guests