flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > Number Nerdery built with fasm

Author
Thread Post new topic Reply to topic
redsock



Joined: 09 Oct 2009
Posts: 293
Location: Australia
Recently I was explaining big integer crypto to some non-techies, trying to explain to them just how large the numbers are that are used in everyday web commerce, etc. etc ... and discovered it is near impossible to convey it properly without turning them into base 10 and doing some math ... hahah.

Anyway, stuck it here in the heap because it isn't really about programming, though every last bit that composes the page is all written in x86_64 fasm along with using various bits of my library... figured some of you might get a kick out of it.

Oh, and @revo, I specifically made a static version of the page that is just as interesting with javascript disabled (with JS enabled, it dynamically resamples all of the huge numbers and example math on every page load, so you know what you are missing Smile, I didn't actually try it with no JS though, let me know how you go)

https://2ton.com.au/rants_and_musings/number_nerdery.html

Cheers everyone!

_________________
2 Ton Digital - https://2ton.com.au/
Post 18 Mar 2018, 07:01
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1316
People are very bad at comprehending large numbers. That's the same reason they can't understand how can a "tiny" cryptographic address be "unique" (with extremely low chance of collision), same reason they don't understand just how much space there is between "objects" in the Universe (stars, planets, etc), etc. I mean, really.

It helps if you give analogies. For example, trivial stuff like:

You know a 32-bit number can represent up to 4GB of unique addressing? Now create a 4GB file. Open it in a hex editor. Appreciate its bytes (literally). It has a lot of bytes right? Try to individually look at the bytes, scroll down or whatever, it seems endless. Each byte is very important so take the time to appreciate its value.

A 64-bit number can address a file uniquely of similar imagined size, but each such byte represents 4GB of data. The entire previous 4GB file now fits in a single "byte" of the 64-bit file. So when you open such a file, and appreciate its bytes, just think each byte is 4GB. Crazy right?

Just imagine how long it would take to just "scan" such a file even at blazing fast speeds (imagine 256GB/s). 256GB/s on a full 64-bit file would take as long as scanning a 4GB file with 256 bytes per sec (most people find the latter extremely slow, it would take you like half a year). Wink

And that's only 64-bit... 128-bit would be the same, but each "byte" in that 64-bit file (meaning, a file whose size is absolutely massive already, even if each byte is a byte) represents an entire 64-bit file!! A 64-bit file may be massive but now each of its bytes is a 64-bit file itself. Wow.

But cryptos use at least 256 bits... now think about that. More intuitive right? Now in such a huge file, imagine you have to find a collision in a byte address (literally, byte) in that file. Sounds like impossible task.

Your page uses way too large numbers though. All I see is just a bunch of digits (hex or not). Laughing Maybe try with 256-bits or such?
Post 18 Mar 2018, 13:33
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16131
Location: Hyperborea
redsock wrote:
Oh, and @revo, I specifically made a static version of the page that is just as interesting with javascript disabled (with JS enabled, it dynamically resamples all of the huge numbers and example math on every page load, so you know what you are missing Smile, I didn't actually try it with no JS though, let me know how you go)
Thanks. Smile

Page works fine without JS. I think I can live without the resampling of the values. Wink
Post 19 Mar 2018, 02:35
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1258
Location: In a West End town
Furs wrote:

It helps if you give analogies. For example, trivial stuff like:

You know a 32-bit number can represent up to 4GB of unique addressing? Now create a 4GB file. Open it in a hex editor. Appreciate its bytes (literally). It has a lot of bytes right? Try to individually look at the bytes, scroll down or whatever, it seems endless. Each byte is very important so take the time to appreciate its value.

A 64-bit number can address a file uniquely of similar imagined size, but each such byte represents 4GB of data. The entire previous 4GB file now fits in a single "byte" of the 64-bit file. So when you open such a file, and appreciate its bytes, just think each byte is 4GB. Crazy right?

Just imagine how long it would take to just "scan" such a file even at blazing fast speeds (imagine 256GB/s). 256GB/s on a full 64-bit file would take as long as scanning a 4GB file with 256 bytes per sec (most people find the latter extremely slow, it would take you like half a year). Wink

And that's only 64-bit... 128-bit would be the same, but each "byte" in that 64-bit file (meaning, a file whose size is absolutely massive already, even if each byte is a byte) represents an entire 64-bit file!! A 64-bit file may be massive but now each of its bytes is a 64-bit file itself. Wow.

But cryptos use at least 256 bits... now think about that. More intuitive right? Now in such a huge file, imagine you have to find a collision in a byte address (literally, byte) in that file. Sounds like impossible task.


I loved this example. It is crazy. Allow me to use it when I find an opportunity. Wink
Post 23 Aug 2018, 14:04
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1316
Sure np, good to see at least one person liked it Smile
Post 23 Aug 2018, 15:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.