Skip to content

Conversation

@Ryanmtate
Copy link
Collaborator

@Ryanmtate Ryanmtate commented Aug 25, 2025

This pull request introduces new functionality and refactors the codebase to support OpenID4VP and DC-API flows for mobile driver's license (mDL) credential presentation. The changes include new session management logic, cryptographic operations, and integration with external libraries for both DC-API Annex C and D flows. Additionally, the configuration system is updated to support certificate chains and keys required for secure communication.

DC-API and OpenID4VP Flows Implementation

  • Added support for DC-API Annex C and D flows, including session initiation, encryption/decryption, and response validation logic in core/src/annex_c.rs and core/src/annex_d.rs. These modules now handle session state, cryptographic handover, and response authentication for mDL credential presentation. [1] [2]

  • Introduced new session state types (InitiatedSessionState) and response data structures to manage the lifecycle of credential presentation sessions for both DC-API and OpenID4VP flows. [1] [2]

Cryptographic and External Library Integration

  • Integrated cryptographic libraries (hpke, p256, pkcs8, sha2, etc.) and external dependencies for COSE, CBOR, and X.509 operations, enabling secure key generation, signing, and certificate chain validation. These dependencies are reflected in core/Cargo.toml.

  • Added logic for generating and verifying cryptographic handover information and session transcripts using CBOR serialization and SHA-256 hashing, ensuring the integrity of credential presentation sessions. [1] [2]

OpenID4VP Client and Verifier Abstractions

  • Implemented new client and verifier abstractions (OID4VPClient, OID4VPVerifier) in core/src/client.rs, providing interfaces for building authorization requests, signing JWTs, and managing session storage for OpenID4VP flows.

Configuration System Refactor

  • Refactored the configuration system in core/src/config.rs to support loading certificate chains in PEM format and client keys, allowing for secure initialization of cryptographic clients and verifiers.

Dependency Management

  • Updated and added multiple dependencies in core/Cargo.toml, including cryptography, serialization, and HTTP libraries, and switched openid4vp and openid4vp-frontend to use specific git revisions for wasm compatibility.

@Ryanmtate Ryanmtate requested a review from theosirian August 26, 2025 00:00
@Ryanmtate Ryanmtate marked this pull request as draft August 26, 2025 00:00
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
@Ryanmtate Ryanmtate changed the title add npm package for dc-api wasm wrapper add npm package for dc api wasm bundle Sep 29, 2025
@Ryanmtate Ryanmtate marked this pull request as ready for review September 30, 2025 00:04
@Ryanmtate Ryanmtate requested a review from sbihel September 30, 2025 00:05
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
@Ryanmtate Ryanmtate requested a review from sbihel October 2, 2025 16:01
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
@Ryanmtate Ryanmtate merged commit 7321ef6 into main Oct 3, 2025
3 checks passed
@Ryanmtate Ryanmtate deleted the feat/npm-package branch October 3, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants