diff --git a/Cargo.lock b/Cargo.lock index 08a72b9c..8ea0205a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,9 +79,12 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ascon" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe9a0cff241855e9166670d259192aacf1e9a81b865dc9905afbbab31a9d2c1" +checksum = "5f0e716048a18530cce4684daf98a7563a499d710e1ed8ef35567fcb43a7c5f1" +dependencies = [ + "zeroize", +] [[package]] name = "ascon-aead" @@ -554,27 +557,15 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - [[package]] name = "typenum" version = "1.16.0" @@ -587,12 +578,6 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "universal-hash" version = "0.5.0" @@ -637,12 +622,11 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", "syn", - "synstructure", ] diff --git a/ascon-aead/Cargo.toml b/ascon-aead/Cargo.toml index 70b8eebd..4b8977a4 100644 --- a/ascon-aead/Cargo.toml +++ b/ascon-aead/Cargo.toml @@ -17,10 +17,10 @@ rust-version = "1.56" [dependencies] aead = { version = "0.5", default-features = false } subtle = { version = "2", default-features = false } -zeroize = { version = "1.6", optional = true, default-features = false, features = [ +zeroize_crate = { package = "zeroize", version = "1.6", optional = true, default-features = false, features = [ "derive", ] } -ascon = "0.3" +ascon = "0.4" [dev-dependencies] hex = "0.4" @@ -28,7 +28,7 @@ aead = { version = "0.5", features = ["alloc"] } spectral = { version = "0.6", default-features = false } [features] -default = ["alloc", "getrandom", "zeroize"] +default = ["alloc", "getrandom"] std = ["aead/std", "alloc"] alloc = ["aead/alloc"] arrayvec = ["aead/arrayvec"] @@ -36,6 +36,7 @@ getrandom = ["aead/getrandom", "rand_core"] heapless = ["aead/heapless"] rand_core = ["aead/rand_core"] stream = ["aead/stream"] +zeroize = ["zeroize_crate", "ascon/zeroize"] [package.metadata.docs.rs] all-features = true diff --git a/ascon-aead/src/lib.rs b/ascon-aead/src/lib.rs index 43993411..81774e94 100644 --- a/ascon-aead/src/lib.rs +++ b/ascon-aead/src/lib.rs @@ -98,6 +98,9 @@ //! Similarly, enabling the `arrayvec` feature of this crate will provide an impl of //! [`aead::Buffer`] for `arrayvec::ArrayVec`. +#[cfg(feature = "zeroize")] +extern crate zeroize_crate as zeroize; + pub use aead::{self, Error, Key, Nonce, Tag}; use aead::{ consts::{U0, U16, U20},