Commit Graph

189 Commits (master)

Author SHA1 Message Date
Didactic Drunk 428907318b Documentation fix. [skip ci] 2019-08-31 02:47:34 -07:00
Didactic Drunk 7d33f1519f Sodium::Nonce add JSON and Yaml converters. 2019-08-30 22:30:21 -07:00
Didactic Drunk a825d61039 Sodium::SecretBox::PublicKey add JSON and Yaml converters.
Sodium::Sign::PublicKey add JSON and Yaml converters.
2019-08-29 01:16:48 -07:00
Didactic Drunk 740e49cc6b Sodium::Sign::SecretKey#initialize add erase argument. 2019-08-26 03:31:17 -07:00
Didactic Drunk bf2aaf0fe1 Documentation fixup 2019-08-26 03:23:03 -07:00
Didactic Drunk 2dda619026 Add default Sodium::Pwhash algorithm. 2019-08-24 14:15:37 -07:00
Didactic Drunk ac15f86705 Add Nonce reuse detection.
Build example as part of tests.
2019-08-10 03:58:30 -07:00
Didactic Drunk 2d0ed351ea Allow reusable nonces. 2019-08-06 22:56:49 -07:00
Didactic Drunk 8ed9f94ead Documentation fixes. 2019-08-06 16:45:20 -07:00
Didactic Drunk d34bcb49f4 Fix github badge. 2019-08-06 16:29:47 -07:00
Didactic Drunk 54dfb4a454 Release 1.0.1 2019-08-06 15:51:51 -07:00
Didactic Drunk 54a3cd8a8a Sodium::Nonce reuse detection. 2019-08-06 15:14:25 -07:00
Didactic Drunk 075c245011 Release 1.0.0 2019-08-06 15:14:25 -07:00
Didactic Drunk d556e1c909 Use crypto_box_beforenmbytes to precompute CryptoBox shared key. 2019-08-06 14:30:43 -07:00
Didactic Drunk 31c3ead851 Add Documentation. 2019-08-06 04:37:38 -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 4be74741d5 Use timing safe compare in Sodium::SecureBuffer. 2019-08-05 22:30:24 -07:00
Didactic Drunk 0d8dd544d5 More test vectors from PyNaCl. 2019-08-05 22:30:24 -07:00
Didactic Drunk 95894ef8fd Verify libsodium download using minisign. 2019-08-05 22:30:24 -07:00
Didactic Drunk 9247d739ac Allow dup of Sodium::SecureBuffer.
Sodium::Digest::Blake2b use to_slice internally.
2019-07-27 00:35:27 -07:00
Didactic Drunk d577e3b1be Remove remaining base64 conversion.
Version to 0.9.1
More examples/constants.cr
Remove unused development dependency.
2019-07-09 15:32:41 -07:00
Didactic Drunk 159c381cef More constants in examples/constants.cr 2019-07-09 01:56:38 -07:00
Didactic Drunk fc60839d5b Documentation. 2019-07-09 00:42:56 -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 cfd8a10b6b Blake2b accepts a SecureBuffer key.
More public constructors for SecretBox.
2019-07-08 13:24:25 -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 7dcaeb1332 Add examples/constants.cr 2019-06-30 14:21:31 -07:00
Didactic Drunk 7745e2f912 Wipe bugfix for StaticArray.
Thanks (in no particular order shuffled randomly until alphabetical)
  @asterite @bcardiff @blacksmoke16
2019-06-30 14:03:08 -07:00
Didactic Drunk 731a3d7a4c Remove old test vectors. 2019-06-30 07:20:04 -07:00
Didactic Drunk 68a08ce603 Fix shard name. 2019-06-30 07:05:20 -07:00
Didactic Drunk 26277f4e90 Add blake2b test vectors. 2019-06-29 23:47:54 -07:00
Didactic Drunk 65b12cddd9 Documentation. 2019-06-29 19:49:57 -07:00
Didactic Drunk 515b8446b9 Documentation fix. [skip ci] 2019-06-29 19:31:41 -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 2f4d9ddb6b Documentation. 2019-06-28 18:46:42 -07:00
Didactic Drunk a4b1b8071c Rename project from "cox" to "sodium.cr". 2019-06-28 16:25:05 -07:00
Didactic Drunk 8e939b9518 API change. Cox::Blake2b renamed to Cox::Digest::Blake2b 2019-06-28 13:58:55 -07:00
Didactic Drunk b50e068b43 Documentation. [skip ci] 2019-06-28 13:55:10 -07:00
Didactic Drunk 95ee0e63b1 Documentation. [skip ci] 2019-06-28 13:34:06 -07:00
Didactic Drunk 848cf3e3e2 Breaking API changes:
SecretKey renamed to SecretBox.

Start of automatic wiping.
Documentation additions and corrections.
2019-06-28 05:20:56 -07:00
Didactic Drunk a02c54f4a7 Breaking API changes:
SecretKey renamed to CryptoBox::SecretKey
  PublicKey renamed to CryptoBox::PublicKey
  KeyPair removed.  Use CryptoBox::SecretKey instead.

  Cox.encrypt was removed.  Use `secret_key.pair(...).encrypt`
  Cox.decrypt was removed.  Use `secret_key.pair(...).decrypt`
2019-06-28 04:32:16 -07:00
Didactic Drunk 0eb4a8991a Breaking API changes:
SignSecretKey rename to Sign::SecretKey
  SignPublicKey rename to Sign::PublicKey
  SignKeyPair removed.  Use Sign::SecretKey instead.

  Cox.sign_detached moved to Sign::SecretKey#sign_detached
  Cox.verify_detached moved to Sign::PublicKey#verify_detached

  verify_detached raises on failure instead of using a return value.

  More validation of data sizes.
2019-06-28 03:30:33 -07:00
Didactic Drunk da8f97ae47 More documentation. 2019-06-28 02:18:23 -07:00