Just conforming to the original documentation.
- Changed the authenticated encryption format. It now conforms to
RFC 7539, with one exception: it uses XChacha20 initialisation instead
of the IETF version of Chacha20. This new format conforms to
- Libsodium's `crypto_aead_xchacha20poly1305_ietf_encrypt`.
+ libsodium's `crypto_aead_xchacha20poly1305_ietf_encrypt`.
- Removed `crypto_lock_encrypt()` and `crypto_lock_auth()`.
- Renamed `crypto_lock_aead_auth()` to `crypto_lock_auth_ad()`.
- Renamed `crypto_unlock_aead_auth()` to `crypto_unlock_auth_ad()`.
Monocypher is an easy to use, easy to deploy, auditable crypto library
written in portable C. It approaches the size of [TweetNaCl][] and the
-speed of [Libsodium][].
+speed of [libsodium][].
[Official site.](https://monocypher.org/)
[Official releases.](https://monocypher.org/download/)
-[Libsodium]: https://libsodium.org
+[libsodium]: https://libsodium.org
[TweetNaCl]: https://tweetnacl.cr.yp.to/
This will give you an idea how fast Monocypher is on your machine. Make
sure you run it on the target platform if performance is a concern. If
-Monocypher is too slow, try Libsodium. If you're not sure, you can
+Monocypher is too slow, try libsodium. If you're not sure, you can
always switch later.
Note: the speed benchmark currently requires the POSIX
`clock_gettime()` function.
-There are similar benchmarks for Libsodium, TweetNaCl, LibHydrogen,
+There are similar benchmarks for libsodium, TweetNaCl, LibHydrogen,
c25519, and ed25519-donna (the portable, 32-bit version):
$ make speed-sodium
If you are reading this, you cloned the GitHub repository. You miss a
couple files that ship with the tarball releases:
-- The `tests/vectors.h` header. Generating it requires Libsodium. Go
+- The `tests/vectors.h` header. Generating it requires libsodium. Go
to `tests/gen/`, then run `make`.
- The html version of the manual, generated by the `doc/man2html.sh`
script. You will need mandoc.
prelude.h.vec:
@echo "creating prelude.h.vec"
@echo "// Generated with hard coded official vectors, and" > $@
- @echo "// random vectors with Libsodium and ed25519-donna." >> $@
+ @echo "// random vectors with libsodium and ed25519-donna." >> $@
@echo "// Download Monocypher's git repository to regenerate." >> $@
@echo "#include <inttypes.h>" >> $@
@echo "#include <stddef.h>" >> $@
crypto_scalarmult_base(pk1, sk1);
crypto_scalarmult_base(pk2, sk2);
if (crypto_scalarmult(shared, sk1, pk2)) {
- fprintf(stderr, "Libsodium rejected the public key\n");
+ fprintf(stderr, "libsodium rejected the public key\n");
printf(":deadbeef:\n"); // prints a canary to fail subsequent tests
}
TIMING_START {
if (crypto_scalarmult(out, out, in)) {
- fprintf(stderr, "Libsodium rejected the public key\n");
+ fprintf(stderr, "libsodium rejected the public key\n");
}
}
TIMING_END;
TIMING_START {
if (crypto_sign_verify_detached(signature, message, 64, pk)) {
- printf("Libsodium verification failed\n");
+ printf("libsodium verification failed\n");
}
}
TIMING_END;
// Generated with hard coded official vectors, and
-// random vectors with Libsodium and ed25519-donna.
+// random vectors with libsodium and ed25519-donna.
// Download Monocypher's git repository to regenerate.
#include <inttypes.h>
#include <stddef.h>
#define SODIUM_INIT \
do { \
if (sodium_init() == -1) { \
- printf("Libsodium init failed. Abort.\n"); \
+ printf("libsodium init failed. Abort.\n"); \
return 1; \
} \
} while (0)