Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump chacha20 and salsa20 #402

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Bump chacha20 and salsa20
  • Loading branch information
trevyn committed Mar 17, 2022
commit bc4f8d76cd250596eb08385ea43317e06a2fb344
6 changes: 3 additions & 3 deletions chacha20poly1305/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ categories = ["cryptography", "no-std"]

[dependencies]
aead = { version = "0.4", default-features = false }
chacha20 = { version = "0.8", features = ["zeroize"] }
cipher = "0.3"
chacha20 = { version = "0.9", features = ["zeroize"] }
cipher = "0.4"
poly1305 = "0.7"
zeroize = { version = "1", default-features = false }

Expand All @@ -34,7 +34,7 @@ alloc = ["aead/alloc"]
heapless = ["aead/heapless"]
stream = ["aead/stream"]
reduced-round = []
force-soft = ["chacha20/force-soft", "poly1305/force-soft"]
force-soft = ["poly1305/force-soft"]

[package.metadata.docs.rs]
all-features = true
Expand Down
14 changes: 7 additions & 7 deletions chacha20poly1305/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mod cipher;
pub use aead;

use self::cipher::Cipher;
use ::cipher::{NewCipher, StreamCipher, StreamCipherSeek};
use ::cipher::{KeyIvInit, StreamCipher, StreamCipherSeek};
use aead::{
consts::{U0, U12, U16, U24, U32},
generic_array::{ArrayLength, GenericArray},
Expand Down Expand Up @@ -226,7 +226,7 @@ pub type XChaCha12Poly1305 = ChaChaPoly1305<XChaCha12, U24>;
/// See the [toplevel documentation](index.html) for a usage example.
pub struct ChaChaPoly1305<C, N: ArrayLength<u8> = U12>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
{
/// Secret key
key: GenericArray<u8, U32>,
Expand All @@ -237,7 +237,7 @@ where

impl<C, N> NewAead for ChaChaPoly1305<C, N>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
{
type KeySize = U32;
Expand All @@ -252,7 +252,7 @@ where

impl<C, N> AeadCore for ChaChaPoly1305<C, N>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
{
type NonceSize = N;
Expand All @@ -262,7 +262,7 @@ where

impl<C, N> AeadInPlace for ChaChaPoly1305<C, N>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
{
fn encrypt_in_place_detached(
Expand Down Expand Up @@ -291,7 +291,7 @@ where

impl<C, N> Clone for ChaChaPoly1305<C, N>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
{
fn clone(&self) -> Self {
Expand All @@ -304,7 +304,7 @@ where

impl<C, N> Drop for ChaChaPoly1305<C, N>
where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
C: KeyIvInit<KeySize = U32, IvSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
{
fn drop(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion xsalsa20poly1305/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = ["cryptography", "no-std"]

[dependencies]
aead = { version = "0.4", default-features = false }
salsa20 = { version = "0.9", features = ["zeroize"] }
salsa20 = { version = "0.10", features = ["zeroize"] }
poly1305 = "0.7"
rand_core = { version = "0.6", optional = true }
subtle = { version = ">=2, <2.5", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion xsalsa20poly1305/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ use aead::{
};
use poly1305::{universal_hash::NewUniversalHash, Poly1305};
use salsa20::{
cipher::{NewCipher, StreamCipher, StreamCipherSeek},
cipher::{KeyIvInit, StreamCipher, StreamCipherSeek},
XSalsa20,
};
use zeroize::Zeroize;
Expand Down