From 1ec4b356adc1db03a418caf0d806525e94c58c64 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Fri, 16 Sep 2022 12:18:50 -0600 Subject: [PATCH] Upgrade chacha20poly1305 dependency to version 0.10 Also upgrade the `chacha20`, `cipher`, and `subtle` dependency versions. Extracted from: https://github.com/zcash/librustzcash/commit/72b5e6dfc312532381793302f851af36d0375069 --- Cargo.toml | 7 ++++--- src/lib.rs | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 413522f..a56478e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,12 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -chacha20 = { version = "0.8", default-features = false } -chacha20poly1305 = { version = "0.9", default-features = false } +cipher = { version = "0.4", default-features = false } +chacha20 = { version = "0.9", default-features = false } +chacha20poly1305 = { version = "0.10", default-features = false } group = "0.12" rand_core = { version = "0.6", default-features = false } -subtle = { version = "2.2.3", default-features = false } +subtle = { version = "2.3", default-features = false } [dev-dependencies] ff = { version = "0.12", default-features = false } diff --git a/src/lib.rs b/src/lib.rs index b16146b..c21947f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,13 +25,11 @@ extern crate alloc; use alloc::vec::Vec; use chacha20::{ - cipher::{NewCipher, StreamCipher, StreamCipherSeek}, + cipher::{StreamCipher, StreamCipherSeek}, ChaCha20, }; -use chacha20poly1305::{ - aead::{AeadInPlace, NewAead}, - ChaCha20Poly1305, -}; +use chacha20poly1305::{aead::AeadInPlace, ChaCha20Poly1305, KeyInit}; +use cipher::KeyIvInit; use rand_core::RngCore; use subtle::{Choice, ConstantTimeEq};