1 Commits
Author SHA1 Message Date
Sammy ETUR 450fd96381 piv: implement ECDH key agreement (tag 0x85)
Add tag 0x85 parsing and ECDH shared secret computation for P-256 and
P-384 curves using mbedtls_ecdh APIs. The peer's uncompressed public key
is read from tag 0x85, the card's private key is loaded, and the shared
secret is returned in tag 0x82 within a 0x7C dynamic authentication
template, per NIST SP 800-73-4.

Unsupported algorithms (e.g. X25519, RSA) return SW_INCORRECT_P1P2."
2026-03-03 02:53:58 +01:00