Skip to content

srp: no_alloc support #248

@tarcieri

Description

@tarcieri

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions