/* tslint:disable */ /* eslint-disable */ /** * A function to encrypt a u64 value using BFV and default params. * * # Arguments * * * `data` - The data to encrypt - must be a u64 * * `public_key` - The public key to be used for encryption * * `degree` - Polynomial degree for BFV parameters * * `plaintext_modulus` - Plaintext modulus for BFV parameters * * `moduli` - Modulus for BFV parameters * * # Returns * * Returns a `Result, JsValue>` containing the encrypted data and any errors. * * # Panics * * Panics if the data cannot be encrypted */ export function bfv_encrypt_number(data: bigint, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array; /** * A function to encrypt a Vec value using BFV and default params. * * # Arguments * * * `data` - The data to encrypt - must be a Vec * * `public_key` - The public key to be used for encryption * * `degree` - Polynomial degree for BFV parameters * * `plaintext_modulus` - Plaintext modulus for BFV parameters * * `moduli` - Modulus for BFV parameters * * # Returns * * Returns a `Result, JsValue>` containing the encrypted data and any errors. * * # Panics * * Panics if the data cannot be encrypted */ export function bfv_encrypt_vector(data: BigUint64Array, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array; /** * A function to encrypt a u64 value using BFV and default params and * generate circuit inputs for Greco * * # Arguments * * * `data` - The data to encrypt - must be a u64 * * `public_key` - The public key to be used for encryption * * `degree` - Polynomial degree for BFV parameters * * `plaintext_modulus` - Plaintext modulus for BFV parameters * * `moduli` - Modulus for BFV parameters * * # Returns * * Returns a `Result, JsValue>` containing the encrypted data, circuit inputs and any errors. * * # Panics * * Panics if the data cannot be encrypted */ export function bfv_verifiable_encrypt_number(data: bigint, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): any[]; /** * A function to encrypt a Vec value using BFV and default params and * generate circuit inputs for Greco * * # Arguments * * * `data` - The data to encrypt - must be a Vec * * `public_key` - The public key to be used for encryption * * `degree` - Polynomial degree for BFV parameters * * `plaintext_modulus` - Plaintext modulus for BFV parameters * * `moduli` - Modulus for BFV parameters * * # Returns * * Returns a `Result, JsValue>` containing the encrypted data, circuit inputs and any errors. * * # Panics * * Panics if the data cannot be encrypted */ export function bfv_verifiable_encrypt_vector(data: BigUint64Array, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): any[]; /** * Compute the SAFE commitment for serialized BFV ciphertext bytes. */ export function compute_ct_commitment(ciphertext: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array; /** * A function to compute the public key commitment for a given public key. * * # Arguments * * * `public_key` - The public key to compute the commitment for * * # Returns * Returns a `Result, JsValue>` containing the commitment and any errors. * * # Panics * * Panics if the public key cannot be computed */ export function compute_pk_commitment(public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array; /** * Generate a public key from JavaScript. */ export function generate_public_key(degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array; /** * Retrieves a BFV parameter set by name. * * # Parameters * * `name` - Parameter set identifier (e.g., "SECURE_THRESHOLD_8192") * * # Returns * A JavaScript object with the following structure: * ```typescript * { * degree: number; // Polynomial degree (e.g., 8192) * plaintext_modulus: number; // Plaintext modulus value (e.g., 1000) * moduli: bigint[]; // Array of moduli * error1_variance: string | null; // Error variance as string or null * } * ``` * * # Errors * Returns error if the parameter set name is invalid or serialization fails. */ export function get_bfv_params(name: string): any; /** * Returns all available BFV parameter set identifiers. * * # Returns * Array of parameter set names that can be passed to `get_bfv_params()`. * Includes both production-ready sets (e.g., "SECURE_THRESHOLD_8192") and * insecure sets for testing (prefixed with "INSECURE_"). */ export function get_bfv_params_list(): string[];