作为一个非密码学家,有一件事总是让我震惊:为什么使用质数如此重要?是什么让它们在密码学中如此特别?

有人能简单解释一下吗?(我知道有很多入门知识,应用密码学是圣经,但如我所说:我不打算实现我自己的加密算法,我发现的东西只是让我的大脑爆炸-请不要十页的数学公式)。


当前回答

素数主要用于密码学,因为确定一个给定的数是否是素数需要相当长的时间。对于黑客来说,如果任何算法都需要大量的时间来破解代码,那么它对他们来说就变得毫无用处

其他回答

给你的另一个资源。现在安全了!第30集(约30分钟的播客,链接到文本)讨论了密码学问题,并解释了为什么质数很重要。

我认为在密码学中重要的不是质数本身,而是质因数分解问题的难点

假设你有一个非常非常大的整数,已知是两个质数m和n的乘积,要找出m和n是什么并不容易。RSA等算法就是基于这个事实。

顺便说一下,有一篇发表的算法论文可以在可接受的时间内使用量子计算机“解决”这个质因数分解问题。因此,当量子计算机问世时,新的密码学算法可能不再依赖质因数分解的“困难”:)

有一些很好的资源可以加强加密。这里有一个:

http://research.microsoft.com/en-us/groups/crypto/firstcrypto.aspx

从那一页开始:

In the most commonly used public-key cryptography system, invented by Ron Rivest, Adi Shamir, and Len Adleman in 1977, both the public and the private keys are derived from a pair of large prime numbers according to a relatively simple mathematical formula. In theory, it might be possible to derive the private key from the public key by working the formula backwards. But only the product of the large prime numbers is public, and factoring numbers of that size into primes is so hard that even the most powerful supercomputers in the world cant break an ordinary public key.

布鲁斯·施奈尔的《应用密码学》是另一本。我强烈推荐这本书;读起来很有趣。

我不是数学家或密码学家,所以这里有一个外行的观察(没有花哨的方程,抱歉)。

这整个线程充满了关于如何在密码学中使用质数的解释,很难在这个线程中找到任何人以简单的方式解释为什么使用质数…很可能是因为每个人都认为这些知识是理所当然的。

只有从外部看问题才能产生这样的反应;但是如果他们使用两个质数的和,为什么不创建一个列表,列出任何两个质数可以产生的所有可能的和呢?

在这个网站上有一个455,042,511个质数的列表,其中最高的质数是9,987,500,000(10位数字)。 已知的最大素数(截至2015年2月)是2的257,885,161 - 1次方,即17,425,170位数字。这意味着保留所有已知质数的列表是没有意义的,更不用说所有它们可能的和了。取一个数并检查它是否是质数更容易。

计算大质数本身就是一项艰巨的任务,所以密码学家和数学家都会说,反向计算两个相互相乘的质数已经足够困难了……今天。

最基本和一般的解释:密码学都是关于数论的,所有的整数(除了0和1)都是由质数组成的,所以你在数论中要处理很多质数。

More specifically, some important cryptographic algorithms such as RSA critically depend on the fact that prime factorization of large numbers takes a long time. Basically you have a "public key" consisting of a product of two large primes used to encrypt a message, and a "secret key" consisting of those two primes used to decrypt the message. You can make the public key public, and everyone can use it to encrypt messages to you, but only you know the prime factors and can decrypt the messages. Everyone else would have to factor the number, which takes too long to be practical, given the current state of the art of number theory.