0

我使用 SEAL 2.3.1,这是我的参数设置:

seal::EncryptionParameters parms;
parms.set_poly_modulus("1x^2048 + 1"); // n = 2048
parms.set_coeff_modulus(coeff_modulus_128(2048)); // q = 54-bit prime
parms.set_plain_modulus(1 << 8); // t = 256

seal::SEALContext context(parms);

还有一些Ciphertext encrypted1;持有数字 5。手册说可以使用 seal::Simulator 类来读取噪声预算,而无需密钥。我发现的唯一东西就是simulator.h文件中的这个。

/**
Creates a simulation of a ciphertext encrypted with the specified encryption 
parameters and given invariant noise budget. The given noise budget must be 
at least zero, and at most the significant bit count of the coefficient 
modulus minus two.

@param[in] parms The encryption parameters
@param[in] noise_budget The invariant noise budget of the created ciphertext
@param[in] ciphertext_size The size of the created ciphertext
@throws std::invalid_argument if ciphertext_size is less than 2
@throws std::invalid_argument if noise_budget is not in the valid range
*/
Simulation(const EncryptionParameters &parms, int ciphertext_size, 
            int noise_budget);

我可以用其他一些设置它Ciphertext encrypted2

seal::Simulation(parms, encrypted2.size(), (context.total_coeff_modulus().significant_bit_count() - log2(context.poly_modulus().coeff_count() - 1) - log2(context.plain_modulus().value()));

但是使用它只会创建一个模拟的密文,而与实际的encrypted1密文噪声预算没有任何真正的联系。

有没有办法在encrypted1没有密钥的情况下估算噪声预算?当我或其他人对外部存储的密文(例如在云数据库中)进行一些计算并且需要在不泄露密钥的情况下检查噪声预算服务器端时,这种情况很重要。

4

1 回答 1

1

该类Simulation旨在估计各种操作中的噪声预算消耗,以便这些操作实际上不必在真实数据上执行。此外,它使用启发式上限估计噪声消耗,即它很可能高估了噪声消耗,并且当计算更复杂时,这种影响变得更加明显,有时会导致对噪声消耗的巨大高估。当然,这个想法是,如果根据模拟器工作,计算就可以保证工作。一个典型的用法Simulation是通过ChooserPoly(和相关的)类;SEALExamples/main.cpp这在SEAL 版本 < 3.0的示例之一中得到了证明。

如果不知道密文是如何产生的,就不可能知道或估计密文中的噪声。因此,如果我给你一个密文而没有告诉你任何其他内容(加密参数除外),那么除非你知道密钥,否则你不应该知道任何关于噪声预算的信息。我同意在某些情况下,让某人立即知道密文是否仍可用于进一步计算可能很重要,但如果没有一些外部机制,这是不可能的。

于 2018-10-18T04:58:04.780 回答