CKKS – 加法与乘法
CKKS – Addition and Multiplication

原始链接: https://www.jeremykun.com/2026/10/11/ckks-addition-and-multiplication/

本教程介绍 CKKS 密文的加法与乘法(不进行重线性化)。密文是多项式对,通过与 \((1,s)\) 的点积解密。加法按分量进行;误差相加且仍保持次高斯。两个密文相乘自然产生一个三元组,通过与 \((1,s,s^2)\) 的点积解密,因为乘积展开为 \(s\) 的二次多项式。该乘积具有平方后的缩放因子、来自误差项的二次误差增长,以及与明文相关的误差。因此,后续操作需要重新缩放以恢复尺度并降低噪声,以及重线性化以回到二元组密文。代码演示了乘法和在调整后的解码尺度下的二次解密。说明讨论了误差跟踪如何依赖于取值范围、缩放因子在误差中的作用,以及乘积结构的安全性。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 CKKS – 加法与乘法 (jeremykun.com) 6 分,作者 ibobev,2 小时前 | 隐藏 | 过去 | 收藏 | 讨论 帮助 考虑申请 YC 2027 冬季批次!申请开放至 11 月 2 日。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Table of Contents

This is part of a tutorial series on the CKKS homomorphic encryption scheme.

In the last article, we introduced symmetric and public-key encryption and decryption routines, and implemented modular polynomial arithmetic (using NTTs as a black box). This article covers the addition and multiplication operations performed on ciphertexts (without relinearization).

Again, if you already know about CKKS, we are still avoiding the RNS form of the scheme and using a 64-bit modulus $Q$, which means that we’re momentarily ignoring cryptographic security.

The code for this article is in this pull request.

联系我们 contact @ memedata.com