Which COSE_Key values must an mdoc verifier reject?

COSE_Key rejects private key material and unsupported curvesISO/IEC 18013-5 §9.1.2MUSTRoles: issuer, wallet, verifier

Requirement as recorded in the ProtocolSoup registry

Public COSE_Key processing rejects private key material and unsupported curves.

Read §9.1.2 in ISO/IEC 18013-5

Self-test verdict

PassCommit 00bac3fEvaluated

This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.

Captured from production

Captured Commit 00bac3f

Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.

Passing exchange

Accepted, as requiredConformance client

The conformance client obtains an mDL from the issuer through the Pre-Authorized Code Flow, with a jwt proof of its own P-256 key, and fetches the request object of a direct_post.jwt request for that mDL from the verifier's request_uri. It builds a DeviceResponse itself, disclosing family_name and given_name and signing device authentication over the OpenID4VPHandover SessionTranscript of OpenID4VP 1.0 Appendix B.2.6.1, encrypts it as vp_token to the verifier's response key and POSTs it to /oid4vp/response, then reads the verifier's decision from /oid4vp/result. The issuer bound the conformance client's key into the MSO as an EC2 P-256 COSE_Key without the private scalar d, so the verifier must read it as the device key, verify the deviceSignature with it and allow the presentation.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.GET https://protocolsoup.com/oid4vp/request/Wtdo__Wz0RuBllDU27_Yne8q200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oid4vp/request/Wtdo__Wz0RuBllDU27_Yne8q HTTP/2.0
    Accept: application/oauth-authz-req+jwt
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 200 OK
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba1de5d053cdb-MSP
    Content-Type: application/oauth-authz-req+jwt
    Date: Sun, 06 Dec 2026 13:28:11 GMT
    Fly-Request-Id: 01M95RMSR4115TJTW92M1CBCX8-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=tCCRHL83Khq10hPnZs5%2BicCuiK0rDMXLJI3CRnSwGhgjV1CG1h2tzJKmtpHjzQvSPiIzFR5PlOBi1R99LEtD7s%2Bq8Ak1IE5Gpm4CmBEOJK3b3Vt3nrrUp8K2zJ1SXKKCpks%3D"}]}
    Server: cloudflare
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoib2F1dGgtYXV0aHotcmVxK2p3dCJ9.eyJhdWQiOiJodHRwczovL3NlbGYtaXNzdWVkLm1lL3YyIiwiY2xpZW50X2lkIjoicmVkaXJlY3RfdXJpOmh0dHBzOi8vcHJvdG9jb2xzb3VwLmNvbS9vaWQ0dnAvcmVzcG9uc2UiLCJjbGllbnRfbWV0YWRhdGEiOnsiZW5jcnlwdGVkX3Jlc3BvbnNlX2VuY192YWx1ZXNfc3VwcG9ydGVkIjpbIkExMjhHQ00iXSwiandrcyI6eyJrZXlzIjpbeyJhbGciOiJFQ0RILUVTIiwiY3J2IjoiUC0yNTYiLCJraWQiOiIxR0pDTTRMSyIsImt0eSI6IkVDIiwidXNlIjoiZW5jIiwieCI6ImE5NVVMMHBmM3U5ZEowdGpxSmR1bnp1LU4zUjRucXpNM3JLTXhuTUdIX0EiLCJ5IjoiWXZ6VTU2LXJDNlpQZWM1bjJxNTlZdkdpekVjNnljREthN0tYOXBHRXNTUSJ9XX0sInZwX2Zvcm1hdHNfc3VwcG9ydGVkIjp7ImRjK3NkLWp3dCI6eyJrYi1qd3RfYWxnX3ZhbHVlcyI6WyJFUzI1NiJdLCJzZC1qd3RfYWxnX3ZhbHV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NyVcHk5Lh2iFV_E7qMKquijkeVyDwoO6yRvahA7LbjeIotnr9fb6Ifu2PX_MTffzhwAfDCQ-ia8qxyQ_NVTISWoCPOSbPAgZ7hmeBdXVIHcX5e6MIL_9cnTPMfOoHpC9gkaxG55eGp-nApi8nJPNqNx-_80KHnhbdElyq13Fv6NDi-QzJF9yHjasgm9eXHLiYPZqGPTBxysOFN-u_urDEClXnsNeiPOAzxd0jFFcDks12-Q0os0oKiZM0C-npxGQRhClAMbQpO4QXeuHJmdmkaOq7zlfuFF57O_BnG8hg
  2. 2.POST https://protocolsoup.com/oid4vp/response200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oid4vp/response HTTP/2.0
    Content-Length: 3719
    Content-Type: application/x-www-form-urlencoded
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    response=eyJhbGciOiJFQ0RILUVTIiwiZW5jIjoiQTEyOEdDTSIsImVwayI6eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6Im55VC14TVVoMmVFY0FjNFJleFJSRElzWmh5ckJMY2V5YlRUQ0VaVXl5SEUiLCJ5IjoibTYyZmJRM1V0amgtSGZhbEF5SWFqRm9wMEEwemZBQ081VFlXUUZ4N2hpSSJ9LCJraWQiOiIxR0pDTTRMSyJ9..M0v0WHfgy19dUNqc.n64kFcM-C8ky49nX72Fv82S5aKUWQl7DLWl5iCiSGvlCYgJ0ivs5eKYiRitRhMHuYrTKus3ohaG3li-rOsxqBa3gc-FcLFrwrVMrTaIlmAVqYc7cXlD2yrJ6YIPg3NHy4hpJDhJUX9r3qLEJ97RmPe3MAPlJqhiV3qsQ_Fg3gNokRBS9StC3RdAJk1-HR9s8w5Jn0jQlQu4VCJyZl1DXUkwpy1RRQ2k4jXiXqmI0JRooxguvXDJ6r_W6tVhc4lVks1KjP29iVbqLBspIenDIQ34UrkzHjVdgexBkNEt31D0JMkYoUECfsfx4La4wCdWggErVwdNUovtZqQL6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gHXIHXj3--HvHfiyMP11T9hAPQoFhd7lDIO5olNvK8uyrCRwdaE_Vtfk9R8tqPrirGMx3mg9d3bmxiNNzwGI424ykAtmMWV4u2S_bH8zoAkLfl5qlTQyl0DA6_bg5SlaAx3atnMOBIRC1M_YODREE3uzdpvrwPpitBpGSd1GyXMEjVpJ7CWagsBDjgi95AMJk-ARySBprt7-q6pBlACWGwjH7Ka11RlrLFiskXRihnZ2ZyIWPST_uTFeeAnIb_tYeUSTyazRqvKPLvUsFSoGYbB1QaMlqL_7r_0MzZMLxHTRdcj7GIa2ehXHgsTxAjtahnN0m3JePsQe_TPJ_dur2_Qkpc733I-88WHBl2N4DqUor43GYJAPDr1m0NAIhehQUIOIOQtReeN0m3mAV0jZz4DbRv0Ym8oYcpXdJRNS5_6VGh6EzKS_CaSqeJH6YvMAaSZaC2HsKUeC9zVpHD7KKU772c5RE-aIjw-e6lvgvyuKmgWvxHK1seufHdT_hWY6MpDZPSanCZu5rIU_dp_a6LdHVrGQ5i6osbW-7m3BGvNZYiWNPJ3t4K71KGnYUagN6MkE3Zj6dQoxB3ZpQPs8pTfH1XLRs862aCfLtGhhAe7h84Pp27QJf_tb1kCgW3cfesAbpc3tukE8by2Jgn2hewoG1c-i-2M1XmxjfOj0fn5l0vUMWUuuABNNPkMlTgIA8dEVnPVfcUVYp_VKtFAO4RkEDWYGD90SIf9fAVsuPgaqDQFsKKOq3vw_vsJeMdpGuqZwpxiku2kWrYtQTRnkDeDHYQTh-QNyVK8i4gupTk8wSKFKPdzz4Lm8iAuZekMVFI4oEmyM98xdNJPPfkim4m_M7RlF6PBQobGbp4NtlY3_OETUkQAvo2ofFo03cJ1UJ5tA7oeujZjrlJhGtOd67J.ab3_tiBC94r68Uvi3SNP2g

    Response

    HTTP/2.0 200 OK
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba1e4aa073cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:28:12 GMT
    Fly-Request-Id: 01M95RMTQDFZYKEKVA9T6MJJ1H-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=iDNNrW2AMbRF5VVgZ3NLMXUdeYQXRfEW68MDpL4SlgM0G%2BGMPLm0QDtaWgBZ6%2Fn%2F3esvy%2BL1Kce%2FZWxLlyLxMrQ7m2xx86O1ZrOzbXCbKh7u1aj2poG%2BjP8O50Yi0Q3Osq4%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=215
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {}
    
  3. 3.GET https://protocolsoup.com/oid4vp/result/Wtdo__Wz0RuBllDU27_Yne8q200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oid4vp/result/Wtdo__Wz0RuBllDU27_Yne8q HTTP/2.0
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 200 OK
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba1ead8543cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:28:13 GMT
    Fly-Request-Id: 01M95RMVPMKSM1WYM8B555C7B3-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=WNfYGr78EZqddExEGFPAzDRu10jFTan2at24N9kOw%2Bdx62vQlCKOXFmIdryBrI2r%2FfnvrvLWjt16mmLjf%2FX7iLr0VsCfnxrpBpjIKR4Z6ZPUNrhSs3f1g6FKh7ywpxrXA7k%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=205
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"request_id":"Wtdo__Wz0RuBllDU27_Yne8q","result":{"nonce_validated":true,"audience_validated":true,"expiry_validated":true,"holder_binding_verified":true,"credential_evidence":{"format":"mso_mdoc","doctype":"org.iso.18013.5.1.mDL","required_claim_paths":["org.iso.18013.5.1/family_name","org.iso.18013.5.1/given_name"],"disclosed_claims":{"org.iso.18013.5.1":{"family_name":"Johnson","given_name":"Alice"}},"full_claims":{"org.iso.18013.5.1":{"family_name":"Johnson","given_name":"Alice"}}},"credential_evidence_set":[{"format":"mso_mdoc","doctype":"org.iso.18013.5.1.mDL","required_claim_paths":["org.iso.18013.5.1/family_name","org.iso.18013.5.1/given_name"],"disclosed_claims":{"org.iso.18013.5.1":{"family_name":"Johnson","given_name":"Alice"}},"full_claims":{"org.iso.18013.5.1":{"family_name":"Johnson","given_name":"Alice"}}}],"policy":{"allowed":true,"code":"allowed","message":"Presentation accepted","evaluated_at":"2026-12-06T13:28:12.381373601Z"}},"status":"completed"}
    

