diff --git a/ipa-core/src/query/runner/oprf_ipa.rs b/ipa-core/src/query/runner/oprf_ipa.rs index fa8b787d8..27d2c7938 100644 --- a/ipa-core/src/query/runner/oprf_ipa.rs +++ b/ipa-core/src/query/runner/oprf_ipa.rs @@ -147,13 +147,15 @@ where #[cfg(not(feature = "relaxed-dp"))] let padding_params = PaddingParameters::default(); match config.per_user_credit_cap { + 1 => oprf_ipa::<_, BA8, BA3, HV, BA20, 1, 256>(ctx, input, aws, dp_params, padding_params).await, + 2 | 4 => oprf_ipa::<_, BA8, BA3, HV, BA20, 2, 256>(ctx, input, aws, dp_params, padding_params).await, 8 => oprf_ipa::<_, BA8, BA3, HV, BA20, 3, 256>(ctx, input, aws, dp_params, padding_params).await, 16 => oprf_ipa::<_, BA8, BA3, HV, BA20, 4, 256>(ctx, input, aws, dp_params, padding_params).await, 32 => oprf_ipa::<_, BA8, BA3, HV, BA20, 5, 256>(ctx, input, aws, dp_params, padding_params).await, 64 => oprf_ipa::<_, BA8, BA3, HV, BA20, 6, 256>(ctx, input, aws, dp_params, padding_params).await, 128 => oprf_ipa::<_, BA8, BA3, HV, BA20, 7, 256>(ctx, input, aws, dp_params, padding_params).await, _ => panic!( - "Invalid value specified for per-user cap: {:?}. Must be one of 8, 16, 32, 64, or 128.", + "Invalid value specified for per-user cap: {:?}. Must be one of 1, 2, 4, 8, 16, 32, 64, or 128.", config.per_user_credit_cap ), } diff --git a/ipa-core/tests/compact_gate.rs b/ipa-core/tests/compact_gate.rs index 5cc83beaf..354ad438c 100644 --- a/ipa-core/tests/compact_gate.rs +++ b/ipa-core/tests/compact_gate.rs @@ -31,6 +31,21 @@ fn compact_gate_cap_8_no_window_semi_honest_encryped_input() { test_compact_gate(IpaSecurityModel::SemiHonest, 8, 0, true); } +#[test] +fn compact_gate_cap_1_no_window_semi_honest_encryped_input() { + test_compact_gate(IpaSecurityModel::SemiHonest, 1, 0, true); +} + +#[test] +fn compact_gate_cap_2_no_window_semi_honest_encryped_input() { + test_compact_gate(IpaSecurityModel::SemiHonest, 2, 0, true); +} + +#[test] +fn compact_gate_cap_4_no_window_semi_honest_encryped_input() { + test_compact_gate(IpaSecurityModel::SemiHonest, 4, 0, true); +} + #[test] fn compact_gate_cap_8_no_window_semi_honest_plaintext_input() { test_compact_gate(IpaSecurityModel::SemiHonest, 8, 0, false);