From 34a5e7463624f76ab5a8c08b80e949d4d09ef522 Mon Sep 17 00:00:00 2001 From: Kieran Prasch Date: Thu, 1 Sep 2022 15:41:51 +0200 Subject: [PATCH] Updates changelog for 0.4.0-alpha.x --- .bumpversion.cfg | 2 +- CHANGELOG.md | 1 - nucypher-core-python/Cargo.toml | 2 +- nucypher-core-python/setup.py | 2 +- nucypher-core-wasm/Cargo.toml | 2 +- nucypher-core-wasm/package.template.json | 2 +- nucypher-core/Cargo.toml | 2 +- nucypher-core/src/reencryption.rs | 40 +++++++++--------------- 8 files changed, 20 insertions(+), 33 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 26499f07..6d6d43b2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.0 +current_version = 0.3.1-alpha.0 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P[^.]*)\.(?P\d+))? diff --git a/CHANGELOG.md b/CHANGELOG.md index 0134ff3f..81668a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,6 @@ Under Construction - The Python module `nucypher_core.umbral` now exports `KeyFrag`. ([#20]) - `Display` impl for `HRAC` and `FleetStateChecksum`, and exposed it in the Python and WASM bindings. ([#22]) - [#17]: https://github.com/nucypher/nucypher-core/pull/17 [#20]: https://github.com/nucypher/nucypher-core/pull/20 [#22]: https://github.com/nucypher/nucypher-core/pull/22 diff --git a/nucypher-core-python/Cargo.toml b/nucypher-core-python/Cargo.toml index 2434869a..63f624d5 100644 --- a/nucypher-core-python/Cargo.toml +++ b/nucypher-core-python/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nucypher-core-python" authors = ["Bogdan Opanchuk "] -version = "0.3.0" +version = "0.3.1-alpha.0" edition = "2018" [lib] diff --git a/nucypher-core-python/setup.py b/nucypher-core-python/setup.py index a3a8dc2b..6f2532c3 100644 --- a/nucypher-core-python/setup.py +++ b/nucypher-core-python/setup.py @@ -10,7 +10,7 @@ description="Protocol structures of Nucypher network", long_description=long_description, long_description_content_type="text/markdown", - version="0.3.0", + version="0.3.1-alpha.0", author="Bogdan Opanchuk", author_email="bogdan@opanchuk.net", url="https://github.com/nucypher/nucypher-core/tree/master/nucypher-core-python", diff --git a/nucypher-core-wasm/Cargo.toml b/nucypher-core-wasm/Cargo.toml index 440ec91d..3609f0d4 100644 --- a/nucypher-core-wasm/Cargo.toml +++ b/nucypher-core-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nucypher-core-wasm" -version = "0.3.0" +version = "0.3.1-alpha.0" authors = [ "Bogdan Opanchuk ", "Piotr Roslaniec " diff --git a/nucypher-core-wasm/package.template.json b/nucypher-core-wasm/package.template.json index 0954c29e..bda23969 100644 --- a/nucypher-core-wasm/package.template.json +++ b/nucypher-core-wasm/package.template.json @@ -5,7 +5,7 @@ "Bogdan Opanchuk " ], "description": "NuCypher network core data structures", - "version": "0.3.0", + "version": "0.3.1-alpha.0", "license": "GPL-3.0-only", "repository": { "type": "git", diff --git a/nucypher-core/Cargo.toml b/nucypher-core/Cargo.toml index 006482ec..d980bd71 100644 --- a/nucypher-core/Cargo.toml +++ b/nucypher-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nucypher-core" -version = "0.3.0" +version = "0.3.1-alpha.0" authors = ["Bogdan Opanchuk "] edition = "2021" license = "GPL-3.0-only" diff --git a/nucypher-core/src/reencryption.rs b/nucypher-core/src/reencryption.rs index 6be78e46..5293cf1e 100644 --- a/nucypher-core/src/reencryption.rs +++ b/nucypher-core/src/reencryption.rs @@ -9,10 +9,10 @@ use umbral_pre::{ use crate::hrac::HRAC; use crate::key_frag::EncryptedKeyFrag; -use crate::VerificationError; use crate::versioning::{ messagepack_deserialize, messagepack_serialize, ProtocolObject, ProtocolObjectInner, }; +use crate::VerificationError; /// A request for an Ursula to reencrypt for several capsules. #[derive(PartialEq, Debug, Serialize, Deserialize)] @@ -106,7 +106,7 @@ impl ReencryptionResponse { pub fn new( signer: &Signer, capsules: &[Capsule], - vcfrags: impl IntoIterator, + vcfrags: impl IntoIterator, ) -> Self { // un-verify let cfrags: Vec<_> = vcfrags @@ -191,11 +191,10 @@ impl<'a> ProtocolObjectInner<'a> for ReencryptionResponse { impl<'a> ProtocolObject<'a> for ReencryptionResponse {} - #[cfg(test)] mod tests { - use umbral_pre::{encrypt, generate_kfrags, Signer}; use umbral_pre::SecretKey; + use umbral_pre::{encrypt, generate_kfrags, Signer}; use crate::{EncryptedKeyFrag, HRAC}; @@ -213,30 +212,20 @@ mod tests { let (capsule, _ciphertext) = encryption_result.unwrap(); - let hrac = HRAC::new( - &some_trinket, - &another_trinket, - &[42], - ); + let hrac = HRAC::new(&some_trinket, &another_trinket, &[42]); let signer = Signer::new(SecretKey::random()); - let verified_kfrags = generate_kfrags( - &some_secret, - &another_trinket, - &signer, - 5, - 8, - true, - true, - ); + let verified_kfrags = + generate_kfrags(&some_secret, &another_trinket, &signer, 5, 8, true, true); let verified_kfrags_vector = verified_kfrags.into_vec(); let one_verified_krag_in_particular = verified_kfrags_vector[0].clone(); - let encrypted_kfrag = EncryptedKeyFrag::new(&signer, - &another_trinket, - &hrac, - one_verified_krag_in_particular); - + let encrypted_kfrag = EncryptedKeyFrag::new( + &signer, + &another_trinket, + &hrac, + one_verified_krag_in_particular, + ); let request = ReencryptionRequest::new( &[capsule], @@ -250,8 +239,7 @@ mod tests { let conditions = request.conditions.unwrap(); assert!(conditions[0].eq(&47u8)); - let context= request.context.unwrap(); + let context = request.context.unwrap(); assert!(context[0].eq(&51u8)); - } -} \ No newline at end of file +}