diff --git a/AwsEncryptionSDK/runtimes/rust/Cargo.toml b/AwsEncryptionSDK/runtimes/rust/Cargo.toml index 2ba9a4c69..4d88e5312 100644 --- a/AwsEncryptionSDK/runtimes/rust/Cargo.toml +++ b/AwsEncryptionSDK/runtimes/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-esdk" -version = "1.1.0" +version = "1.1.1" edition = "2021" rust-version = "1.81.0" keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] @@ -16,7 +16,7 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -aws-config = "1.6.2" +aws-config = "1.6.3" aws-lc-rs = "=1.13.1" aws-lc-sys = "=0.29.0" aws-sdk-dynamodb = "1.73.0" @@ -29,8 +29,8 @@ dafny_runtime = { path = "../../../mpl/smithy-dafny/TestModels/dafny-dependencie dashmap = "6.1.0" pem = "3.0.5" rand = "0.9.1" -tokio = {version = "1.45.0", features = ["full"] } -uuid = { version = "1.16.0", features = ["v4"] } +tokio = {version = "1.45.1", features = ["full"] } +uuid = { version = "1.17.0", features = ["v4"] } [[example]] name = "main" diff --git a/TestVectors/runtimes/rust/Cargo.toml b/TestVectors/runtimes/rust/Cargo.toml index f8925df0f..607fdd42f 100644 --- a/TestVectors/runtimes/rust/Cargo.toml +++ b/TestVectors/runtimes/rust/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" wrapped-client = [] [dependencies] -aws-config = "1.6.2" +aws-config = "1.6.3" aws-lc-rs = "=1.13.1" aws-lc-sys = "=0.29.0" aws-sdk-dynamodb = "1.73.0" @@ -27,8 +27,8 @@ dafny_runtime = { path = "../../../mpl/smithy-dafny/TestModels/dafny-dependencie dashmap = "6.1.0" pem = "3.0.5" rand = "0.9.1" -tokio = {version = "1.45.0", features = ["full"] } -uuid = { version = "1.16.0", features = ["v4"] } +tokio = {version = "1.45.1", features = ["full"] } +uuid = { version = "1.17.0", features = ["v4"] } ring = "=0.17.14" [dev-dependencies] diff --git a/mpl b/mpl index 571e3c564..e810e7da1 160000 --- a/mpl +++ b/mpl @@ -1 +1 @@ -Subproject commit 571e3c564f1989e3c3df1fd765f4939326bc0893 +Subproject commit e810e7da19c5242435eb8b9c2a922c56d3a6a966 diff --git a/releases/rust/esdk/Cargo.toml b/releases/rust/esdk/Cargo.toml index c41e16828..45ee94c93 100644 --- a/releases/rust/esdk/Cargo.toml +++ b/releases/rust/esdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-esdk" -version = "1.1.0" +version = "1.1.1" edition = "2021" rust-version = "1.81.0" keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"] @@ -16,7 +16,7 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -aws-config = "1.6.2" +aws-config = "1.6.3" aws-lc-rs = "=1.13.1" aws-lc-sys = "=0.29.0" aws-sdk-dynamodb = "1.73.0" @@ -25,12 +25,12 @@ aws-smithy-runtime-api = {version = "1.8.0", features = ["client"] } aws-smithy-types = "1.3.1" chrono = "0.4.41" cpu-time = "1.0.0" -dafny-runtime = { version = "0.3.0", features = ["sync", "small-int"] } +dafny-runtime = { version = "0.3.1", features = ["sync", "small-int"] } dashmap = "6.1.0" pem = "3.0.5" rand = "0.9.1" -tokio = {version = "1.45.0", features = ["full"] } -uuid = { version = "1.16.0", features = ["v4"] } +tokio = {version = "1.45.1", features = ["full"] } +uuid = { version = "1.17.0", features = ["v4"] } [[example]] name = "main" diff --git a/releases/rust/esdk/src/implementation_from_dafny.rs b/releases/rust/esdk/src/implementation_from_dafny.rs index 68bc2a9f1..4016c05ba 100644 --- a/releases/rust/esdk/src/implementation_from_dafny.rs +++ b/releases/rust/esdk/src/implementation_from_dafny.rs @@ -80184,7 +80184,7 @@ pub mod _JSON_Compile { } else { let mut c: u16 = str.get(&(start.clone() + int!(1))); if c == DafnyCharUTF16(117 as u16).0 as u16 { - if !(start.clone() + int!(6) < str.cardinality()) { + if str.cardinality() < start.clone() + int!(6) { return Arc::new(Result::, Arc>::Failure { error: Arc::new(DeserializationError::EscapeAtEOS {}) }); @@ -82966,14 +82966,14 @@ pub mod _JSON_Compile { pub fn EscapeUnicode(c: u16) -> Sequence { let mut sStr: Sequence = crate::implementation_from_dafny::_JSON_Compile::_Utils_Compile::_Str_Compile::_default::OfNat(&int!((&c).clone()), &int!(16)); let mut s: Sequence = crate::implementation_from_dafny::_UnicodeStrings_Compile::_default::ASCIIToUTF16(&sStr); - s.concat(&({ - let _initializer = { - Arc::new(move |_v0: &DafnyInt| -> u16{ - DafnyCharUTF16(32 as u16).0 as u16 - }) - }; - integer_range(Zero::zero(), int!(4) - s.cardinality()).map(move |i| _initializer(&i)).collect::>() - })) + ({ + let _initializer = { + Arc::new(move |_v0: &DafnyInt| -> u16{ + DafnyCharUTF16(48 as u16).0 as u16 + }) + }; + integer_range(Zero::zero(), int!(4) - s.cardinality()).map(move |i| _initializer(&i)).collect::>() + }).concat(&s) } /// ../mpl/libraries/src/JSON/Spec.dfy(51,3) pub fn Escape(str: &Sequence, start: &nat) -> Sequence { @@ -97825,20 +97825,34 @@ pub mod _Structure_Compile { } /// ../mpl/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy(258,3) pub fn ExtractCustomEncryptionContext(encryptionContext: &BranchKeyContext) -> Arc, Arc>> { + let mut prefixKeys: Set> = (&({ + let mut encryptionContext = encryptionContext.clone(); + Arc::new(move || -> Set>{ + let mut _coll0: SetBuilder> = SetBuilder::>::new(); + for __compr_0 in (&encryptionContext.keys()).iter().cloned() { + let mut k: Sequence = __compr_0.clone(); + if encryptionContext.keys().contains(&k) && _default::ENCRYPTION_CONTEXT_PREFIX() <= k.clone() { + _coll0.add(&k) + } + } + _coll0.build() + }) + }))(); let mut encodedEncryptionContext: Set<(Arc>>, Arc>>)> = (&({ + let mut prefixKeys = prefixKeys.clone(); let mut encryptionContext = encryptionContext.clone(); Arc::new(move || -> Set<(Arc>>, Arc>>)>{ - let mut _coll0: SetBuilder<(Arc>>, Arc>>)> = SetBuilder::<(Arc>>, Arc>>)>::new(); - for __compr_0 in (&encryptionContext).keys().iter().cloned() { - let mut k: Sequence = __compr_0.clone(); - if encryptionContext.contains(&k) && _default::ENCRYPTION_CONTEXT_PREFIX() < k.clone() { - _coll0.add(&(( + let mut _coll1: SetBuilder<(Arc>>, Arc>>)> = SetBuilder::<(Arc>>, Arc>>)>::new(); + for __compr_1 in (&prefixKeys).iter().cloned() { + let mut k: Sequence = __compr_1.clone(); + if prefixKeys.contains(&k) { + _coll1.add(&(( crate::implementation_from_dafny::UTF8::_default::Encode(&k.drop(&int!((&truncate!((&_default::ENCRYPTION_CONTEXT_PREFIX().cardinality()).clone(), u32)).clone()))), crate::implementation_from_dafny::UTF8::_default::Encode(&encryptionContext.get(&k)) ))) } } - _coll0.build() + _coll1.build() }) }))(); let mut valueOrError0: Arc>> = crate::implementation_from_dafny::_Wrappers_Compile::_default::Need::>((&encodedEncryptionContext).iter().all(({ @@ -97857,14 +97871,14 @@ pub mod _Structure_Compile { value: (&({ let mut encodedEncryptionContext = encodedEncryptionContext.clone(); Arc::new(move || -> Map{ - let mut _coll1: MapBuilder = MapBuilder::::new(); - for __compr_1 in (&encodedEncryptionContext).iter().cloned() { - let mut i: (Arc>>, Arc>>) = __compr_1.clone(); + let mut _coll2: MapBuilder = MapBuilder::::new(); + for __compr_2 in (&encodedEncryptionContext).iter().cloned() { + let mut i: (Arc>>, Arc>>) = __compr_2.clone(); if encodedEncryptionContext.contains(&i) { - _coll1.add(i.0.clone().value(), i.1.clone().value()) + _coll2.add(i.0.clone().value(), i.1.clone().value()) } } - _coll1.build() + _coll2.build() }) }))() })