From 7292777bdbf522e81854746204f541b52b13321b Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Thu, 27 Jun 2019 16:19:11 -0700 Subject: [PATCH] Documentation [skip ci] --- README.md | 75 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 23a1e0b..2019030 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,49 @@ Updated Crystal bindings for the [libsodium API](https://libsodium.gitbook.io/doc/) -Given a recipients public key, you can encrypt and sign a message for them. Upon -receipt, they can decrypt and authenticate the message as having come from you. +## Features + +- Public-Key Cryptography + - [x] Crypto Box Easy + - [ ] Sealed Box + - [x] Combined Signatures + - [x] Detached Signatures +- [Secret-Key Cryptography](https://libsodium.gitbook.io/doc/secret-key_cryptography) + - Secret Box + - [x] [Combined mode](https://libsodium.gitbook.io/doc/secret-key_cryptography/authenticated_encryption) + - [ ] Detached mode + - Streaming + - [ ] XChaCha20 Poly1305 + - AEAD + - [ ] [AES256-GCM (Requires hardware acceleration)](https://libsodium.gitbook.io/doc/secret-key_cryptography/aead) + - [ ] XChaCha20-Poly1305-IETF + - [ ] ChaCha20-Poly1305-IETF + - [ ] ChaCha20-Poly1305 +- Hashing + - [x] ☑ [Blake2b](https://libsodium.gitbook.io/doc/hashing/generic_hashing) + - [ ] [SipHash](https://libsodium.gitbook.io/doc/hashing/short-input_hashing) +- [Password Hashing](https://libsodium.gitbook.io/doc/password_hashing) + - [x] [Argon2](https://libsodium.gitbook.io/doc/password_hashing/the_argon2i_function) (Use for new applications) + - [ ] Scrypt (For compatibility with older applications) +- Other + - [x] [Key Derivation](https://libsodium.gitbook.io/doc/key_derivation) + - [ ] [Key Exchange](https://libsodium.gitbook.io/doc/key_exchange) +- Advanced + - Stream Ciphers + - [x] XSalsa20 + - [x] Salsa20 + - [x] XChaCha20 + - [x] ChaCha20 Ietf + - [x] ChaCha20 + - [ ] One time auth + - [ ] Padding + +☑ Indicate specs are compared against test vectors from another source. + +Several features in libsodium are already provided by Crystal: +* Random (Use [Random::Secure](https://crystal-lang.org/api/latest/Random/Secure.html)) +* SHA-2 (Use [OpenSSL::Digest](https://crystal-lang.org/api/latest/OpenSSL/Digest.html)) +* HMAC SHA-2 (Use [OpenSSL::HMAC](https://crystal-lang.org/api/latest/OpenSSL/HMAC.html)) ## Installation @@ -19,36 +60,6 @@ dependencies: github: didactic-drunk/cox ``` - -## Features - -- Public-Key Cryptography - - [x] Crypto Box Easy - - [ ] Sealed Box - - [x] Combined Signatures - - [x] Detached Signatures -- Secret-Key Cryptography - - [x] Secret Box - - [x] XSalsa20 - - [x] Salsa20 - - [x] XChaCha20 - - [x] ChaCha20 Ietf - - [x] ChaCha20 -- Hashing - - [x] Blake2b - - [ ] SipHash -- Password Hashing - - [x] Argon2 (Use for new applications) - - [ ] Scrypt (For compatibility with older applications) -- Other - - [x] Key Derivation - - [ ] One time auth - -Several libsodium API's are already provided by Crystal: -* Random (Use [Random::Secure](https://crystal-lang.org/api/latest/Random/Secure.html)) -* SHA-2 (Use [OpenSSL::Digest](https://crystal-lang.org/api/latest/OpenSSL/Digest.html)) -* HMAC SHA-2 (Use [OpenSSL::HMAC](https://crystal-lang.org/api/latest/OpenSSL/HMAC.html)) - ## Usage ```crystal