How to create a shared secret with DH #2970
-
I'm trying to generate a shared secret between two elliptic curve key pairs and I can't get it to work. The secrets generated are always different. It doesn't work for me either using pkcs11-tool or in my Go code. This is what I'm doing on the command line with pkcs11-tool:
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You cannot use the
|
Beta Was this translation helpful? Give feedback.
-
Hi popovec, this not change the result. By running this code:
I get
There is no difference by using -I or --label, and 'shared' secrets are not the same for Alice and Bob |
Beta Was this translation helpful? Give feedback.
-
this is my test script:
derived keys are the same.
|
Beta Was this translation helpful? Give feedback.
You cannot use the
--label
switch, you must use the--id
switch: