Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f9f7851
chore: incremental
jot2re May 11, 2026
5afff38
refactor: more changes to streamline variables
jot2re May 12, 2026
c2e1c31
refactor: change to flow
jot2re May 12, 2026
ff7744d
test: removed unneeded tests
jot2re May 12, 2026
bf50d1e
chore: handled small claude review findings
jot2re May 12, 2026
f457e0d
feat: initial backwards comp addition
jot2re May 12, 2026
210453a
chore: updated backwards compatibility tests
jot2re May 12, 2026
f8140ae
fix: broken test
jot2re May 12, 2026
e2634cc
docs: enhanced details on backup
jot2re May 12, 2026
22e1be2
chore: added bound check to encryption
jot2re May 12, 2026
eb74a55
chore: self review
jot2re May 12, 2026
dc5a8fb
Merge branch 'main' into tore/chore/3025/backup-sec-findings
jot2re May 12, 2026
f48a0bb
chore: revert change
jot2re May 12, 2026
fe68d6e
test: added tests
jot2re May 13, 2026
4611416
chore: self review changes
jot2re May 13, 2026
30fe6a4
Update docs/guides/backup.md
jot2re May 15, 2026
28145a1
Update docs/guides/backup.md
jot2re May 15, 2026
34b6082
docs: updated docs according to review
jot2re May 15, 2026
47ea306
chore: handled copilot's review
jot2re May 15, 2026
c4ffc72
chore: setup new backwards compatibility tests
jot2re May 15, 2026
45c9197
chore: added missing files
jot2re May 15, 2026
c501fcb
Merge branch 'tore/chore/new-backwards-tests' into tore/chore/3025/ba…
jot2re May 15, 2026
3d07acf
chore: updated backwards files
jot2re May 15, 2026
67f3cb8
test: removed unneeded test
jot2re May 15, 2026
76bc8f8
Merge branch 'main' into tore/chore/new-backwards-tests
dvdplm May 18, 2026
c535aa7
chore: handle copilot comments
jot2re May 19, 2026
4cb7f17
chore: regenerate
jot2re May 19, 2026
43c86df
Merge branch 'main' into tore/chore/new-backwards-tests
jot2re May 19, 2026
1dc6f4c
fix: merge conflict
jot2re May 19, 2026
1bcfe43
chore: regenerate data
jot2re May 19, 2026
865e409
fix: merge conflict
jot2re May 20, 2026
356a843
chore: update backwards comp test
jot2re May 20, 2026
bffc3a4
Update docs/guides/backup.md
jot2re May 20, 2026
cdf4ec6
test: added tests requested by David
jot2re May 20, 2026
721414c
fix: lint
jot2re May 20, 2026
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
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
46 changes: 23 additions & 23 deletions backward-compatibility/generate-v0.14.0/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions backward-compatibility/generate-v0.14.0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ license = "BSD-3-Clause-Clear"
[dependencies]
# Import the base backward-compatibility crate for shared types and utilities
backward-compatibility = { path = ".." }
bc2wrap = { git = "https://github.com/zama-ai/kms.git", package = "bc2wrap", rev = "3eb3862" }
bc2wrap = { git = "https://github.com/zama-ai/kms.git", package = "bc2wrap", rev = "865e4091da5d663dec82c62cca3f2a0aad83939a" }

# NOTE: Some dependencies below are duplicated from ../Cargo.toml
# This is intentional - these crates are excluded from the workspace for isolation.
# Each generator may need different versions to match its target KMS version.

