-
Notifications
You must be signed in to change notification settings - Fork 33
Description
This proposal is produced jointly with Peter Altmann, who discussed the topic with Christian Bormann for additional clarity. At Daniel's suggestion, we are opening this issue for broader discussion.
We propose amending the current text in SD-JWT, Section 4.3.2 by appending the following:
After the current paragraph:
If the Verifier requires Key Binding, the Verifier MUST ensure that
the key with which it validates the signature on the Key Binding JWT
is the key specified in the SD-JWT as the Holder's public key. For
example, if the SD-JWT contains acnfvalue with ajwkmember, the
Verifier would parse the provided JWK and use it to verify the Key
Binding JWT.
Add:
If the
algHeader Parameter is HMAC-based (i.e.,HS256,HS384, orHS512), the shared secret key MUST be derived as:
HMAC-key = HKDF(IKM, keylen, info, salt)Where:
HKDFis the HMAC-based Extract-and-Expand Key Derivation Function as detailed in RFC 5869,IKMis the output of the Diffie-Hellman key exchange between the public key in thecnfand the verifier private key,keylenis the output size of the selected HMAC algorithm (256, 384, or 512 bits),infois the ASCII string"SD_JWT_KB_" || alg(e.g.,"SD_JWT_KB_HS256"),saltis the nonce value.
Motivation
Note that this discussion is limited to algorithms for the key binding JWT. ECDSA will still be used to sign the issuer signed JWT.
When planning for EU Digital Identity Wallet implementation, we identified several strong requirements:
- The Wallet's private key MUST be managed by a server-based HSM.
- The HSM MUST expose functionality via the PKCS#11 API.
- Each attestation must have a distinct public key.
Distinct cnf key material is used to enable verifier-unlinkable presentations. We want to derive single-show keys from a HSM-protected root key, but cannot find a way to do so while satisfy the above requirements using ECDSA for the key binding JWT.
However, it is possible to meet these requirements using the MAC algorithms listed in RFC 7518 section 3.1.
The proposed HMAC signing approach is fully supported in mDoc, where the derivation of the HMAC key is specified in Section 9.1.3.5 of [ISO/IEC 18013-5]. The proposal here mirrors that design as RFC 7518 does not specify how the MAC key should be derived.
We understand the SD-JWT specification is in its final stages. However, this is a non-breaking and narrowly scoped change that promotes interoperability in HMAC-based deployments. We therefore think it is worth the effort of an update before publication. Furthermore, this addition is critical for anyone aiming to support SD-JWT with single-show binding keys, where HSM resources are accessed using PKCS#11. Without it, we may only be able to guarantee verifier-unlinkability for mDoc (ISO/IEC 18013).