How does an OID4VCI issuer process an encrypted Credential Request?
Credential request encryption with advertised algorithmsOID4VCI 1.0 §8.3MUSTRoles: issuer
Requirement as recorded in the ProtocolSoup registry
Advertised Credential Request Encryption is implemented with the advertised algorithms and decrypts to the same validated Credential Request contract.
Read §8.3 in OID4VCI 1.0Self-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 encrypts a Credential Request to the key the issuer advertises in credential_request_encryption.jwks, using that key's alg and kid and the first advertised enc value, and posts the JWE as application/jwt to /oid4vci/credential with a bearer access token from a pre-authorized code. The encrypted request carries one jwt proof over a fresh c_nonce.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oid4vci/credential200 OK
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oid4vci/credential HTTP/2.0 Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2lkNHZjaSIsImNyZWRlbnRpYWxfY29uZmlndXJhdGlvbl9pZHMiOlsiVW5pdmVyc2l0eURlZ3JlZUNyZWRlbnRpYWxTREpXVCJdLCJleHAiOjE3OTY1NjM0MDksImlhdCI6MTc5NjU2MzEwOSwiaXNzIjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29pZDR2Y2kiLCJqdGkiOiJqdGktY2U2ZDA4OWI5ZmVhY2M4OCIsIm5iZiI6MTc5NjU2MzEwOSwib2ZmZXJfaWQiOiJLWXprYjBZUTZwblhDZDJNZ2x2RUs2VnMiLCJzY29wZSI6InZjOmlzc3VlIiwic3ViIjoid2FsbGV0OktZemtiMFlRNnBuWENkMk1nbHZFSzZWcyJ9.OxeQmFfJQzDXU7e0fsGAvyTw-5Mw2kbXeF5_qFf3FGiXzrFf1snn7jO8c7rMMid7w-3DEsH5fBFAyEpmvDPKfGfoS7IWc76VjToajQ8l-5tF9P4uJuTPyC30rri32WThKI9POWP6zvHgvD9lsQEpYE-7jnjjBg6SYLNome47RcdAaoVNpEExczdspLSSh630U_AJmLxqSUA2v6tfcoW2-UdHwrW_ZKyqCVoQUZwjnTNTPZcATKazyYD_V2UukyygT-jzFhr-ToxBL0-1BDhDCtktqRDi3DiF3k6gBBh8CYiEqx00QHQt0khU8qCKbAQ1bziEX6QmNyZfPKu6PmnoHg Content-Length: 1057 Content-Type: application/jwt Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1 eyJhbGciOiJFQ0RILUVTIiwiZW5jIjoiQTEyOEdDTSIsImVwayI6eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6ImR6LW9QVGVyRlYzTlhCRjF4STdyOEdFcUxJdU5mYXVZRl9hbzdLUi1YVzQiLCJ5IjoiNkY1LTlsc3BXTTZWZERYWFRTRnUtR0hlSjZLb2NoemlSZWU4ZjVzREcwOCJ9LCJraWQiOiJvaWQ0dmNpLWNyZWRlbnRpYWwtcmVxdWVzdC1lbmNyeXB0aW9uIiwidHlwIjoiSldUIn0..ZmjhYcw0jQ-IKEBW.NGTS5jf2nph6xdkI2UuAPVyzLMgCzz_6m2lWGQ5tiY58VFW_mQboUHv-yP0F_vbMcMqR22o_Jfz0Y4dJst8S7otbcsuKbgz06hPkcJ_HYbWGpk9TcTU27XLHKLpygLIUBdIt26FG9oJdzUMgA4aUnMZiTHWw1bivpKjAPWpR1IZCI6rhdyBc2poZq1bkCszAtoomB0ssB_YyLWFUpuPSVZIrePu3WbuoTwB0I1pkSWcneqGzBr4BrEgbhznsWOrAKY8Bbc0E9EXvosxuZUbfFnS6IbAQYS2EbeffmCGL7xZH0zQtIEAvrQG8uqQpuj435FJZo928oYZGe-IAuELwU87R7d6XUnuXZFGu-U5UUnWWZVwK2ygNWn84SHFu2sDokh5gn7NqI3mpxQqsIIfdSu0ryGMYdFCi3IjZcJdNQxOs7ac1LL776Rb6aSdgcYBEu1HnJ2J9p4FHnwp5-0XIsDmmIjbA9gefPsZdwRnein_OxWgr4jIePAAxS1FxefsyBy1xx1ZDZ-wQtMX5cZ6CEuZQexATTmUjOXV4hAUytPxvSs2lGBD29cfkP-wbbWS7RTYIZ1LEVQseEOOry7xiT0ZDAcUdLK0mYYRh7NfjosjwJ5zZXMWn1MTB3u4obkpHuPWWVI-cqJ3Y4WTs7k_GIedZM0hCfTq9QTZs12INNSHIzoYTexOLpkEFoz81iMgEYor2z9Kcpev7.Goid1BkGD0q3feuu4oHc4Q
Response
HTTP/2.0 200 OK Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65b93b56be11425-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:18:31 GMT Fly-Request-Id: 01M95R33BMZF69SC2C9PERK8AZ-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=mA3%2Bb3N7lIzsd4IrJlYe65oSq7RkrHN%2FG8G1SHLjbNETi2tL7Gp8p7YFH%2FyRbgEvjqJrRoB9zR8nqYcypeZFhQPxiMqmflwXpgv5BL9FzWANxwMB%2BOv%2F0ecCRba0zuULAb4%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=20,cfOrigin;dur=214 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 {"credentials":[{"credential":"eyJhbGciOiJFUzI1NiIsImtpZCI6Ik5KMER1S0x2M0VsU0tCTWpKMEpkOXdZRkZn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SzdMWmVGd3JiYVJRIiwiZGVncmVlIiwiQmFjaGVsb3Igb2YgRW5naW5lZXJpbmciXQ~WyJpQ2JQZGwxcmZkU3dPUFI5d3M1T3hBIiwiZGVwYXJ0bWVudCIsIkVuZ2luZWVyaW5nIl0~WyJGUDBHaUpmQlhSZGExV0cxem0tUXhBIiwiZmFtaWx5X25hbWUiLCJKb2huc29uIl0~WyJaendnaWdPYjlTWjdabmhNcjlTV19BIiwiZ2l2ZW5fbmFtZSIsIkFsaWNlIl0~WyJRSl90YW5YRlpDVE81M2d1NlNxV1hRIiwiZ3JhZHVhdGlvbl95ZWFyIiwyMDE4XQ~"}],"notification_id":"qkZvu6Qg4rNFM3axf3KrnivWgIlNz1pn"}
Failing exchange
Rejected, as requiredConformance client
The conformance client sends the same encrypted Credential Request, but its jwt proof carries a c_nonce the issuer never issued. Once decrypted, the request has to pass the same proof checks as an application/json request.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oid4vci/credential400 Bad Request
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oid4vci/credential HTTP/2.0 Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2lkNHZjaSIsImNyZWRlbnRpYWxfY29uZmlndXJhdGlvbl9pZHMiOlsiVW5pdmVyc2l0eURlZ3JlZUNyZWRlbnRpYWxTREpXVCJdLCJleHAiOjE3OTY1NjM0MTQsImlhdCI6MTc5NjU2MzExNCwiaXNzIjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29pZDR2Y2kiLCJqdGkiOiJqdGktMWUzNGRiZjNhMTExMDAwYSIsIm5iZiI6MTc5NjU2MzExNCwib2ZmZXJfaWQiOiJhU2JFYS1ieG9oMXZaREI0WVRFNlY0NVciLCJzY29wZSI6In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au1nXL9lY8zsGAy-d5kSU4PM1OQSgRF3SGCXLvLz1FMcIajmaPSlhT4cJTl4o_2da1TUFSkglFmegd_Oy0sRup-WPHP98Rhl57Og9QmbSnYsTfxYACkpx26pQX8sUDUK14GR4VA_fbObNYy9VI7qwL68lY6RIbfJbLItaHMyxWwc0_uGjUwABQm8-JS57d85Ewh2wEvod86S-aiW5O7YBACOXXwZH7iVe_VwdSwFEmzcsGI7hsZ7zheNzP-FFrfusSZgqgGRc3T0Qsvw4hXFZooirSrgaMImi7aNvqvb6lrWez6QgHiP9NTf9u19z335YwCcxanHNNSdlH_4IS2IYPIpaqbrveKaVRIEahAnziWxOXz2NvQ6Qw305JCOw8dGxOSidSFTGdXUdbnP8E9sVeCyn88n9_gMTnXXZfhAIKnQfpIeK2wf3xBRVqtbBcJkx4xF8-nDuA.cdJeZsa8y8y4MvBk_zt9yQ
Response
HTTP/2.0 400 Bad Request Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65b93d4985c1425-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:18:36 GMT Fly-Request-Id: 01M95R3880PGHRV08MWW2TB3DM-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=lU1CAGFtNYKe4MZDwWvAv52CnG%2FopXrvwV4AAKQOYNttgDZtgWRUQ9xuyTT2F0aqs9g1mzd213yER9Alsq9UJVfhHAUnC2dG0%2B2HYc%2FUaF%2FkDrzHNFwBvEU8durCu8xL7KY%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=23,cfOrigin;dur=204 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 {"error":"invalid_nonce","error_description":"c_nonce is unknown, expired, or already consumed"}
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 GlassTests
- TestCredentialRequestEncryptionRoundTrip
./internal/protocols/oid4vci
Pass - TestCredentialRequestEncryptionKeyIsDedicated
./internal/protocols/oid4vci
Pass
Implementation
Explainer
What this requires
An issuer that publishes credential_request_encryption in its metadata takes on an obligation. That object holds a jwks in which "Each JWK in the set MUST have a kid (Key ID) parameter that uniquely identifies the key", plus enc_values_supported and encryption_required (Section 12.2.4). The issuer has to accept requests encrypted under those parameters. Section 10 fixes the encoding: "The contents of the message MUST be encoded as a JWT as described in [RFC7519]. The media type MUST be set to application/jwt."
Once decrypted, the request is a normal Credential Request. Every Section 8.2 rule applies to it as it would to an application/json body.
Why it exists
Section 13.11 frames encryption as protection for architectures where TLS ends before the component that handles the request. It warns that "In cases where the application-layer encryption begins and terminates in the same component as TLS, it provides no additional protection." Whatever the deployment, a decrypted request that skips validation is worse than no encryption. Every check the JSON path applies has to apply after decryption too.
What non-compliance looks like
An issuer advertises a key or an enc value its decryptor does not accept, so every encrypted request fails. Or the encrypted path has its own parser that skips the duplicate-member, proof or credential_identifier checks, so encryption becomes a way around validation.
How ProtocolSoup tests it
credentialRequestEncryptionMetadata in credential_request_encryption.go publishes one P-256 JWK with kid oid4vci-credential-request-encryption, alg ECDH-ES and use enc. It sets enc_values_supported to A128GCM and A256GCM and encryption_required to false, and lists no zip_values_supported. decodeJSONOrEncryptedJWTRequest takes an application/jwt body of up to 64 KiB and parses it, allowing only ECDH-ES with those two enc values. It decrypts with the matching private key, which the issuer keeps for this purpose only: it is not the mdoc Document Signer key that signs IssuerAuth, signed metadata and status lists. With SHOWCASE_MDOC_PKI_PATH (or the data directory) set, the key is stored as credential_request_encryption_key.pem beside the mdoc PKI so a restart keeps the advertised key. The decoder then passes the plaintext to the same decodeRequestObject used for JSON. Any parse or decryption failure is HTTP 400 invalid_credential_request. The Deferred Credential Endpoint uses the same path. The decoder also reports whether the body arrived encrypted, and a plaintext request that carries credential_response_encryption is refused with invalid_encryption_parameters (CI-022).
TestCredentialRequestEncryptionKeyIsDedicated asserts that the key differs from the Document Signer key, that the metadata advertises exactly that key with use enc, that a request encrypted to the Document Signer key does not decrypt, and that a configured store returns the same key after a reload. TestCredentialRequestEncryptionRoundTrip builds a Credential Request with a fresh c_nonce and a proof and encrypts it with ECDH-ES and A128GCM. It posts the result as application/jwt and asserts HTTP 200 with an issued Credential. It takes the recipient public key straight from the plugin's dedicated request-encryption key instead of reading the advertised jwks. It does not try A256GCM or an unadvertised algorithm.