Skip to content

Commit

Permalink
shake: NITs brushup
Browse files Browse the repository at this point in the history
  • Loading branch information
brycx committed Sep 7, 2024
1 parent 81f90c8 commit faf4353
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

**Changelog:**

- Add support for SHAKE128 and SHAKE256 from FIPS 202 ([#398](https://github.com/orion-rs/orion/pull/398)).
- Bump copyright year to 2024.
- Bump MSRV to `1.80.0`.
- Update CI dependencies.
Expand Down
20 changes: 8 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
[package]
name = "orion"
version = "0.17.6"
version = "0.17.7"
authors = ["brycx <brycx@protonmail.com>"]
description = "Usable, easy and safe pure-Rust crypto"
keywords = [ "cryptography", "crypto", "aead", "hash", "mac" ]
categories = [ "cryptography", "no-std" ]
keywords = ["cryptography", "crypto", "aead", "hash", "mac"]
categories = ["cryptography", "no-std"]
edition = "2021"
rust-version = "1.80" # Update CI (MSRV) test along with this.
rust-version = "1.80" # Update CI (MSRV) test along with this.
readme = "README.md"
repository = "https://github.com/orion-rs/orion"
documentation = "https://docs.rs/orion"
license = "MIT"
exclude = [
".gitignore",
".travis.yml",
"tests/*"
]
exclude = [".gitignore", ".travis.yml", "tests/*"]

[dependencies]
subtle = { version = "^2.2.2", default-features = false }
zeroize = { version = "1.1.0", default-features = false }
fiat-crypto = {version = "0.2.1", default-features = false}
fiat-crypto = { version = "0.2.1", default-features = false }
getrandom = { version = "0.2.0", optional = true }
ct-codecs = { version = "1.1.1", optional = true }

Expand All @@ -31,8 +27,8 @@ default-features = false
features = ["alloc"]

[features]
default = [ "safe_api" ]
safe_api = [ "getrandom", "ct-codecs" ]
default = ["safe_api"]
safe_api = ["getrandom", "ct-codecs"]
alloc = []
experimental = []

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Orion is a cryptography library written in pure Rust. It aims to provide easy an
Currently supports:
* **AEAD**: (X)ChaCha20-Poly1305.
* **Hashing**: BLAKE2b, SHA2, SHA3.
* **XOF**: SHAKE128, SHAKE256.
* **KDF**: HKDF, PBKDF2, Argon2i.
* **Key exchange**: X25519.
* **MAC**: HMAC, Poly1305.
Expand Down
4 changes: 0 additions & 4 deletions src/hazardous/hash/sha3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,10 +749,6 @@ impl<const RATE: usize> Shake<RATE> {
self.state_to_buffer();
}

// TODO: Testing
// [1]: squeeze(RATE/2) => squeeze(RATE*2) <=> squeeze(RATE*2) => squeeze(RATE/2)
// [3]: squeeze(7) => squeeze(1) <=> squeeze(8)

for out_b in dest.iter_mut() {
debug_assert!(self.to_squeeze <= RATE);

Expand Down

0 comments on commit faf4353

Please sign in to comment.