# How secure is 256 bit security?

## Метаданные

- **Канал:** 3Blue1Brown
- **YouTube:** https://www.youtube.com/watch?v=S9JGmA5_unY
- **Дата:** 08.07.2017
- **Длительность:** 5:06
- **Просмотры:** 3,602,352
- **Источник:** https://ekstraktznaniy.ru/video/16278

## Описание

How hard is it to find a 256-bit hash just by guessing and checking?
Help fund future projects: https://www.patreon.com/3blue1brown
An equally valuable form of support is to simply share some of the videos.
Home page: https://www.3blue1brown.com/

Several people have commented about how 2^256 would be the maximum number of attempts, not the average.  This depends on the thing being attempted.  If it's guessing a private key, you are correct, but for something like guessing which input to a hash function gives the desired output (as in bitcoin mining, for example), which is the kind of thing I had in mind here, 2^256 would indeed be the average number of attempts needed, at least for a true cryptographic hash function.  Think of rolling a die until you get a 6, how many rolls do you need to make, on average?

Music by Vince Rubinetti:
https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown

Thanks to these viewers for their contributions to translations
Dutch: @bvdeijzen
Hebr

## Транскрипт

### Segment 1 (00:00 - 05:00) []

in the main video on cryptocurrencies I made two references to situations where in order to break a given piece of security you would have to guess a specific string of 256 bits one of these was in the context of digital signatures and the other a cryptographic hash function for example if you want to find a message whose sha 256 hash is some specific string of 256 bits you have no better method than to just guess and check random messages and this would require on average 2 to the 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 to 256 is the same as 2 to 32 multiplied by itself 8 times 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 headline so all we need to do is appreciate what multiplying 4 billion times itself eight successive times really feels like as many of you know the GPU on your computer can let you run a whole bunch of computations in parallel incredibly quickly so if you were to specially program a GPU to run a cryptographic hash function over and over a really good one might be able to do a little less than a billion hashes per second and let's say that you just take a bunch of those and cram your computer full of extra gpus so that your computer can run 4 billion hashes per second so the first 4 billion here is going to represent the number of hashes per second per computer now picture 4 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 singled digigit millions in reality most of those servers are going to be much less powerful than our imagined GPU packed machine but let's say that Google replaced all of its millions of servers with a machine like this then 4 billion machines would mean about a thousand copies of this souped up Google let's call that one kilog Google worth of computing power there's about 7. 3 billion people on Earth so next Imagine giving a little over half of every individual on Earth their own personal killer Google Now imagine 4 billion copies of this Earth 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% of every star in the galaxy having a copy of Earth where half the people on that Earth have their own personal killer Google next try to imagine 4 billion copies of the Milky Way and we're going to call this your Giga Galactic supercomputer running about 2 to the 160 gu every second now 4 billion seconds that's about 126. 80 7 billion years which is about 37 times the age of the universe so even if you were to have your GPU packed kilog Google perp person multiplanetary Giga Galactic computer guessing numbers for 37 times the age of the universe it would still only have a 1 in4 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 guess and check at a rate of about 5 billion hashes per second that corresponds to 1/3 of what I just described as a kilog gooogle this is not because there are actually billions of GPU packed machines out there but because miners actually use something that's about a thousand times better than a GPU application specific integrated circuits these are pieces of hard Ware specifically designed for Bitcoin mining for running a bunch of shot 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 this channel recently surpassed 2 to the 18th subscribers and to engage a little more with some sub portion of those two to the 18 people I'm going to do a Q& A session I've left a link in the description to a Reddit thread where you can post questions and upload the ones that 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
