Skip to content

Commit d2effd1

Browse files
authored
bump cipher to 0.5.0-pre.7 (#1537)
1 parent 8da5f8a commit d2effd1

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed

Cargo.lock

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ x509-ocsp = { path = "./x509-ocsp" }
6161

6262
# Temp patches to external crates
6363
rsa = { git = "https://github.com/RustCrypto/RSA" }
64+
65+
# https://github.com/RustCrypto/AEADs/pull/632
66+
aes-gcm = { git = "https://github.com/RustCrypto/AEADs.git" }
67+
# https://github.com/RustCrypto/stream-ciphers/pull/368
68+
salsa20 = { git = "https://github.com/RustCrypto/stream-ciphers.git" }

cms/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ x509-cert = { version = "=0.3.0-pre", default-features = false, features = ["pem
2121
const-oid = { version = "0.10.0-rc.0", features = ["db"] }
2222

2323
# optional dependencies
24-
aes = { version = "=0.9.0-pre.1", optional = true }
24+
aes = { version = "=0.9.0-pre.2", optional = true }
2525
async-signature = { version = "=0.6.0-pre.4", features = ["digest", "rand_core"], optional = true }
26-
cbc = { version = "=0.2.0-pre.1", optional = true }
27-
cipher = { version = "=0.5.0-pre.6", features = ["alloc", "block-padding", "rand_core"], optional = true }
26+
cbc = { version = "=0.2.0-pre.2", optional = true }
27+
cipher = { version = "=0.5.0-pre.7", features = ["alloc", "block-padding", "rand_core"], optional = true }
2828
rsa = { version = "=0.10.0-pre.2", optional = true }
2929
sha1 = { version = "=0.11.0-pre.4", optional = true }
3030
sha2 = { version = "=0.11.0-pre.4", optional = true }

pkcs5/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ der = { version = "0.8.0-rc.0", features = ["oid"] }
2020
spki = { version = "0.8.0-rc.0" }
2121

2222
# optional dependencies
23-
cbc = { version = "=0.2.0-pre.1", optional = true }
24-
aes = { version = "=0.9.0-pre.1", optional = true, default-features = false }
23+
cbc = { version = "=0.2.0-pre.2", optional = true }
24+
aes = { version = "=0.9.0-pre.2", optional = true, default-features = false }
2525
aes-gcm = { version = "=0.11.0-pre.1", optional = true, default-features = false, features = ["aes"] }
26-
des = { version = "=0.9.0-pre.1", optional = true, default-features = false }
26+
des = { version = "=0.9.0-pre.2", optional = true, default-features = false }
2727
pbkdf2 = { version = "=0.13.0-pre.1", optional = true, default-features = false, features = ["hmac"] }
2828
rand_core = { version = "0.6.4", optional = true, default-features = false }
2929
scrypt = { version = "=0.12.0-pre.1", optional = true, default-features = false }

pkcs5/src/pbes2/encryption.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::{EncryptionScheme, Kdf, Parameters, Pbkdf2Params, Pbkdf2Prf, ScryptPa
44
use crate::{Error, Result};
55
use aes_gcm::{AeadInPlace, KeyInit as GcmKeyInit, Nonce, Tag};
66
use cbc::cipher::{
7-
block_padding::Pkcs7, BlockCipher, BlockCipherDecrypt, BlockCipherEncrypt, BlockModeDecrypt,
7+
block_padding::Pkcs7, BlockCipherDecrypt, BlockCipherEncrypt, BlockModeDecrypt,
88
BlockModeEncrypt, KeyInit, KeyIvInit,
99
};
1010
use pbkdf2::{
@@ -24,7 +24,7 @@ use scrypt::scrypt;
2424
/// Maximum size of a derived encryption key
2525
const MAX_KEY_LEN: usize = 32;
2626

27-
fn cbc_encrypt<'a, C: BlockCipherEncrypt + BlockCipher + KeyInit>(
27+
fn cbc_encrypt<'a, C: BlockCipherEncrypt + KeyInit>(
2828
es: EncryptionScheme,
2929
key: EncryptionKey,
3030
iv: &[u8],
@@ -37,7 +37,7 @@ fn cbc_encrypt<'a, C: BlockCipherEncrypt + BlockCipher + KeyInit>(
3737
.map_err(|_| Error::EncryptFailed)
3838
}
3939

40-
fn cbc_decrypt<'a, C: BlockCipherDecrypt + BlockCipher + KeyInit>(
40+
fn cbc_decrypt<'a, C: BlockCipherDecrypt + KeyInit>(
4141
es: EncryptionScheme,
4242
key: EncryptionKey,
4343
iv: &[u8],
@@ -57,10 +57,10 @@ fn gcm_encrypt<C, NonceSize, TagSize>(
5757
pos: usize,
5858
) -> Result<&[u8]>
5959
where
60-
C: BlockCipher + BlockSizeUser<BlockSize = U16> + GcmKeyInit + BlockCipherEncrypt,
60+
C: BlockSizeUser<BlockSize = U16> + GcmKeyInit + BlockCipherEncrypt,
6161
aes_gcm::AesGcm<C, NonceSize, TagSize>: GcmKeyInit,
6262
TagSize: aes_gcm::TagSize,
63-
NonceSize: aes::cipher::ArraySize,
63+
NonceSize: aes::cipher::array::ArraySize,
6464
{
6565
if buffer.len() < TagSize::USIZE + pos {
6666
return Err(Error::EncryptFailed);
@@ -82,10 +82,10 @@ fn gcm_decrypt<C, NonceSize, TagSize>(
8282
buffer: &mut [u8],
8383
) -> Result<&[u8]>
8484
where
85-
C: BlockCipher + BlockSizeUser<BlockSize = U16> + GcmKeyInit + BlockCipherEncrypt,
85+
C: BlockSizeUser<BlockSize = U16> + GcmKeyInit + BlockCipherEncrypt,
8686
aes_gcm::AesGcm<C, NonceSize, TagSize>: GcmKeyInit,
8787
TagSize: aes_gcm::TagSize,
88-
NonceSize: aes::cipher::ArraySize,
88+
NonceSize: aes::cipher::array::ArraySize,
8989
{
9090
let msg_len = buffer
9191
.len()

0 commit comments

Comments
 (0)