зеркало из https://github.com/mozilla/gecko-dev.git
6abadd577b
Differential Revision: https://phabricator.services.mozilla.com/D76092 |
||
---|---|---|
.. | ||
src | ||
.cargo-checksum.json | ||
Cargo.toml | ||
README.md |
README.md
nss
This crate provides various cryptographic routines backed by NSS.
The API is designed to operate at approximately the same level of abstraction as the
crypto.subtle
API, although the details are obviously
different given the different host language. It provides:
- Cryptographically secure pseudorandom number generation.
- Cryptographic digests and hkdf.
- AES encryption and decryption in various modes.
- Generation, import and export of elliptic-curve keys.
- ECDH key agreement.
- Constant-time string comparison.
Like the crypto.subtle
API, these primitives are quite low-level and involve some subtlety in order to use correctly.
Consumers should prefer the higher-level abstractions offered by the rc_crypto crate where possible.
These features are in turn built on even-lower-level bindings to the raw NSS API, provided by the nss_sys crate.