mdoc / mDL 查看器
以十六进制、base64 或 base64url 格式粘贴 mdoc 出示数据——DeviceResponse、Document、IssuerSigned 数据或 OpenID4VP vp_token。添加 IACA 证书和会话的详细信息,即可完成端到端验证。
100% 本地运行——所有操作都在你的浏览器中完成,不会向任何服务器发送数据
来源:openwallet-foundation-labs/identity-common-ts 的测试向量(Apache-2.0):ISO/IEC 18013-5 附录 D 中的示例,以及两份真实钱包的出示数据,附带各自的颁发者证书和会话记录。检查时间按各自的签发日期设定。
信任
会话
设备认证会对会话记录签名,验证者根据自己所用的协议重建这份记录
A credential made of signed digests
An mdoc is the credential format of ISO/IEC 18013-5, first written for the mobile driving licence and now one of the two formats of the European Digital Identity Wallet (the other is SD-JWT VC). It is CBOR all the way down, and its idea is close to selective disclosure in SD-JWT: the issuer never signs the data elements themselves. For each element — family_name, birth_date, portrait, driving_privileges — it builds an IssuerSignedItem with a random salt, hashes it, and signs only the list of digests, the Mobile Security Object (MSO), with COSE_Sign1. The holder's wallet can then release any subset of the items; the verifier hashes what it received and finds each digest in the signed MSO.
What the inspector verifies
- Structure. A DeviceResponse (version, documents, status, documentErrors), or a single Document, IssuerSigned data or IssuerAuth; an OpenID4VP
vp_token— a JSON object whose value is the base64url DeviceResponse — is unwrapped first. - Every disclosed element against the MSO, with the digest algorithm the MSO names, over the IssuerSignedItem bytes exactly as received inside their tag-24 wrapper: re-encoding the CBOR would change the bytes and the digest. A changed value, an element whose digest ID is missing, an element of a namespace the MSO does not cover — each is an error. Digests the holder did not disclose are counted per namespace.
- The issuer signature on the MSO with the document signer certificate from its
x5chainheader, and the MSO's owndocTypeagainst the document's. - The certificate chain from the document signer to the IACA (Issuing Authority Certificate Authority) roots you trust — the country or state certificates published by issuing authorities, or collected in a VICAL list. Without a root you give, the chain is not judged.
- Validity:
signed,validFrom,validUntilandexpectedUpdateagainst the check time, as ISO dates without fractional seconds. - Device authentication. The MSO also carries the device key, held by the phone's secure hardware. In each presentation the device signs (or MACs) a
DeviceAuthenticationstructure that includes the session transcript — the context of this one exchange. A copied presentation therefore fails anywhere else.
The session transcript
The verifier does not receive the session transcript; it rebuilds it from the protocol it ran, which is why the inspector asks which protocol was used. Over OpenID4VP 1.0 with a response_uri, the handover hashes the client_id, the nonce, the thumbprint of the verifier's encryption key and the response_uri; over the browser's Digital Credentials API it binds the web origin of the verifier page instead; earlier drafts and ISO 18013-7 Annex B used other arrangements, and in-person ISO 18013-5 exchanges use device and reader engagement data, which you can paste as SessionTranscript bytes. Enter the same values the verifier used, and a valid device signature proves that this presentation was made for that exchange. When the device authenticated with a MAC, the session key comes from an ephemeral key agreement the inspector cannot see, and the report says so.
The examples are the Annex D DeviceResponse of ISO/IEC 18013-5 and two real wallet presentations collected by the OpenWallet Foundation's test suite: Google Wallet over the Digital Credentials API and the French mDL playground, each with its issuer certificate and session parameters. For the other credential format of the EU Digital Identity Wallet, read SD-JWT and SD-JWT VC: selective disclosure for EUDI wallets.