未登录,请登录后再发表信息
最新评论 (0)
播放视频

256位加密有多安全?

How secure is 256 bit security?

在之前加密货币的视频里
In the main video on cryptocurrencies,
我两次提到了这样的情况
I made two references to situations where, in
为了攻破一个安全系统
order to break a given piece of security,
你必须得猜对一个256
you would have to guess a specific string of
位的比特串
256 bits. One of these was in the
第一次是在电子签名的部分提到的
context of digital signatures and the other in the
第二次是在密码哈希函数的部分提到的
context of a cryptographic hash function.
比如说 假如你想找到一条信息
For example, if you want to find a message whose
让它的SHA256哈希值等于某个256位
SHA-256 hash is some specific string of 256 bits,
比特串的话 那就没有别的好办法
you have no better method than to just guess and check
你只能随机猜测并检验结果 而平均下来 这需要尝试2^256
random messages, and this would require, on average, 2^256 guesses.

Now
这个数字比我们通常
this is a number so far removed from
遇到的数都大得多
anything that we ever deal with that it
因此很难去体会
can be hard to appreciate its size.
它的规模 不过我们不妨试一试
But let’s give it a try.
2^256也就是2
2^256 is the same as 2^32,
^32和自己相乘8次
multiplied by itself 8 times.
这样想的好处在于 2^32大约是40亿
Now what’s nice about that split is that 2^32 is 4 billion.
我们起码可以想像这个数字吧
Which is at least a number we can think about, right?
就是新闻标题里会出现的那种数
It’s the kind of thing you might see in a headline.
所以我们要做的 就是去体会
So what we need to do is appreciate what multiplying
40亿连续相乘8次是怎样的概念
4 billion times itself 8 successive times really feels like.
大部分人都知道
As many of you know the GPU on
电脑里的GPU可以
your computer can let you run a whole
飞快地进行大量并行计算因此
bunch of computations in parallel incredibly quickly.
要是你专门
So if you were to specially program a
让GPU反复计算密码哈希函数
GPU to run a cryptographic hash function over and over, a
一个性能很好的GPU每秒也许能算出
really good one might be able to do a little less
接近10亿个哈希值
than a billion hashes per second.
假如你拿上一堆这样的GPU
Let’s say that you just take a bunch
全部塞进电脑里
of those and cram your computer full of extra GPUs so that your computer
让你的电脑每秒能算40亿个哈希值
can run 4 billion hashes per second.
那么最开始的40亿就代表了
So the first 4 billion here is going
每台电脑每秒算出的哈希值的数目
to represent the number of hashes per second per computer. Now,
想象一下40亿台这样满载GPU的电脑
picture four billion of these GPU-packed computers.
对比一下
For comparison, even though Google does not
虽然谷歌没有对外公布它们服务器的数量
at all make their number of servers public,
但是有估计说 大概有几百万个现实中
estimates have it somewhere in the single-digit millions.
它们
In reality, most
大部分服务器的算力 都不如我们满载GPU的电脑强
of those servers are going to be much less powerful than our imagined GPU-packed machine.
不过 我们假设谷歌把上百万
But let’s say Google replaced all of its millions
个服务器全换成这样的电脑
of servers with a machine like this.
那么40亿台电脑大概是1000个这种打了鸡血的谷歌
Then four billion machines would mean about a thousand copies of this souped-up Google.
我们就把这个算力叫做“千谷歌”吧
Let’s call that one KiloGoogle worth of computing power.
全世界的人口
There’s about 7.3
大约有73亿
billion people on Earth,
接下来 我们假设一多半的人都
so next imagine giving a little over half of every individual on Earth their own
有自己的千谷歌然后
personal KiloGoogle. Now,
想象40亿个这样的地球
imagine four billion copies of this Earth.
作为对比 银河系大约有1000到4000亿颗恒星
For comparison, the Milky Way has somewhere between 100 and 400 billion stars.
虽然我们
We don’t really know,
并不确定 但估算大致就在
but the estimates tend to be in that range.
这个范围 所以这相当于
So this would be akin to a full
银河系1%的恒星
1% of every star in the galaxy,
会有一个地球
having a copy of Earth,
并且这个地球上一半的人口都有自己的千谷歌接着
where half the people on that Earth have their own personal KiloGoogle. Next,
想象40亿个这样的银河系
try to imagine 4 billion copies of the Milky Way.
我们把它叫做 “亿万星系超级计算机”
And we’re going to call this your GigaGalactic Super Computer,
每秒能猜2^160次
running about 2^160 guesses every second.
40亿秒
Now four billion seconds?
大概是126.8年
That’s about 126.8 years.

Four billion of those?
的40亿倍
Well,
就是5070亿年
That’s 507 billion years,
差不多是宇宙年龄的37倍
which is about 37 times the age of the universe.
所以就算你有 GPU满满·
So even if you were to have your GPU-packed KiloGoogle
人手千谷歌·行星云集·亿万星系计算机
per person multiplanetary GigaGalactic computer guessing numbers for
不断地猜上37倍宇宙年龄的时间
37 times the age of the universe,
也只有40亿分之一的可能性
it would still only have a 1 in 4 billion chance
拿到正确的猜测
of finding the correct guess.
顺便一提
By the way,
目前比特币的哈希算力 把所有矿工都加起来
the state of Bitcoin hashing these days is that all of the miners put together
每秒能猜测并检验500亿亿个哈希值
guess-and-check at a rate of about five billion billion hashes per second.
这相当于是三分之一个我之前提到的千谷歌
That corresponds to one-third of what I just described as a KiloGoogle.
这并不是因为真的有几十亿
This is not because there are actually billions
台满载GPU的电脑 而是因为矿工们用的
of GPU-packed machines out there, but because miners actually use something
是比GPU好上大约1000
that’s about a thousand times better than a GPU –
倍的机器 叫做“专用集成电路”(ASIC)
Application Specific Integrated Circuits. These are pieces of hardware
这些硬件是为比特币挖矿量身定做的
specifically designed for Bitcoin mining,
别的不会 就专门会计算SHA256哈希值
for running a bunch of SHA-256 hashes and nothing else.
原来
Turns out, there’s a lot of
想要大幅提高效率
efficiency gains to be had when you throw
我们可以放弃一般的计算需求
out the need for general computation, and
而为了单单一个任务来设计集成电路
design your integrated circuits for one and only one task. Also,
还有个我觉得有点
on the topic of large powers of two
难转过弯的话题:
that I personally find it hard to get my mind around,
说到2的幂 这个Youtube频道的订阅数最近突破了2^18
this channel recently surpassed 2^18 subscribers, and
为了更好地和这2^18个人
to engage a little more with some sub-portion
中的一部分互动
of those 2^18 people,
我将要开展一个问答活动
I’m going to do a Q&A session.
我会把Reddit链接
I’ve left a link in the description to
发到视频简介里 你可以去提问
a Reddit thread where you can post questions and
也可以把你想知道答案
upload the ones you want to hear
的问题顶上去 也许在下一期视频
answers to, and probably in the next video or
或者推特之类的地方
on Twitter or something like that,
我会公布回答问题的形式
I’ll announce the format in which I’d like to give answers.
到时见
See you then.

发表评论

译制信息
视频概述
听录译者

收集自网络

翻译译者

收集自网络

审核员

自动通过审核

视频来源

https://www.youtube.com/watch?v=S9JGmA5_unY

相关推荐