It's our great honour to announce the Industry’s First VHBR CCID reader - VHBR Dual interface smart card reader vR504. It is able to support the world’s fastest ePassports.

To celebrate the new product release, there is Special Discount for New Registered Members in our store.
- Get $20.00 OFF instantly for smart card reader vR504, R502 and bR301

Come to get the readers now!

Question about the ECDH

JavaCard Applet Development Related Questions and Answers.
iSmartcard
Posts: 2
Joined: Fri Jun 15, 2018 5:33 am
Points: 40
Contact:

Question about the ECDH

Postby iSmartcard » Sun Jul 08, 2018 3:13 am

Hello everyone, when I use the bouncycastle encryption library, I get a question about ECDH. With ECDH, the length of the value is 32 bytes and the length of the javacard is 20 bytes. What happened? Does anyone know why?

AlexLiu
Posts: 5
Joined: Thu Sep 22, 2016 4:52 am
Points: 84
Contact:

Re: Question about the ECDH

Postby AlexLiu » Mon Jul 09, 2018 5:43 am

32 bytes corresponding to ECC256, ECDH protocol based on ecc curve 256 bit,
20 bytes corresponding to ECC160, ECDH protocol based on ecc curve 160 bit

scplatform
Posts: 8
Joined: Wed Aug 31, 2016 9:55 pm
Points: 178
Contact:

Re: Question about the ECDH

Postby scplatform » Mon Jul 09, 2018 6:07 am

According the API specification of jc304 or above, the result will be hash with SHA1.
ALG_EC_SVDP_DH
public static final byte ALG_EC_SVDP_DH
Elliptic curve secret value derivation primitive, Diffie-Hellman version, as per [IEEE P1363].
Note:

This algorithm computes the SHA-1 message digest of the output of the derivation primitive to yield a 20 byte result.
See Also:
Constant Field Values

happy123654
Posts: 11
Joined: Wed Jun 20, 2018 4:06 am
Points: 70
Contact:

Re: Question about the ECDH

Postby happy123654 » Fri Jul 13, 2018 5:21 am

there will have SHA_1 calculation in the last step of ECDH and the result of SHA_1 is 20 bytes


Return to “Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer