RustCrypto / RustCrypto/formats
pkcs8: better `no_alloc` support for `DecodePrivateKey`/`EncodePrivateKey` traits
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 338
- Forks
- 188
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 15
Description
I am punting on these for the forthcoming v0.11 release, but the next time we do make breaking changes it would be nice to get them resolved:
- PEM decoding: currently the whole
pemfeature enablesalloc, but it would be nice to supportno_allocdecoding by way of theDecodePrivateKeytrait, especially as thedercrate is capable of on-the-fly PEM decoding - Encoding: currently the whole
EncodePrivateKeytrait is gated onalloc, but it would be nice to support ano_allocencoder for both DER and PEM that can write into a supplied buffer and return a slice
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DecodePrivateKey and EncodePrivateKey traits and the der crate's on-the-fly PEM decoding capability. Define how PEM decoding can avoid alloc and how DER and PEM encoding can write into a supplied buffer; done means both traits support the requested no_alloc paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100