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

transports/noise: Update to snow 0.8.0 #2272

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
container:
image: rust
env:
CC: clang-10
CC: clang-11
steps:

- name: Cancel Previous Runs
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list
apt-get update
apt-get install -y clang-10
apt-get install -y clang-11

- name: Install CMake
run: apt-get install -y cmake
Expand Down
6 changes: 6 additions & 0 deletions transports/noise/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.30.1 [2021-10-06]

- Update dependencies (see [PR 2272]).

[PR 2272]: https://github.com/libp2p/rust-libp2p/pull/2272

# 0.30.0 [2021-03-17]

- Update `libp2p-core`.
Expand Down
8 changes: 4 additions & 4 deletions transports/noise/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "libp2p-noise"
description = "Cryptographic handshake protocol using the noise framework."
version = "0.30.0"
version = "0.30.1"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -15,17 +15,17 @@ lazy_static = "1.2"
libp2p-core = { version = "0.28.0", path = "../../core" }
log = "0.4"
prost = "0.7"
rand = "0.7.2"
rand = "0.8.3"
sha2 = "0.9.1"
static_assertions = "1"
x25519-dalek = "1.1.0"
zeroize = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
snow = { version = "0.7.1", features = ["ring-resolver"], default-features = false }
snow = { version = "0.8.0", features = ["ring-resolver"], default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
snow = { version = "0.7.1", features = ["default-resolver"], default-features = false }
snow = { version = "0.8.0", features = ["default-resolver"], default-features = false }

[dev-dependencies]
async-io = "1.2.0"
Expand Down
2 changes: 1 addition & 1 deletion transports/noise/src/protocol/x25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl SecretKey<X25519> {
// let ed25519_sk = ed25519::SecretKey::from(ed);
let mut curve25519_sk: [u8; 32] = [0; 32];
let hash = Sha512::digest(ed25519_sk.as_ref());
curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
curve25519_sk.copy_from_slice(&hash[..32]);
let sk = SecretKey(X25519(curve25519_sk)); // Copy
curve25519_sk.zeroize();
sk
Expand Down