#nacl #no-std

no-std tweetnacl

A rust api for using tweetnacl

5 unstable releases

0.4.0 Aug 23, 2020
0.2.1 Sep 29, 2017
0.2.0 Sep 29, 2017
0.1.2 Jan 19, 2017
0.1.0 Mar 19, 2016

#1600 in Cryptography

Download history 5/week @ 2023-11-27 3/week @ 2023-12-11 18/week @ 2023-12-18 8/week @ 2024-01-22 7/week @ 2024-02-05 15/week @ 2024-02-12 28/week @ 2024-02-19 32/week @ 2024-02-26 21/week @ 2024-03-04

97 downloads per month
Used in 2 crates

MIT/Apache

32KB
1K SLoC

C 707 SLoC Rust 387 SLoC

sodalite

An implementation of tweetnacl in pure rust. Originally generated by manually translating tweetnacl.c into rust. Tested by verifying outputs match those of tweetnacl.

Todo

  • provide additional APIs:
  • rather than take bare mutable references, use wrapper types around the refs to capture the underlying type (ie: prevent mixing keys between primitives)
  • add a buffer and/or "set-only" abstraction to prevent unsafety wrt uninitialized values (also should allow some internal optimization).
  • sodiumoxide style API that returns values rather than taking mutable refs
  • Use namespacing to separate different APIs and backend impls
  • start testing against sodiumoxide as well
  • Provide some of the API improvements from libsodium that are missing nacl (disjoint signatures, not requiring special extra space in buffers)

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~175KB