-
Notifications
You must be signed in to change notification settings - Fork 176
Open
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 ?
- .. ?
Metadata
Metadata
Assignees
Labels
No labels