6bece9c8c4
Justifications: - crypto_(auth|hash|generichash|onetimeauth|shorthash)*: it's legal to hash or HMAC a 0-length message - crypto_box*: it's legal to encrypt a 0-length message - crypto_sign*: it's legal to sign a 0-length message - utils: comparing two 0-length byte arrays is legal memzero on a 0-length byte array is a no-op converting an empty hex string to binary results in an empty binary string converting an empty binary string to hex results in an empty hex string converting an empty b64 string to binary results in an empty binary string converting an empty binary string to b64 results in an empty b64 string sodium_add / sodium_sub on zero-length arrays is a no-op For the functions declared in utils.h, I moved the logic into private functions that have the __attribute__ ((nonnull)) check, but they are only called when the corresponding length argument is non-0. I didn't do this for the hash/box/sign functions since it would have been a lot more work and quite a large refactor. Only memset() may have issues with a zero length. Fix tests, use guard page instead of NULL because of Wasm |
||
---|---|---|
build-aux | ||
builds | ||
contrib | ||
dist-build | ||
m4 | ||
msvc-scripts | ||
packaging | ||
regen-msvc | ||
src | ||
test | ||
.gitignore | ||
.travis.yml | ||
aclocal.m4 | ||
appveyor.yml | ||
AUTHORS | ||
autogen.sh | ||
ChangeLog | ||
configure | ||
configure.ac | ||
lgtm.yml | ||
libsodium-uninstalled.pc.in | ||
libsodium.pc.in | ||
libsodium.sln | ||
libsodium.vcxproj | ||
libsodium.vcxproj.filters | ||
LICENSE | ||
logo.png | ||
Makefile.am | ||
Makefile.in | ||
README.markdown | ||
THANKS |
Sodium is a new, easy-to-use software library for encryption, decryption, signatures, password hashing and more.
It is a portable, cross-compilable, installable, packageable fork of NaCl, with a compatible API, and an extended API to improve usability even further.
Its goal is to provide all of the core operations needed to build higher-level cryptographic tools.
Sodium supports a variety of compilers and operating systems, including Windows (with MingW or Visual Studio, x86 and x64), iOS, Android, as well as Javascript and Webassembly.
Documentation
The documentation is available on Gitbook and built from the libsodium-doc repository:
- libsodium documentation - online, requires Javascript.
- offline documentation in PDF format.
Integrity Checking
The integrity checking instructions (including the signing key for libsodium) are available in the installation section of the documentation.
Community
A mailing-list is available to discuss libsodium.
In order to join, just send a random mail to sodium-subscribe
{at}
pureftpd
{dot} org
.