Skip to content
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
8 changes: 4 additions & 4 deletions AwsEncryptionSDK/runtimes/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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"
Expand All @@ -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"
6 changes: 3 additions & 3 deletions TestVectors/runtimes/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion mpl
Submodule mpl updated from 571e3c to e810e7
10 changes: 5 additions & 5 deletions releases/rust/esdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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"
Expand All @@ -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"
54 changes: 34 additions & 20 deletions releases/rust/esdk/src/implementation_from_dafny.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Sequence<u16>, Arc<DeserializationError>>::Failure {
error: Arc::new(DeserializationError::EscapeAtEOS {})
});
Expand Down Expand Up @@ -82966,14 +82966,14 @@ pub mod _JSON_Compile {
pub fn EscapeUnicode(c: u16) -> Sequence<u16> {
let mut sStr: Sequence<DafnyCharUTF16> = crate::implementation_from_dafny::_JSON_Compile::_Utils_Compile::_Str_Compile::_default::OfNat(&int!((&c).clone()), &int!(16));
let mut s: Sequence<u16> = 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::<Sequence<_>>()
}))
({
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::<Sequence<_>>()
}).concat(&s)
}
/// ../mpl/libraries/src/JSON/Spec.dfy(51,3)
pub fn Escape(str: &Sequence<u16>, start: &nat) -> Sequence<u16> {
Expand Down Expand Up @@ -97825,20 +97825,34 @@ pub mod _Structure_Compile {
}
/// ../mpl/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy(258,3)
pub fn ExtractCustomEncryptionContext(encryptionContext: &BranchKeyContext) -> Arc<Result<Map<ValidUTF8Bytes, ValidUTF8Bytes>, Arc<Error>>> {
let mut prefixKeys: Set<Sequence<DafnyCharUTF16>> = (&({
let mut encryptionContext = encryptionContext.clone();
Arc::new(move || -> Set<Sequence<DafnyCharUTF16>>{
let mut _coll0: SetBuilder<Sequence<DafnyCharUTF16>> = SetBuilder::<Sequence<DafnyCharUTF16>>::new();
for __compr_0 in (&encryptionContext.keys()).iter().cloned() {
let mut k: Sequence<DafnyCharUTF16> = __compr_0.clone();
if encryptionContext.keys().contains(&k) && _default::ENCRYPTION_CONTEXT_PREFIX() <= k.clone() {
_coll0.add(&k)
}
}
_coll0.build()
})
}))();
let mut encodedEncryptionContext: Set<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)> = (&({
let mut prefixKeys = prefixKeys.clone();
let mut encryptionContext = encryptionContext.clone();
Arc::new(move || -> Set<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)>{
let mut _coll0: SetBuilder<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)> = SetBuilder::<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)>::new();
for __compr_0 in (&encryptionContext).keys().iter().cloned() {
let mut k: Sequence<DafnyCharUTF16> = __compr_0.clone();
if encryptionContext.contains(&k) && _default::ENCRYPTION_CONTEXT_PREFIX() < k.clone() {
_coll0.add(&((
let mut _coll1: SetBuilder<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)> = SetBuilder::<(Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>)>::new();
for __compr_1 in (&prefixKeys).iter().cloned() {
let mut k: Sequence<DafnyCharUTF16> = __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<Outcome<Arc<Error>>> = crate::implementation_from_dafny::_Wrappers_Compile::_default::Need::<Arc<Error>>((&encodedEncryptionContext).iter().all(({
Expand All @@ -97857,14 +97871,14 @@ pub mod _Structure_Compile {
value: (&({
let mut encodedEncryptionContext = encodedEncryptionContext.clone();
Arc::new(move || -> Map<ValidUTF8Bytes, ValidUTF8Bytes>{
let mut _coll1: MapBuilder<ValidUTF8Bytes, ValidUTF8Bytes> = MapBuilder::<ValidUTF8Bytes, ValidUTF8Bytes>::new();
for __compr_1 in (&encodedEncryptionContext).iter().cloned() {
let mut i: (Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>) = __compr_1.clone();
let mut _coll2: MapBuilder<ValidUTF8Bytes, ValidUTF8Bytes> = MapBuilder::<ValidUTF8Bytes, ValidUTF8Bytes>::new();
for __compr_2 in (&encodedEncryptionContext).iter().cloned() {
let mut i: (Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>, Arc<Result<ValidUTF8Bytes, Sequence<DafnyCharUTF16>>>) = __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()
})
}))()
})
Expand Down