Skip to content

Commit

Permalink
Merge pull request #17 from zama-ai/feature/optimize-perf-new-key-params
Browse files Browse the repository at this point in the history
feature: update keygen params to prioritize perf over size (size is d…
  • Loading branch information
leventdem authored Sep 21, 2023
2 parents 576fee8 + bc19f59 commit 27b0690
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/gen_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
// All rights reserved.

use tfhe::{
generate_keys,
shortint::parameters::parameters_compact_pk::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS,
ClientKey, CompactPublicKey, ConfigBuilder, ServerKey,
generate_keys, shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS, ClientKey,
CompactPublicKey, ConfigBuilder, ServerKey,
};

pub fn gen_keys() -> (ClientKey, ServerKey, CompactPublicKey) {
let config = ConfigBuilder::all_disabled()
.enable_custom_integers(PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS, None)
.enable_custom_integers(PARAM_MESSAGE_2_CARRY_2_KS_PBS, None)
.build();
let (cks, sks) = generate_keys(config);
let pks = CompactPublicKey::new(&cks);
Expand Down

0 comments on commit 27b0690

Please sign in to comment.