`trait ValidatedRsaPrivateComponents` over `struct RsaPrivateKey`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cryptography
Research direction
Start by reviewing the current RsaPrivateKey representation and the no-alloc work referenced in pull request #636. Determine whether a ValidatedRsaPrivateComponents trait can replace the existing struct while supporting borrowed PKCS#8 data and the proposed variants. Done would require a settled design and explicit scope, which this issue does not currently define.
Written by the indexing model from the issue text.
Description
The current RsaPrivateKey is just a validated construct essentially.
Are there any reasons on
a) why it can't be just expressed as a trait benefiting no-alloc impl ? e.g. why do we need hold copies ?
b) why that can't be handed over to end-user e.g. hazmat unchecked or validating PKCS#8 wrapper ?
Given no-alloc will require memory efficient representation for it
type PKCS8Rsa impl VerifiedRsaPrivateKey
type [..]: Unsigned // Can be optimised across exp & modulus over largest variant of say just one generic `U`
..
Pros:
- hazmat End-users can provide unchecked / checked construct as-is without specialised API surface
- Generalize impls around that in no-alloc and alloc
- Could provide conditional for Multi Prime (MP-RSA)
- Could provide conditional for precomputed
- Optimised memory pressure given usage-scenario/s
- Direct PKCS#8 (or other containers) borrowed layout into validated type
- Associated types can be optimized for it's intended use in algorithms
Cons:
- Complexity ?
- Harder ?
- .. ?
- Dominant language
- Rust
- Stars
- 673
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
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.
More from RustCrypto/RSA
-
Bump MSRV to 1.89 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RustCrypto/RSA#707 · 2 comments · 1 reaction ·
-
Difficulty 3/5 Half a day Newbie friendliness 74/100
RustCrypto/RSA#703 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
RustCrypto/RSA#686 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
RustCrypto/RSA#647 · 9 comments · 1 reaction ·
-
broken rust docs Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
RustCrypto/RSA#641 · 3 reactions ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·