fix(zk): fix build with feature zk-pok without shortint

This commit is contained in:
Nicolas Sarlin
2024-11-07 11:59:00 +01:00
committed by Nicolas Sarlin
parent f9c4627946
commit f8bde7fbde
2 changed files with 8 additions and 0 deletions

View File

@@ -308,6 +308,9 @@ clippy_core: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),experimental,nightly-avx512 \
-p $(TFHE_SPEC) -- --no-deps -D warnings
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),zk-pok \
-p $(TFHE_SPEC) -- --no-deps -D warnings
.PHONY: clippy_boolean # Run clippy lints enabling the boolean features
clippy_boolean: install_rs_check_toolchain
@@ -323,6 +326,9 @@ clippy_shortint: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),shortint,experimental \
-p $(TFHE_SPEC) -- --no-deps -D warnings
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),zk-pok,shortint \
-p $(TFHE_SPEC) -- --no-deps -D warnings
.PHONY: clippy_integer # Run clippy lints enabling the integer features
clippy_integer: install_rs_check_toolchain

View File

@@ -2,6 +2,7 @@ use crate::conformance::ParameterSetConformant;
use crate::core_crypto::commons::math::random::BoundedDistribution;
use crate::core_crypto::prelude::*;
use crate::named::Named;
#[cfg(feature = "shortint")]
use crate::shortint::parameters::CompactPublicKeyEncryptionParameters;
use rand_core::RngCore;
use std::cmp::Ordering;
@@ -44,6 +45,7 @@ pub struct CompactPkePublicParamsConformanceParams {
}
impl CompactPkePublicParamsConformanceParams {
#[cfg(feature = "shortint")]
pub fn new<E, P: TryInto<CompactPublicKeyEncryptionParameters, Error = E>>(
value: P,
max_num_message: usize,