Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
b202da0 to
5f83dac
Compare
CodSpeed Performance ReportMerging #117 will not alter performanceComparing Summary
|
No reason for this to consume the object.
Smoke test it with parsing of PKCS#8 v2 ED25519 key
There was a problem hiding this comment.
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
Typetrait to support tag-parameterized parsing/encoding viaparse_with_tagandencode_with_tagmethods - Renamed
ContextConstructedtoContextwith anEXPLICITboolean parameter to handle both explicit and implicit tagging - Updated
pkcs8module to wrap PKCS#8 operations in aKeytype 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.
This is working towards ed25519 support, and therefore landing #74