srp: `no_alloc` support
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 124
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
The srp crate was recently migrated to crypto-bigint in #229.
crypto-bigint supports rich stack-allocated types which should work fine with the fix-sized groups in SRP, which we already model as separate types per-group.
The main problem right now is although crypto-bigint has a generic modpow implementation as of RustCrypto/crypto-bigint#988, we haven't actually wired that up for stack-allocated Montgomery form types like MontyForm and ConstMontyForm.
Once that upstream work happens in crypto-bigint we can consider switching over to stack-allocated integers wholesale, e.g. we could represent group parameters as ConstMontyParams and store g in ConstMontyForm, which would eliminate the runtime Montgomery parameter computation that happens when you create srp::Client or srp::Server today.
(sidebar: we could potentially even do that today actually, then convert to BoxedMontyParams when the client or server are initialized)
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 at srp::Client and srp::Server initialization and trace the runtime Montgomery parameter computation alongside crypto-bigint's MontyForm and ConstMontyForm support. Check the upstream generic modpow work first; done means SRP can use stack-allocated Montgomery types for its fixed-size groups without allocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100