Encryption and HUGE numbers - Numberphile

Numberphile · Intermediate ·📰 AI News & Updates ·13y ago

Key Takeaways

Explains RSA public-key encryption using prime factors

Full Transcript

so I've got a very big number to show you today used by NatWest Bank so that you can send them your secret Bank details it starts 2 3 4 5 3 6 7 6 287 did you get that or do you want me to repeat it so this number that we are reading out is 617 digits long all banks have similar numbers when you want to send them your credit card details this is not a secret number in fact your computer will download this number when it wants to send your credit card details it's there to find this is public so this code that they use on the Internet is called RSA it's named after the three people who came up with it which who were revest Shamir Adelman can I show you how it works please all right imagine if you had a secret that you wanted to send to the bank so the bank provides you with a box and it provides you with a key to lock the box so you can put your secret inside and you can lock it and then you can send the secret to the bank that's good isn't it uh but the problem is if the bank is giving everyone one of these boxes and a key that goes with it it then that means that well one person could steal someone else's box and use the key to unlock it and read their secrets that would be terrible we can't do that so what the banks do same sort of idea but instead of giving out keys they give out padlocks so they give everyone a box if you've got a secret put it inside the box lock it not with a key but with a padlock it goes click it snaps shot once it's locked and snapped shut you don't have the padlock key so you can't reverse it you can't open it up so if someone steals your box they don't have the key Either they've got a padlock but they don't have the key to open the padlock the only person that does is the bank themselves and it's a way to send secret messages without having to send out the keys it's easy to lock the code but it's hard to unlock the code first of all I have to explain this with the smallest example I can and then I'll show you why we use that massive number let's say you're the bank and you give out two numbers they're public so everyone can know them they're not secret numbers I'm going to choose the number three and the number 10 the bank also has a secret number if this Bank secret number for now you don't know what it is no one knows what that is only the bank knows what that secret number is I had a very bad breakfast this morning so I'm going to send a message bad Chef the first thing you do if you have a message like that is to turn the letters into numbers that's quite simple a is 1 B is 2 and Z is 26 simple stuff C is 3 D is 4 now I'm going to turn it into a code and I'm going to use the number three now there are some codes that would just add three or there are some codes that would multiply by three what we're going to do is raise to the power three so we're going to cube these numbers here let's do that so I get 2 cubed which is eight 1 cubed which is 1 5 cubed is 125 and 6 cubed 216 the final step is to use the second number the number 10 I'm going to divide by 10 and I'm going to look at the remainder so if I take something like 512 when I divide by 10 there would be 51 T and then two left over that's just two five here one and four and that's your code and that's what you would send the bank or the person who's going to decode this message has a secret number now the secret number is in this example it's going to be three there's a formula to work out the secret number I'm going to gloss over that for a second but I'm going to show you what to do next to decode the message this is my code I'll write it out again I'm going to do the same thing I did before this time I'm going to use my secret number it doesn't have to be the same as three but it just happens to be the same as the three we used before but never mind it doesn't have to be but I'm going to cube again so I Cube these numbers we do like we did before we divide by 10 and find the remainder and then the decoder will turn that into letters which is B and he gets the message back again bad Chef now that's just a taste of how it works that's the process that your computer does every time you buy something on Amazon or Ebay one of the important numbers in this code was this 10 now this 10 was made by multiplying two prime numbers together 2 * 5 are prime numbers multiply them together and you get 10 now that massive number that I showed you that NatWest uses it's the same idea it's two massive prime numbers multiplied together that's what it is if you want to work out the decode key the secret key you need to know the original prime numbers now the only way a spy someone who wants to break the code could work out the original prime numbers is to take that massive number number and factorize it turn it back break it up into the original two prime numbers this is really hard so hard that it's impractical to break with modern technology the massive number I showed you was a 20148 bit number that means it's about it's about 2 to the power 2048 now about a decade ago we did manage to break 512 bit numbers we were able to take that number and factorize it into its original primes a few years ago a team of academics managed to break a 768 bit number it took this team of academics with all their resources two years to break a 768 bit key uh and they said that to break what we use now which is about 1,24 would take thousands of times longer but given that given the speed of Technology they reckon that this sort of code 1,24 bit could be broken within a few years they said they said that a few years ago so this should now start to be replaced Gmail still uses this but this should be this should be replaced and as you can see Nat West have done that other banks have done that they are now using 2004 48 bit number which again would take computers and I mean even you proper with a proper attack big computers it would still take them thousands of years to factorize that number into its original prime numbers now hidden in the details for this code is a mathematical fact that was worked out in the 17th century by Pierre def fermar uh he's famous for firma's Last Theorem well this was firma's little theorem if I take a number a whole number an integer any number call it X I'm going to raise it to a power and it's going to be a prime number so P for Prime I'm going to raise it to a power and I'm going to take away X this is a multiple of P the prime number let me let me do an example what I mean is if you took a number like like four and then I took a prime number like five and then I take away four I would get four 4^ 5 which is24 take away 4 which is 1,20 and that is a multiple of five but that would be guaranteed you're guaranteed to have a multiple of five now you can imagine that in the 17th century when firmar came up with this fact that people said well very nice mathematical fact but that's pretty useless well what use are you going to have for that and then suddenly the internet comes along and it's massively useful in fact our whole whole modern world depends on this fact so to use this code the public key has two numbers I've shown you the massively long one that NatWest uses the other number that they need which is the power that they that you have to raise uh that is not as big that is 65,536 quite a big number but when you compare it to the second number it's it's small if you're in the mood for even more about Banks and really big numbers then check out my latest video from the chemistry Channel periodic videos where we've been inside the bank of England gold bullion Vault where they have a couple of hundred billion pounds worth of gold lying around that's not something you see every day the link is here on the screen and below the video

