加解密库-NaCl
2023-09-15 17:24:49 阿炯

NaCl (发音 "salt") 是一个新的易用的网络安全软件库,用于网络通讯、加解密、签名等;主要目的是为开发高级加密工具提供支持。采用C语言开发编写并在公共领域下授权使用。

NaCl: Networking and Cryptography library.


NaCl is an abbreviation for Networking and Cryptography Library, a public domain, high-speed software library for network communication, encryption, decryption, signatures, etc.


NaCl由数学家兼程序员Daniel J.Bernstein创建,他以创建Qmail和Curve25519而闻名。核心团队还包括Tanja Lange和Peter Schwabe。根据该论文,于2008年创建NaCl的主要目标是“避免以前的密码库所遭受的各种类型的密码灾难”,并在2011年提供稳定的版本。

基本函数

Public-key cryptography
Signatures using Ed25519.
Key agreement using X25519.

Secret-key cryptography
Authenticated encryption using Salsa20-Poly1305.
Encryption using Salsa20 or AES.
Authentication using HMAC-SHA-512-256.
One-time authentication using Poly1305.

低级函数

Hashing using SHA-512 or SHA-256 or BLAKE2 using libsodium
String comparison.

密钥导出函数(only libsodium)
Password hashing using argon2

Reference implementation is written in C, often with several inline assembler. C++ and Python are handled as wrappers. NaCl has a variety of programming language bindings such as PHP, and forms the basis for Libsodium, a cross-platform cryptography library created in 2013 which is API compatible with NaCl.

派生方案

Libsodium - a portable, cross-compilable, installable, packageable, API-compatible version of NaCl.
dryoc - a pure-Rust implementation of libsodium/NaCl, with support for protected memory.
NaCl Pharo - a Pharo Smalltalk Extension.
TweetNaCl - a tiny C library, which fits in just 100 tweets (140 symbols each), but supports all NaCl functions.
NaCl for Tcl - a port to the Tcl language.[third-party source needed]
NaCl for JavaScript - a port of TweetNaCl/NaCl cryptographic library to the JavaScript language.
TweetNaCl for Java - a port of TweetNaCl/NaCl cryptographic library to the Java language.
SPARKNaCl - A re-write of TweetNaCl in the SPARK Ada subset, with formal and fully automatic proofs of type safety and some correctness properties.
Crypt::NaCl::Sodium Perl 5 binding to libsodium.
Monocypher.


最新版本:1.1


官方主页:https://nacl.cr.yp.to/