I'm having trouble using the X25519 algorithm with the SE050C.
I've used the example keys from the SE050 APDU Specification (AN 12413), see image.
According to the given example and the OpenSSL test (in attachments), the shared secret should be:
4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742 (HEX)
When I try to derive the shared secret on the SE050C (development kit), I get the wrong key or the operation fails.
I've used 2 derive functions:
Does someone know how to correctly use the X25519 function or can anybody explain what I'm doing wrong? Help is very appreciated.
I've attached my code and the corresponding output. The code is very similar to the SDK example "ex_sss_ecdh".
I am using the latest version of SE050-PLUG-TRUST-MW (version 2.12).