Failing exchange

Not captured: The deviceKey sits inside the issuer-signed MSO, the issuer binds only the P-256 public key from the proof, and the verifier checks the IssuerAuth signature before it reads the deviceKey, so no presentation can bring a deviceKey with private material or another curve to that check.

Run it live

Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.

Open the flow in Looking Glass

Tests

Implementation

Explainer

What this requires

ISO/IEC 18013-5 is not openly published, so this page quotes only the registry statement and describes ProtocolSoup's behaviour. The COSE_Key structure itself is defined in RFC 9052 Section 7; in an mdoc it carries the device key inside the MSO (deviceKeyInfo.deviceKey). When ProtocolSoup reads a COSE_Key as a public key, the key must be kty EC2 (2) with crv P-256 (1), must not contain label -4 (d, the private scalar), and must have 32-byte x and y coordinates that form a point on the P-256 curve.

Why it exists

This is ProtocolSoup's explanation of the consequence, not the standard's stated rationale. The deviceKey is what device authentication is verified against. If the issuer-signed MSO carries d, the private key has been handed to every party that receives the credential, and a valid device signature no longer shows that the holder's device produced it. A key on a curve the verifier does not implement cannot be checked at all, so accepting it would mean accepting a device signature that was never verified.

What non-compliance looks like

An issuer serialises the holder's full key pair into deviceKey, and a verifier that ignores unknown labels accepts it. Or a verifier given crv 2 (P-384) coordinates passes them to a P-256 routine, or fails open when parsing does not succeed.

How ProtocolSoup tests it

cose.COSEKeyToECPublicKey checks kty and crv first, then fails with "public COSE_Key must not contain private scalar d (label -4)" if label -4 is present, then checks the coordinate lengths and parses the point with ecdsa.ParseUncompressedPublicKey. It is used by MSO validation, by mdoc device-authentication verification, and by the wallet harness when it checks that the MSO binds its own key.

TestCOSEKeyToECPublicKeyRejectsPrivateMaterial generates a P-256 key, encodes it with ECPrivateKeyToCOSEKey so that it includes d, and asserts that COSEKeyToECPublicKey returns an error. The listed test does not cover the curve half of the statement: no listed test passes a COSE_Key with a crv other than 1 to COSEKeyToECPublicKey.

Related requirements

All ISO/IEC 18013-5 requirements · OID4VCI protocol page