Original Description

Banks, Facebook, Twitter and Google use epic numbers - based on prime factors - to keep our Internet secrets. This is RSA public-key encryption. More links & stuff in full description below ↓↓↓ Gold Vault: https://youtu.be/CTtf5s2HFkA This video features Dr James Grime (http://singingbanana.com/). Message from James: "Thanks to Dr Chris Hughes of the University of York who showed me how to find the RSA public key from my browser, and showed me how awesome they look when you print them out." Regarding the keys used for encryption: x, y prime Encode key E shares no factors with (x-1)(y-1) Decode key is D with E*D - 1 a multiple of (x-1)(y-1) Thanks to Drew Mokris for the animation: http://www.spinnerdisc.com/ NUMBERPHILE Website: http://www.numberphile.com/ Numberphile on Facebook: http://www.facebook.com/numberphile Numberphile tweets: https://twitter.com/numberphile Subscribe: http://bit.ly/Numberphile_Sub Videos by Brady Haran Patreon: http://www.patreon.com/numberphile Brady's videos subreddit: http://www.reddit.com/r/BradyHaran/ Brady's latest videos across all channels: http://www.bradyharanblog.com/ Sign up for (occasional) emails: http://eepurl.com/YdjL9 Numberphile T-Shirts: https://teespring.com/stores/numberphile Other merchandise: https://store.dftba.com/collections/numberphile
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Numberphile · Numberphile · 35 of 60