# All dependencies below target tag v0.14.0-0 (for now just using a commit from main until tag is made).
kms_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "kms", rev = "3eb3862"}
kms_grpc_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "kms-grpc", rev = "3eb3862"}
algebra_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-algebra", default-features = false, rev = "3eb3862" }
threshold_execution_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-execution", default-features = false, rev = "3eb3862", features = ["testing"] }
threshold_networking_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-networking", default-features = false, rev = "3eb3862" }
threshold_types_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-types", default-features = false, rev = "3eb3862" }
kms_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "kms", rev = "865e4091da5d663dec82c62cca3f2a0aad83939a"}
kms_grpc_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "kms-grpc", rev = "865e4091da5d663dec82c62cca3f2a0aad83939a"}
algebra_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-algebra", default-features = false, rev = "865e4091da5d663dec82c62cca3f2a0aad83939a" }
threshold_execution_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-execution", default-features = false, rev = "865e4091da5d663dec82c62cca3f2a0aad83939a", features = ["testing"] }
threshold_networking_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-networking", default-features = false, rev = "865e4091da5d663dec82c62cca3f2a0aad83939a" }
threshold_types_0_14_0 = { git = "https://github.com/zama-ai/kms.git", package = "threshold-types", default-features = false, rev = "865e4091da5d663dec82c62cca3f2a0aad83939a" }
#error-utils_0_14_0 = { path = "./core/error-utils", default-features = false }
#thread-handles_0_14_0 = { path = "./core/thread-handles" }

Expand Down
10 changes: 3 additions & 7 deletions backward-compatibility/generate-v0.14.0/src/data_0_14.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ impl KmsV0_14_0 {
let (custodian_pk, _) = gen_sig_keys(&mut rng);
let backup_material = BackupMaterial {
backup_id,
mpc_context_id: kms_grpc_0_14_0::ContextId::from_bytes([9u8; 32]),
custodian_pk,
custodian_role: cus_role,
operator_pk: operator_pk.clone(),
Expand Down Expand Up @@ -1109,10 +1110,8 @@ impl KmsV0_14_0 {

fn gen_internal_recovery_request(dir: &PathBuf) -> TestMetadataKMS {
let mut rng = AesRng::seed_from_u64(INTERNAL_RECOVERY_REQUEST_TEST.state);
let backup_id: RequestId = RequestId::new_random(&mut rng);
let mut encryption = Encryption::new(PkeSchemeType::MlKem512, &mut rng);
let (_dec_key, enc_key) = encryption.keygen().unwrap();
let (verf_key, _) = gen_sig_keys(&mut rng);
let mut cts = BTreeMap::new();
for role_j in 1..=INTERNAL_RECOVERY_REQUEST_TEST.amount {
let cur_role = Role::indexed_from_one(role_j as usize);
Expand All @@ -1125,8 +1124,7 @@ impl KmsV0_14_0 {
};
cts.insert(cur_role, InnerOperatorBackupOutput { signcryption });
}
let recovery_material =
InternalRecoveryRequest::new(enc_key, cts, backup_id, verf_key).unwrap();
let recovery_material = InternalRecoveryRequest::new(enc_key, cts).unwrap();
store_versioned_test!(
&recovery_material,
dir,
Expand Down Expand Up @@ -1380,7 +1378,6 @@ impl KmsV0_14_0 {

fn gen_internal_cus_rec_out(dir: &PathBuf) -> TestMetadataKMS {
let mut rng = AesRng::seed_from_u64(INTERNAL_CUS_REC_OUT_TEST.state);
let (operator_verification_key, _) = gen_sig_keys(&mut rng);
let mut buf = [0u8; 100];
rng.fill_bytes(&mut buf);
let signcryption = UnifiedSigncryption {
Expand All @@ -1391,8 +1388,6 @@ impl KmsV0_14_0 {
let icro = InternalCustodianRecoveryOutput {
signcryption,
custodian_role: Role::indexed_from_one(2),
operator_verification_key,
mpc_context_id: RequestId::from_bytes(INTERNAL_CUS_REC_OUT_TEST.mpc_context_id),
};
store_versioned_test!(&icro, dir, &INTERNAL_CUS_REC_OUT_TEST.test_filename);
TestMetadataKMS::InternalCustodianRecoveryOutput(INTERNAL_CUS_REC_OUT_TEST)
Expand Down Expand Up @@ -1439,6 +1434,7 @@ impl KmsV0_14_0 {
&mut rng,
&OPERATOR_BACKUP_OUTPUT_TEST.plaintext,
RequestId::from_bytes(OPERATOR_BACKUP_OUTPUT_TEST.backup_id),
kms_grpc_0_14_0::ContextId::from_bytes([9u8; 32]),
)
.unwrap()
.ct_shares[&Role::indexed_from_one(1)];
Expand Down
Loading
Loading