v0.2.6-pre.016-fix.001

This commit is contained in:
2026-08-22 08:24:57 +02:00
parent 92a2c4fff3
commit 738b340cc7
3 changed files with 64 additions and 3 deletions

View File

@@ -911,7 +911,7 @@ async fn rewrap_slot(
kdf.clone(),
crate::WalletKeyWrapV2::new_internal(nonce, std::vec![0_u8; crate::SECRET_KEY_BYTES + crate::KSPWALLET_V2_AEAD_TAG_BYTES]),
);
let aad = crate::slot_aad(envelope, &provisional);
let aad = crate::slot_aad_v2(envelope, &provisional);
let wrapped = match crate::wrap_key(&derived, capability_key, &nonce, aad.as_slice()) {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => return std::result::Result::Err(error),
@@ -1005,7 +1005,7 @@ async fn seal_view_slot(
material.kdf.clone(),
crate::WalletKeyWrapV2::new_internal(material.wrap_nonce, std::vec![0_u8; crate::SECRET_KEY_BYTES + crate::KSPWALLET_V2_AEAD_TAG_BYTES]),
);
let aad = crate::slot_aad(envelope, &provisional_slot);
let aad = crate::slot_aad_v2(envelope, &provisional_slot);
let wrapped_result = crate::wrap_key(&derived, metadata_key, &material.wrap_nonce, aad.as_slice());
let wrapped = match wrapped_result {
std::result::Result::Ok(value) => value,