1 Numberphile Preview
Numberphile Preview
Numberphile
2 31 and Mersenne Primes - Numberphile
31 and Mersenne Primes - Numberphile
Numberphile
3 17 and Sudoku Clues - Numberphile
17 and Sudoku Clues - Numberphile
Numberphile
4 Root 2 - Numberphile
Root 2 - Numberphile
Numberphile
5 3/4 and Kleiber's Law - Numberphile
3/4 and Kleiber's Law - Numberphile
Numberphile
6 7 and Happy Numbers - Numberphile
7 and Happy Numbers - Numberphile
Numberphile
7 23 and Football Birthdays - Numberphile
23 and Football Birthdays - Numberphile
Numberphile
8 Googol and Googolplex - Numberphile
Googol and Googolplex - Numberphile
Numberphile
9 Special Magic Square - Numberphile
Special Magic Square - Numberphile
Numberphile
10 998,001 and its Mysterious Recurring Decimals - Numberphile
998,001 and its Mysterious Recurring Decimals - Numberphile
Numberphile
11 42 and Douglas Adams - Numberphile
42 and Douglas Adams - Numberphile
Numberphile
12 Pi and Bouncing Balls - Numberphile
Pi and Bouncing Balls - Numberphile
Numberphile
13 6,000,000 and Abel Prize - Numberphile
6,000,000 and Abel Prize - Numberphile
Numberphile
14 Sunflowers and Fibonacci - Numberphile
Sunflowers and Fibonacci - Numberphile
Numberphile
15 8848 - Numberphile
8848 - Numberphile
Numberphile
16 What is a lucky number? - Numberphile
What is a lucky number? - Numberphile
Numberphile
17 Base 60 (sexagesimal) - Numberphile
Base 60 (sexagesimal) - Numberphile
Numberphile
18 How big is a billion? - Numberphile
How big is a billion? - Numberphile
Numberphile
19 I washed my passport - Numberphile
I washed my passport - Numberphile
Numberphile
20 Golden Ratio - Making a Math Metal Anthem - Numberphile
Golden Ratio - Making a Math Metal Anthem - Numberphile
Numberphile
21 Golden Ratio Song - Numberphile
Golden Ratio Song - Numberphile
Numberphile
22 The LONGEST time - Numberphile
The LONGEST time - Numberphile
Numberphile
23 Dyscalculia - Numberphile
Dyscalculia - Numberphile
Numberphile
24 Problematic Sunflower - Numberphile
Problematic Sunflower - Numberphile
Numberphile
25 Batman Equation - Numberphile
Batman Equation - Numberphile
Numberphile
26 The Most Mathematical Flag - Numberphile
The Most Mathematical Flag - Numberphile
Numberphile
27 Did Usain Bolt REALLY run 100m in 9.63 seconds?
Did Usain Bolt REALLY run 100m in 9.63 seconds?
Numberphile
28 Brown Numbers - Numberphile
Brown Numbers - Numberphile
Numberphile
29 43,252,003,274,489,856,000 Rubik's Cube Combinations - Numberphile
43,252,003,274,489,856,000 Rubik's Cube Combinations - Numberphile
Numberphile
30 Amazing Old Calculator (Curta) - Numberphile
Amazing Old Calculator (Curta) - Numberphile
Numberphile
31 abc Conjecture - Numberphile
abc Conjecture - Numberphile
Numberphile
32 Message from Numberphile
Message from Numberphile
Numberphile
33 Keith Numbers - Numberphile
Keith Numbers - Numberphile
Numberphile
34 Tau of Phi - Numberphile
Tau of Phi - Numberphile
Numberphile
Encryption and HUGE numbers - Numberphile
Encryption and HUGE numbers - Numberphile
Numberphile
36 Kids get their money - Numberphile
Kids get their money - Numberphile
Numberphile
37 Number 1 and Benford's Law - Numberphile
Number 1 and Benford's Law - Numberphile
Numberphile
38 Brady's Videos and Benford's Law - Numberphile
Brady's Videos and Benford's Law - Numberphile
Numberphile
39 Anatomy of a Goal - Numberphile
Anatomy of a Goal - Numberphile
Numberphile
40 The problem in Good Will Hunting - Numberphile
The problem in Good Will Hunting - Numberphile
Numberphile
41 Calculating Pi with Real Pies - Numberphile
Calculating Pi with Real Pies - Numberphile
Numberphile
42 How Pi was nearly changed to 3.2 - Numberphile
How Pi was nearly changed to 3.2 - Numberphile
Numberphile
43 Pi with Pies (director's slice) - Numberphile
Pi with Pies (director's slice) - Numberphile
Numberphile
44 Problems with French Numbers - Numberphile
Problems with French Numbers - Numberphile
Numberphile
45 Statistics on Match Day - Numberphile
Statistics on Match Day - Numberphile
Numberphile
46 Squaring the Circle - Numberphile
Squaring the Circle - Numberphile
Numberphile
47 Math Jokes Explained - Numberphile
Math Jokes Explained - Numberphile
Numberphile
48 Base Number Jokes Explained - Numberphile
Base Number Jokes Explained - Numberphile
Numberphile
49 Gaps between Primes - Numberphile
Gaps between Primes - Numberphile
Numberphile
50 Mathematical Music - Numberphile Interview
Mathematical Music - Numberphile Interview
Numberphile
51 Is it Math or Maths? - Numberphile
Is it Math or Maths? - Numberphile
Numberphile
52 One minus one plus one minus one - Numberphile
One minus one plus one minus one - Numberphile
Numberphile
53 Infinity Paradoxes - Numberphile
Infinity Paradoxes - Numberphile
Numberphile
54 British Numbers confuse Americans - Numberphile
British Numbers confuse Americans - Numberphile
Numberphile
55 Can Fish Count? - Numberphile
Can Fish Count? - Numberphile
Numberphile
56 WARNING: Contains Numbers
WARNING: Contains Numbers
Numberphile
57 Fibonacci Mystery - Numberphile
Fibonacci Mystery - Numberphile
Numberphile
58 Fermat's Last Theorem - Numberphile
Fermat's Last Theorem - Numberphile
Numberphile
59 Politics and Numbers - Numberphile
Politics and Numbers - Numberphile
Numberphile
60 Sloane's Gap - Numberphile
Sloane's Gap - Numberphile
Numberphile

Related Reads

📰
What Does It Mean to Know?
Explore the meaning of knowledge in the context of AI and computer science, and how it relates to human understanding and learning.
Dev.to · JustC
📰
The Algorithm is Judging You: Why Netflix Keeps Showing You ‘The Office’ and How to Break the…
Learn how Netflix's algorithm prioritizes content and how to break its recommendations loop to discover new shows
Medium · AI
📰
The Future of AI: Trends Every Developer Should Watch
Stay ahead of the AI curve by watching emerging trends that can transform development practices and improve efficiencies
Dev.to AI
📰
Why the synthetic-data escape hatch failed and how publishers became toll collectors
Synthetic data can't replace real data at scale, forcing AI labs to pay publishers for content, a major shift in the industry
Dev.to AI
Up next
The Embarrassing Truth About Billion-Dollar AI Ideas | a16z Partner Anish Acharya
Aishwarya Srinivasan
Watch →