Bump KDF dependencies

This commit is contained in:
Jack Grigg 2021-05-02 11:20:16 +12:00
parent 2b66810e84
commit cffb64622e
6 changed files with 87 additions and 60 deletions

57
Cargo.lock generated
View file

@ -29,7 +29,7 @@ checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
dependencies = [ dependencies = [
"aes-soft", "aes-soft",
"aesni", "aesni",
"cipher", "cipher 0.2.5",
] ]
[[package]] [[package]]
@ -40,7 +40,7 @@ checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763"
dependencies = [ dependencies = [
"aes-soft", "aes-soft",
"aesni", "aesni",
"cipher", "cipher 0.2.5",
"ctr", "ctr",
] ]
@ -50,7 +50,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
"opaque-debug", "opaque-debug",
] ]
@ -60,7 +60,7 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
"opaque-debug", "opaque-debug",
] ]
@ -177,9 +177,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]] [[package]]
name = "bcrypt-pbkdf" name = "bcrypt-pbkdf"
version = "0.5.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3c57ebe4acbed200ea7079f70d873d87783af0a5057501323d0a391ae36309" checksum = "4645e59eb7020efc99d437a473c79d2074924df55e1d5c50a71dcfcb71fd8569"
dependencies = [ dependencies = [
"blowfish", "blowfish",
"crypto-mac", "crypto-mac",
@ -234,7 +234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0"
dependencies = [ dependencies = [
"block-padding", "block-padding",
"cipher", "cipher 0.2.5",
] ]
[[package]] [[package]]
@ -250,7 +250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32fa6a061124e37baba002e496d203e23ba3d7b73750be82dbfbc92913048a5b" checksum = "32fa6a061124e37baba002e496d203e23ba3d7b73750be82dbfbc92913048a5b"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"cipher", "cipher 0.2.5",
"opaque-debug", "opaque-debug",
] ]
@ -305,7 +305,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
"ppv-lite86", "ppv-lite86",
] ]
@ -337,7 +337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e" checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e"
dependencies = [ dependencies = [
"aead", "aead",
"cipher", "cipher 0.2.5",
"poly1305", "poly1305",
"zeroize", "zeroize",
] ]
@ -364,6 +364,15 @@ dependencies = [
"generic-array", "generic-array",
] ]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "clap" name = "clap"
version = "2.33.3" version = "2.33.3"
@ -550,9 +559,9 @@ dependencies = [
[[package]] [[package]]
name = "crypto-mac" name = "crypto-mac"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"subtle", "subtle",
@ -586,7 +595,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
] ]
[[package]] [[package]]
@ -947,9 +956,9 @@ dependencies = [
[[package]] [[package]]
name = "hkdf" name = "hkdf"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
dependencies = [ dependencies = [
"digest", "digest",
"hmac", "hmac",
@ -957,9 +966,9 @@ dependencies = [
[[package]] [[package]]
name = "hmac" name = "hmac"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
"digest", "digest",
@ -1401,9 +1410,9 @@ dependencies = [
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
version = "0.7.5" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
] ]
@ -1874,11 +1883,11 @@ checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]] [[package]]
name = "salsa20" name = "salsa20"
version = "0.7.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" checksum = "1c7c5f10864beba947e1a1b43f3ef46c8cc58d1c2ae549fa471713e8ff60787a"
dependencies = [ dependencies = [
"cipher", "cipher 0.3.0",
] ]
[[package]] [[package]]
@ -1898,9 +1907,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]] [[package]]
name = "scrypt" name = "scrypt"
version = "0.6.5" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19230d10daad7f163d8c1fc8edf84fbe52ac71c2ebe5adf3f763aa1557b843e3" checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518"
dependencies = [ dependencies = [
"hmac", "hmac",
"pbkdf2", "pbkdf2",

View file

@ -21,7 +21,7 @@ c2-chacha = "0.3"
chacha20poly1305 = { version = "0.7", default-features = false, features = ["alloc"] } chacha20poly1305 = { version = "0.7", default-features = false, features = ["alloc"] }
# - HKDF from RFC 5869 with SHA-256 # - HKDF from RFC 5869 with SHA-256
hkdf = "0.10" hkdf = "0.11"
sha2 = "0.9" sha2 = "0.9"
# - CSPRNG # - CSPRNG

View file

@ -29,12 +29,12 @@ x25519-dalek = "1"
# - HKDF from RFC 5869 with SHA-256 # - HKDF from RFC 5869 with SHA-256
# - HMAC from RFC 2104 with SHA-256 # - HMAC from RFC 2104 with SHA-256
hkdf = "0.10" hkdf = "0.11"
hmac = "0.10" hmac = "0.11"
sha2 = "0.9" sha2 = "0.9"
# - scrypt from RFC 7914 # - scrypt from RFC 7914
scrypt = { version = "0.6", default-features = false } scrypt = { version = "0.7", default-features = false }
# - CSPRNG # - CSPRNG
rand = "0.7" rand = "0.7"
@ -53,7 +53,7 @@ curve25519-dalek = { version = "3", optional = true }
# - Encrypted keys # - Encrypted keys
aes = { version = "0.6", optional = true } aes = { version = "0.6", optional = true }
aes-ctr = { version = "0.6", optional = true } aes-ctr = { version = "0.6", optional = true }
bcrypt-pbkdf = { version = "0.5", optional = true } bcrypt-pbkdf = { version = "0.6", optional = true }
block-modes = { version = "0.7", optional = true } block-modes = { version = "0.7", optional = true }
# Parsing # Parsing

View file

@ -30,7 +30,7 @@ impl HmacWriter {
/// Constructs a new writer to process input data. /// Constructs a new writer to process input data.
pub(crate) fn new(key: HmacKey) -> Self { pub(crate) fn new(key: HmacKey) -> Self {
HmacWriter { HmacWriter {
inner: Hmac::new_varkey(key.0.expose_secret()).expect("key is the correct length"), inner: Hmac::new_from_slice(key.0.expose_secret()).expect("key is the correct length"),
} }
} }

39
fuzz-afl/Cargo.lock generated
View file

@ -149,7 +149,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
"ppv-lite86", "ppv-lite86",
] ]
@ -172,7 +172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e" checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e"
dependencies = [ dependencies = [
"aead", "aead",
"cipher", "cipher 0.2.5",
"poly1305", "poly1305",
"zeroize", "zeroize",
] ]
@ -186,6 +186,15 @@ dependencies = [
"generic-array", "generic-array",
] ]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "clap" name = "clap"
version = "2.33.3" version = "2.33.3"
@ -221,9 +230,9 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
[[package]] [[package]]
name = "crypto-mac" name = "crypto-mac"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"subtle", "subtle",
@ -352,9 +361,9 @@ dependencies = [
[[package]] [[package]]
name = "hkdf" name = "hkdf"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
dependencies = [ dependencies = [
"digest", "digest",
"hmac", "hmac",
@ -362,9 +371,9 @@ dependencies = [
[[package]] [[package]]
name = "hmac" name = "hmac"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
"digest", "digest",
@ -581,9 +590,9 @@ dependencies = [
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
version = "0.7.5" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
] ]
@ -772,11 +781,11 @@ dependencies = [
[[package]] [[package]]
name = "salsa20" name = "salsa20"
version = "0.7.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" checksum = "1c7c5f10864beba947e1a1b43f3ef46c8cc58d1c2ae549fa471713e8ff60787a"
dependencies = [ dependencies = [
"cipher", "cipher 0.3.0",
] ]
[[package]] [[package]]
@ -796,9 +805,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]] [[package]]
name = "scrypt" name = "scrypt"
version = "0.6.5" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19230d10daad7f163d8c1fc8edf84fbe52ac71c2ebe5adf3f763aa1557b843e3" checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518"
dependencies = [ dependencies = [
"hmac", "hmac",
"pbkdf2", "pbkdf2",

39
fuzz/Cargo.lock generated
View file

@ -124,7 +124,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6"
dependencies = [ dependencies = [
"cipher", "cipher 0.2.5",
"ppv-lite86", "ppv-lite86",
] ]
@ -147,7 +147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e" checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e"
dependencies = [ dependencies = [
"aead", "aead",
"cipher", "cipher 0.2.5",
"poly1305", "poly1305",
"zeroize", "zeroize",
] ]
@ -161,6 +161,15 @@ dependencies = [
"generic-array", "generic-array",
] ]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "cookie-factory" name = "cookie-factory"
version = "0.3.2" version = "0.3.2"
@ -181,9 +190,9 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
[[package]] [[package]]
name = "crypto-mac" name = "crypto-mac"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"subtle", "subtle",
@ -312,9 +321,9 @@ dependencies = [
[[package]] [[package]]
name = "hkdf" name = "hkdf"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
dependencies = [ dependencies = [
"digest", "digest",
"hmac", "hmac",
@ -322,9 +331,9 @@ dependencies = [
[[package]] [[package]]
name = "hmac" name = "hmac"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
"digest", "digest",
@ -550,9 +559,9 @@ dependencies = [
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
version = "0.7.5" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
dependencies = [ dependencies = [
"crypto-mac", "crypto-mac",
] ]
@ -732,11 +741,11 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]] [[package]]
name = "salsa20" name = "salsa20"
version = "0.7.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" checksum = "1c7c5f10864beba947e1a1b43f3ef46c8cc58d1c2ae549fa471713e8ff60787a"
dependencies = [ dependencies = [
"cipher", "cipher 0.3.0",
] ]
[[package]] [[package]]
@ -756,9 +765,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]] [[package]]
name = "scrypt" name = "scrypt"
version = "0.6.5" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19230d10daad7f163d8c1fc8edf84fbe52ac71c2ebe5adf3f763aa1557b843e3" checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518"
dependencies = [ dependencies = [
"hmac", "hmac",
"pbkdf2", "pbkdf2",