PAKEs icon indicating copy to clipboard operation
PAKEs copied to clipboard

no_std?

Open fmckeogh opened this issue 6 years ago • 5 comments

I'd like to start working on optional no_std support, is there anything major preventing this, and if not, is it the sort of thing you would like to see merged?

fmckeogh avatar Feb 18 '19 16:02 fmckeogh

Both srp and spake2 depend on num-bigint which currently does not support no_std.

With stable alloc we could support no_std out-of-box, or alternatively I think with (stable) const generics we could migrate srp to fixed-sized stack-allocated big-integers (or num-bigint could add support for them), not sure about spake2 though.

cc @warner

newpavlov avatar Feb 18 '19 16:02 newpavlov

Ah okay, thank you! :)

fmckeogh avatar Feb 20 '19 09:02 fmckeogh

I just noticed that spake2 was only using num-bigint for the unit tests, so I demoted it to a dev-dependency. Maybe that'll help.

warner avatar Jul 18 '19 07:07 warner

Awesome :)

I'm still working on a heapless_bigint crate; I hope to make some more progress with making SRP no-std in the next few weeks, but I've just been pretty busy lately :/

fmckeogh avatar Jul 18 '19 07:07 fmckeogh

incidentally, PR #33 would increase at least the spake2 MSRV to rust-1.36, in which alloc is stable, which might help.

I know the curve25519-dalek crate that spake2 uses is a big fan of no_std, so I don't expect any problems from that dependency.

warner avatar Dec 06 '19 17:12 warner