Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(zk): add a proof compat test between x86_64 and wasm #1750

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

nsarlin-zama
Copy link
Contributor

closes: https://github.com/zama-ai/tfhe-rs-internal/issues/810

PR content/description

This PR adds a test that:

  • generates a crs and public key in rust
  • load them in js and generate a proven ct list
  • verify the proof in rust

This is done to validate proof compatibility between wasm (32b) and x86_64

@cla-bot cla-bot bot added the cla-signed label Nov 4, 2024
@nsarlin-zama nsarlin-zama force-pushed the ns/zk_test_wasm_x86 branch 4 times, most recently from 3614558 to 1155d9e Compare November 5, 2024 10:13
Copy link
Contributor

@soonum soonum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. Just small comment.

@nsarlin-zama nsarlin-zama merged commit 6ee3eb1 into main Nov 5, 2024
87 checks passed
@nsarlin-zama nsarlin-zama deleted the ns/zk_test_wasm_x86 branch November 5, 2024 16:07
@@ -7,5 +7,5 @@
"test": "node --test --test-reporter=tap"
},
"author": "",
"license": "ISC"
"license": "BSD-3-Clause"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BSD-3-Clause-Clear actually, not the same as the BSD 3 Clause

},
"type": "commonjs",
"author": "",
"license": "BSD-3-Clause",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here

@@ -10,7 +10,7 @@
"check-format": "prettier . --check"
},
"author": "",
"license": "ISC",
"license": "BSD-3-Clause",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well

Comment on lines +21 to +23
let config = ConfigBuilder::default().build();
let client_key = ClientKey::generate(config);
let pub_key = CompactPublicKey::new(&client_key);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not the Blockchain config

see the test_proven_compact_list_with_casting

for config

Comment on lines +20 to +21

builder.push_u8(0xff);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt


const encrypted = builder.build_with_proof_packed(
publicParams,
new Uint8Array(),
Copy link
Member

@IceTDrinker IceTDrinker Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use a metadata array maybe ?

need the same on the rust side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants