如何保护今日加密数据以抵抗量子攻击?

1. 引言

随着量子计算机的发展,需增强当前加密系统抵抗量子攻击的能力,避免未来的量子计算机解密当今的密文数据。在大量新闻中提及Lattice-based cryptography(基于格的密码学)。

2. 密码学及数学难题

加密机制的安全在于破解相应的数学难题非常难实现。相应的数学难题即为安全假设。若该数学难题被破解了,则相应的加密机制也被破解了。

所以,加密机制的设计难点之一就在于:寻找一个合适的未破解的数学难题,该难题应具有足够的难度,且应被广泛研究和论证过。

大量的数学难题来源于数学的一个分支学科——数论。

目前广泛使用的数学难题有:

  • Factoring,因式分解;
  • Discrete Logarithm,离散对数。

2.1 Factoring 因式分解数学难题

所谓因式分解,是指:

  • 只关心自然数:1,2,3等等。
  • x x x可被 y y y整除,即 x / y x/y x/y的结果值为一个自然数。(如, 6 6 6可被 3 3 3整除,但不能被 4 4 4整除。)
  • 素数仅能被自身和1整除。如2,3,5,7均为素数,而9不是素数因为其可被 3 3 3整除。
  • 假设 p , q p,q p,q为大的随机选择的素数,且 n = p ∗ q n=p*q n=pq
  • 因式分解难题是指:在已知 n n n的情况下,迅速找到 p , q p,q p,q值。

在过去40多年,大量的公钥加密机制是基于因式分解难题来设计的,如:RSA、the Diffie-Hellman Key Exchange、ECDH、ECDSA、Ed448、Ed25519等。这些机制在当今的很多安全应用中使用,如:Wickr、SSH、TLS、HTTPS、Bitcoin、PGP等等。

在这些机制中均提供了相应的安全证明,说明破坏机制安全性的难度 不低于 解决底层的因式分解数学难题的难度。这些安全证明为相应的密码学机制的安全性提供了足够的信心。

2.2 Discrete Logarithm 离散对数数学难题

所谓离散对数,是指:

  • 已知 g g g h h h,找到相应的 x x x,使得 h = g x h=g^x h=gx成立。

2.3 当数学难题遇到量子计算机

当存在大规模的量子计算机时,以上数学难题都将被破解。如可通过量子计算机借助Shor’s Algorithm来破解因式分解难题。同时,还有大量 在过去四十年中作为安全基石的数论数学难题 借助Grover’s Search算法 都可被量子计算机破解。
也就是说,若adversary拥有量子算力,这些安全证明都将是空洞的。

这就需要在密码学机制中引入新的数学难题,使得其面对量子算力时,仍然难以破解。

3. 抗量子攻击的数学难题

3.1 基于格的密码学

lattice-based cryptography相关概念有:

  • (1)Lattice:
    A lattice可看成是任意规律分布的 grid of points stretching out to infinity。
    以下为2个不同的2-dimensional lattice:
    在这里插入图片描述
  • (2)Vector:
    此处的vector为point的别名,而 a tuple of numbers 称为vector的坐标。如 ( 2 , 3 ) (2,3) (2,3)为某个特定的2维vector,具有2个坐标。
    lattice为均匀分布的vectors的集合。
    所有坐标值均为0的vector称为原点(origin point)。如对于3维vector,原点表示为 ( 0 , 0 , 0 ) (0,0,0) (0,0,0)
    若a vector 远离原点,则称其为 long vector。
    若a vector 离原点很近,则称其为 short vector。

Lattice为无限大的,但是计算机仅有有限的内存,所以在将其用于密码学时,需要将其进行succinct表示——如 a basis of a lattice:
A basis is a small collection of vectors that can be used to reproduce any point in the grid that forms the lattice。

