- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 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 类来读取噪声预算而无需 key 。我在 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
密文噪声预算没有任何真正的联系。
有没有办法在没有 key 的情况下估算 encrypted1
的噪声预算?当我或其他人对外部存储的密文进行一些计算时,这种情况很重要,例如在云数据库中,需要在不泄露 key 的情况下检查噪声预算服务器端。
最佳答案
Simulation
类旨在估计各种操作中的噪声预算消耗,这样这些操作实际上不必在真实数据上执行。此外,它对噪声消耗使用启发式上限估计,即它很可能高估了噪声消耗,并且当计算更复杂时这种效果变得更加明显,有时会导致对噪声消耗的巨大高估。当然,这个想法是,如果根据模拟器工作,计算就可以保证工作。 Simulation
的典型用途是通过 ChooserPoly
(及相关)类;这在 SEALExamples/main.cpp
中针对 SEAL 版本 < 3.0 的示例之一进行了演示。
如果不知道密文是如何产生的,就不可能知道或估计密文中的噪声。因此,如果我给你一个密文而不告诉你任何其他信息(加密参数除外),那么除非你知道 key ,否则你不应该知道任何关于噪声预算的信息。我同意,在某些情况下,立即知道密文是否对进一步计算仍然有效可能很重要,但如果没有某种外部机制,这是不可能的。
关于c++ - 在没有 key 的情况下读取密文的剩余噪声预算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52746042/
我正在运行一个带有 while 约束的 SQL 查询,其中包含一些“id”。例如: SELECT table.id FROM TableOne table WHERE table.id IN (1,
我正在寻找在替换其中一个元素后打印元素列表的最正确方法。我可以按如下方式做,但显然很困惑。 #!/usr/bin/python import sys file = open(sys.argv[1])
这个问题在这里已经有了答案: How wide is the default `` margin? (4 个答案) How do I remove the top margin in a web
当我尝试使用命令安装 rvm 时::(I am Using UBUNTU 12.04 LTS) curl -L https://get.rvm.io | bash -s 当我尝试与简单用户相同的命令时
我使用 GOPro 工作人员 6 个月前发送给我的命令,通过终端(在 Gopro 网络上)使用 Gopro Hero3 拍摄照片/视频。有效。但是,在过去的一个月里,我一直在尝试再次执行此操作,并且不
尽管知道我不应该关闭应用程序按钮,但我仍然这样做。完成所有 Activity 后,我调用 finish() 方法,它们调用析构函数和所有内容。用户的行为也是正确的。但我想知道为什么还有 5 个打开的线
当我在 Rest Controller 中的类级别启用 @Validated spring 注释时,会生成 2 个验证上下文(每个验证上下文都有不同的前缀)。 @Validated 注释是必需的,因为
在旧的 API 中,剩余的允许容量显然作为 X-Ratelimit-Remaining 返回HTTP header 。 然而,current version's documentation对此一无所获
我一直在使用 Service Fabric 一段时间,成功构建、部署和测试了多个服务,但我刚刚完成构建的服务在部署时失败(请参阅下面的错误)。在诊断中,我尝试使用 VS 模板(没有代码更改)创建和部署
这个问题在这里已经有了答案: 关闭 12 年前。 Possible Duplicate: Progress unit in ProgressDialog 如何覆盖进度条进度消息,即 61/100 到
我正在用 Objective-C (Cocoa) 编写命令行实用程序的前端。我需要解析输出以检查不同类型的消息。有两种基本类型;信息消息和下载状态消息。信息消息始终以以下内容之一开头:INFO:、WA
我是一名优秀的程序员,十分优秀!