Commit Graph

34 Commits (a3eb428526390d6fca849b94cba084b020c87108)

Author SHA1 Message Date
Didactic Drunk da188875c4 Generate Sodium::Sign::SecretKey#seed. 2020-07-18 22:49:13 -07:00
Didactic Drunk f0213b88c8 Expose Sodium::Sign::SecretKey#seed. 2020-07-18 22:35:27 -07:00
Didactic Drunk c998625056 Continue #8 2020-07-14 15:52:06 -07:00
Didactic Drunk 3d700b6157 fixes #8. 2020-07-10 17:06:53 -07:00
Didactic Drunk f1a225b03b Sodium::Digest::Blake2b Add #hexfinal(dst).
Better specs.
2020-06-28 16:30:17 -07:00
Didactic Drunk a8f716de09 Crystal <= 0.34 backport `final` methods from crystal 0.35.
Crystal = 0.35 use new Digest::Base interface.
Crystal > 0.35 futureport `hexfinal` method.
2020-05-18 23:13:50 -07:00
Didactic Drunk ea4fc4e9a6 Fix KEY_SIZE and NONCE_SIZE for non-ietf salsa/chacha ciphers.
Allow dupping various classes.
2019-11-25 06:44:33 -08:00
Didactic Drunk c470ef8865 Add Nonce spec. 2019-09-16 02:21:37 -07:00
Didactic Drunk b4fe9ef1c3 Split Sodium::Pwhash in to Sodium::Password::Hash and Sodium::Password::Key. 2019-09-16 02:21:37 -07:00
Didactic Drunk 8aea82b296 Add Sodium::CryptoBox::SecretKey#decrypt_string
Add Sodium::SecretBox#decrypt_string
Add Documentation.
2019-09-14 06:05:13 -07:00
Didactic Drunk 030b90c2ff XChaCha20-Poly1305-IETF Test vectors. 2019-09-14 04:22:05 -07:00
Didactic Drunk d0f3100689 Sodium::Cipher::Aead::XChaCha20Poly1305Ietf Always use SecureBuffer. Rename. 2019-09-13 22:39:29 -07:00
Didactic Drunk b212f6bacd Fix Sodium::SecureBuffer state transitions. 2019-09-13 21:33:21 -07:00
Didactic Drunk 964fe714e9 Sodium::Cipher::Aead::Xchacha20Poly1305Ietf Add combined mode. 2019-09-13 03:16:04 -07:00
Didactic Drunk 192044b27a Sodium::Cipher::Aead::Xchacha20Poly1305Ietf Add class and basic specs. 2019-09-13 03:16:00 -07:00
Didactic Drunk c3a9fe178a Sodium::Pwhash create keys based on time cost.
Add #craete_key and #craete_kdf.
2019-09-12 22:28:49 -07:00
Didactic Drunk ed7ba20082 Sodium::Kdf keep SecureBuffer in noaccess state except when in use. 2019-09-01 10:31:36 -07:00
Didactic Drunk 8cdb4cbf42 Sodium::SecureBuffer
Add State and transitions.
  New Exceptions.
  Raise instead of crashing when attempting to access buffer.
  Allow wiping more than once.
  Add specs.
2019-09-01 02:51:48 -07:00
Didactic Drunk 54a3cd8a8a Sodium::Nonce reuse detection. 2019-08-06 15:14:25 -07:00
Didactic Drunk fde955c509 Rename Sodium::Pwhash#store to #create.
Rename Sodium::Pwhash#key_derive to #derive_key.
Rename Sodium::Pwhash#kdf_derive to #derive_kdf.
Rename Sodium::CryptoBox#encrypt_easy to #encrypt.
Rename Sodium::CryptoBox#decrypt_easy to #decrypt.
Rename Sodium::SecretBox#encrypt_easy to #encrypt.
Rename Sodium::SecretBox#decrypt_easy to #decrypt.

Remove redundant Sodium::SecretBox#encrypt methods.
2019-08-06 03:58:22 -07:00
Didactic Drunk 8ca9dc6ff9 Add Sodium::Sign::SecretKey detached test vectors. 2019-08-06 02:20:47 -07:00
Didactic Drunk 0d8dd544d5 More test vectors from PyNaCl. 2019-08-05 22:30:24 -07:00
Didactic Drunk 96b215cf54 Add Sodium::Cipher::SecretStream 2019-07-08 23:39:00 -07:00
Didactic Drunk 65ad5987d4 SecureBuffer for Chalsa. 2019-07-08 16:08:39 -07:00
Didactic Drunk d1c8829fcf API changed all Key classes .bytes to .to_slice
Switched most custom Wipe implementation to libsodium guarded memory.
2019-07-03 18:04:13 -07:00
Didactic Drunk 769e02e4c7 Add Pwhash test vectors from PyNaCl and RbNaCl.
Pwhash::Algorithm renamed to Mode to be more like other libsodium bindings.
Cryptobox#encrypt now returns {encrypted, nonce} identical to SecretBox.
2019-07-01 10:50:46 -07:00
Didactic Drunk 92ac0ef6d4 Version 0.9.0
Rearrange CryptoBox.
Move Sodium::Error to it's own file.
Requiring individual files is now possible.
Individual require now possible.
2019-07-01 06:47:11 -07:00
Didactic Drunk 731a3d7a4c Remove old test vectors. 2019-06-30 07:20:04 -07:00
Didactic Drunk 26277f4e90 Add blake2b test vectors. 2019-06-29 23:47:54 -07:00
Didactic Drunk 82c19bc78e Documentation.
Remove wipe in specs until bugs sorted out.

Switch most remaining properties to getter.
2019-06-29 19:20:30 -07:00
Didactic Drunk f038f9b52e Add unauthenticated secret/public key encryption. 2019-06-29 18:19:01 -07:00
Didactic Drunk 162cd72b0c Add seed support to CryptoBox and Sign.
Wiping now supports multiple variables by Annotation.
2019-06-29 17:21:00 -07:00
Didactic Drunk 41a55a9593 Sodum::CryptoBox::SecretKey may derive keys from a seed.
Sodum::Sign::SecretKey may derive keys from a seed.
Sodum::CryptoBox::Pair renamed to Sodum::CryptoBox::Box
2019-06-29 12:44:47 -07:00
Didactic Drunk a4b1b8071c Rename project from "cox" to "sodium.cr". 2019-06-28 16:25:05 -07:00