Skip to content

Conversation

@ctz
Copy link
Owner

@ctz ctz commented Nov 15, 2025

This is working towards ed25519 support, and therefore landing #74

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (2ec88ae) to head (5a25682).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #117   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files         171      171           
  Lines       39074    39165   +91     
=======================================
+ Hits        38738    38830   +92     
+ Misses        336      335    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ctz ctz force-pushed the jbp-pkcs8-v2 branch 2 times, most recently from b202da0 to 5f83dac Compare November 15, 2025 15:18
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 15, 2025

CodSpeed Performance Report

Merging #117 will not alter performance

Comparing jbp-pkcs8-v2 (5a25682) with main (2ec88ae)

Summary

✅ 143 untouched

ctz added 3 commits November 15, 2025 19:58
No reason for this to consume the object.
Smoke test it with parsing of PKCS#8 v2 ED25519 key
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for PKCS#8 v2 (RFC 5958) private key encoding to enable ed25519 support. The changes refactor the ASN.1 parsing infrastructure to handle both explicit and implicit context-specific tagging, which is required for PKCS#8 v2's optional publicKey field.

Key changes:

  • Refactored ASN.1 Type trait to support tag-parameterized parsing/encoding via parse_with_tag and encode_with_tag methods
  • Renamed ContextConstructed to Context with an EXPLICIT boolean parameter to handle both explicit and implicit tagging
  • Updated pkcs8 module to wrap PKCS#8 operations in a Key type that validates version constraints

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
graviola/src/high/asn1.rs Core ASN.1 refactoring to support tag-parameterized parsing; adds Context type with explicit/implicit tagging support; updates all ASN.1 types to implement new Type trait methods
graviola/src/high/asn1/pkix.rs Renames PrivateKeyInfo to OneAsymmetricKey per RFC 5958; adds Pkcs8Version enum; marks EcPrivateKey context fields as EXPLICIT
graviola/src/high/pkcs8.rs Replaces free functions with Key wrapper type; adds version validation for v1/v2; provides construct/decode/encode methods
graviola/src/high/rsa.rs Updates RSA PKCS#8 encoding/decoding to use new pkcs8::Key API
graviola/src/high/ecdsa.rs Updates ECDSA PKCS#8 encoding/decoding to use new pkcs8::Key API; changes into_octets to as_octets
graviola/src/high/asn1/oid.rs Adds id_ed25519 OID definition (1.3.101.112)
graviola/src/high/asn1/testdata/ed25519-p8v2.bin Adds test data for ed25519 PKCS#8 v2 keys

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ctz ctz merged commit c827951 into main Nov 16, 2025
28 checks passed
@ctz ctz deleted the jbp-pkcs8-v2 branch November 16, 2025 09:00
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.

2 participants