以2维lattice为例,可将其看成是在平面纸上的a grid of points。

  • 首先,选择2个points,其与原点的连线不在同一直线上。如可选择 ( 2 , 0 ) (2,0) (2,0) ( 0 , 2 ) (0,2) (0,2)
  • 基于这2个原始points生成第三个point,生成的规则为:
    1)选择2个负整数,如 3 3 3 − 1 -1 1
    2)将第一个point乘以 3 3 3得到point ( 6 , 0 ) (6,0) (6,0),将第二个point乘以 − 1 -1 1得到point ( 0 , − 2 ) (0,-2) (0,2)
    3)将 ( 6 , 0 ) + ( 0 , − 2 ) (6,0)+(0,-2) (6,0)+(0,2)得到新的第三个point ( 6 , − 2 ) (6,-2) (6,2)

使用以上方式,可基于 ( 2 , 0 ) , ( 0 , 2 ) (2,0),(0,2) (2,0),(0,2)生成整个均匀分布的grid of points,即这些points的坐标 ( x , y ) (x,y) (x,y)均为偶数(将0也看成是偶数)。换句话说,the basis consisting of vectors ( 2 , 0 ) , ( 0 , 2 ) (2,0),(0,2) (2,0),(0,2) generates the lattice points with even coordinates。

其思想为,通过选择a basis,实际上选择了整个lattice——其points都可由basis中的vectors生成。最重要的是,相比于无限多的grid of points,a basis中具有有限的元素,可用计算机内存来表示。

需要注意的是,对于已知的lattice,其不只有一个basis,事实上,其可有很多basis。如 ( − 2 , 0 ) , ( 0 , − 2 ) (-2,0),(0,-2) (2,0),(0,2)或者 ( 4 , 2 ) , ( 2 , 2 ) (4,2),(2,2) (4,2),(2,2)等等,这些basis最终都生成的是完全相同的grid of points。

basis包含的是short vectors,可将其称为short basis,如图一中蓝色basis为short basis;相反,若basis中包含的为long vectors,则将其称为long basis,如图二中的绿色basis为long basis。
在这里插入图片描述
在这里插入图片描述
It turns out that short basis are much more useful than long ones when it comes to solving the types of hard lattice problems cryptographers are interested in。(事实证明,使用short basis比使用long basis,更易破解密码学中的hard lattice problems。)

何为hard lattice problem?——在lattice-based crypto,最简单的一个是 “Short Vector Problem”。

Short Vector Problem即为:

  • 已知a long basis for some lattice L L L,找到 a grid point in L L L as close as possible (but not equal to) the origin point。

初看,Short Vector Problem似乎很容易解决,但是,注意已知的basis中包含的是long vectors,所以无法立刻清楚知道如何对这些long vectors进行组合,以生成a point with only small coordinates,又名 a short vector。
而在实际密码学中使用的,都是高维lattice (如 10,000 lattice而不是此处举例的2维lattice),这就意味着,points实际具有10,000个坐标而不是2个坐标,Short Vector Problem的本质是基于basis vectors的组合,找到同时使10,000个坐标值都很小的情况,这将非常hard。即使借助量子算力,我们也不知道如何快速破解。

目前密码学家使用的两个重要的紧密关联的hard lattice problem有:

  • Short Basis Problem:即已知a long basis for some lattice L L L,找到a short basis for L L L
  • Closest Vector Problem:即已知a long basis for some lattice L L L 和 a randomly chosen challenge point P P P,找到the closest lattice point in L L L to challenge P P P

注意,以上两个hard lattice problem都是基于long basis的,若使用short basis,则即使不借助量子计算机也很容易破解。

为了抵抗量子攻击,有很多备选的hard problems,lattice-based hard problem主要有以下特点:

  • 是目前为止最易理解且广泛研究的families of hard math problems。在早至1800年初,Lattice就已被当时著名的数学家Johann Gauß研究。迄今为止,仍无有效的量子算法来破解相应的lattice难题。
  • Lattice problems 可在不同类型的cryptographic schemes中广泛替代使用。
  • Lattice-based cryptographic schemes 相关的科学研究占后量子密码学的绝大部分。

在实际构建密码学机制时,尽量使用弱的可信的假设(use the weakest, hence most plausible assumption possible)。

参考资料:

[1] Wickr 2018年 medium 博客 What is Lattice-Based Cryptography & Why You Should Care
Or how do we protect today’s encrypted information against tomorrow’s quantum attacks?

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值