• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..15-Mar-2021-

src/H15-Mar-2021-1,203969

.cargo-checksum.jsonH A D15-Mar-20211.2 KiB11

Cargo.tomlH A D15-Mar-2021352 2218

README.mdH A D15-Mar-20211.1 KiB2216

README.md

1## nss
2
3This crate provides various cryptographic routines backed by
4[NSS](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS).
5
6The API is designed to operate at approximately the same level of abstraction as the
7[`crypto.subtle`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) API, although the details are obviously
8different given the different host language.  It provides:
9
10* Cryptographically secure [pseudorandom number generation](./src/pk11/slot.rs).
11* Cryptographic [digests](./src/pk11/context.rs) and [hkdf](./src/pk11/sym_key.rs).
12* [AES encryption and decryption](./src/aes.rs) in various modes.
13* Generation, import and export of [elliptic-curve keys](./src/ec.rs).
14* ECDH [key agreement](./src/ecdh.rs).
15* Constant-time [string comparison](./src/secport.rs).
16
17Like the `crypto.subtle` API, these primitives are quite low-level and involve some subtlety in order to use correctly.
18Consumers should prefer the higher-level abstractions offered by the [rc_crypto](../) crate where possible.
19
20These features are in turn built on even-lower-level bindings to the raw NSS API, provided by the [nss_sys](./nss_sys)
21crate.
22