No video

Animated Explanation of the one-time pad

  Рет қаралды 34,383

Canadian Coding

Canadian Coding

Күн бұрын

Пікірлер: 38
@breathandrelax2
@breathandrelax2 3 жыл бұрын
whoa! after searching for hours finally you made it crystal clear. thank you buddy. you the man
@kyokokirigiri166
@kyokokirigiri166 Жыл бұрын
you are amazing in teaching simple and straight to the point and making it funny at the same time. thank you for your time!
@greatonreviews
@greatonreviews 2 жыл бұрын
Amazing , super clear and precise! Thank you! :D
@maomxesoax2471
@maomxesoax2471 3 жыл бұрын
ENCRYPT: (msgcharvalue + otpcharvalue) - 1 DECRYPT: (encryptcharvalue - otpcharvalue) + 1 If a result is more than the character set length or is less than zero then mod it by character set length.
@dilshadurrahman4248
@dilshadurrahman4248 2 жыл бұрын
Nice explanation of OTP. Thanks.
@MrBitviper
@MrBitviper 2 жыл бұрын
thanks for the clear explanation. much appreciated
@NyorexDC
@NyorexDC 3 жыл бұрын
Dude I love this, thanks
@civedm
@civedm 3 жыл бұрын
I'm pretty sure the original idea of the one-time-pad didn't involve ACSII and binary. The system was such that it could be easily done on a piece of paper by hand.
@canadiancoding
@canadiancoding 3 жыл бұрын
It may not have used ASCII specifically (numbers may have been different), but it would've worked exactly the same. The ASCII version, and any other character coded system can be done on paper (I had to do that for this video actually).
@leif_____8579
@leif_____8579 2 жыл бұрын
OTP was mainly used by Secret services. Agents were given a sheet of numbers (The equivalent to the key here) with which they could decrypt secret messages.
@azuboof
@azuboof 9 ай бұрын
beautiful animations
@lucarauchenberger628
@lucarauchenberger628 3 жыл бұрын
very well explained
@handsomeman-pm9vy
@handsomeman-pm9vy Жыл бұрын
It is also the final operation in every Stream Cipher.
@mattd6085
@mattd6085 3 ай бұрын
What binary translation are you using to get your numbers? If your ASCII strings are, for example, 51 for the plain text first letter and 101 for the pad first letter, then the binary conversion will be of a differing length? You can't do XOR with differing string lengths of binary.
@canadiancoding
@canadiancoding 3 ай бұрын
This is actually a good point. I should have mentioned it during the video. If you watch the animation from 3:55 onward you will see every number is left-padded (add 0's to the left) to 8 bits. So every number is 1 byte, and if it can be stored in less bytes then it's just less efficient. This is because ASCII is a fixed-length encoding, whereas something like Unicode makes this more complicated. Hope that makes sense
@jack.p
@jack.p 25 күн бұрын
So if there was an agent in the field, they might be given a OTP in person before leaving, then if and when a message needs to be sent, they could just broadcast it publicly in complete confidence?
@canadiancoding
@canadiancoding 24 күн бұрын
Yes, so old wartime schemes you would leave with a physical ciphertext, and using that ciphertext you can just broadcast out in public over radio. Often different ciphertexts were given to people of different ranks so that messages could only be read by specific people in the field depending on the operation.
@canadiancoding
@canadiancoding 24 күн бұрын
Since this video is getting more popular, I will give people some other cryptography topics, and links that have come up in the comments: - History of OTP - It was used heavily before computers in wartime where people would be physically given a sheet of paper for the ciphertext, and then messages would be sent out over public radio frequencies to soldiers to get their orders - Crib Dragging - This is a method that allows you to break the one time pad if you know some of the contents that are in the text - Public Key cryptography; This is how all your connections on the internet are secured - Diffie Hellman is the most popular of these schemes - I have an explainer for this on my github at github.com/descent098/diffie-hellman - Post Quantum Cryptography - Lattice-based encryption - Chalk Talk is a good channel on youtube for info about this - Encodings - What we did with the binary numbers to letters is called an encoding, there are a bunch of popular ones - UTF-8; The most commonly used encoding for text these days
@JuanGerardoHernandez
@JuanGerardoHernandez 2 жыл бұрын
How Bob get the pad form Alice?
@canadiancoding
@canadiancoding 2 жыл бұрын
There are essentially an infinite number of ways to do this. These could include any form of network interaction like sending messages back and forth via WIFI, all the way to printing the details out and doing it by hand would work. That section of the protocol allows for a ton of leniency to implement however works best for you.
@BucolicLife
@BucolicLife Ай бұрын
I read on Wikipedia that it is the only encryption mechanism that is not breakable no matter what quantum computer together with any mathematical decryption algorithms is used. Is that correct? If so, then is this the ultimate encryption system?
@Descent098
@Descent098 Ай бұрын
The version I explained in my video is not quantum secure afaik. I think you could make it EFFECTIVELY quantum secure if your note is long enough, but the protocol itself is not secure against quantum attacks. There are versions of the one-time pad that could be, but they're more complicated. I think what you're referring to is when people call the one time pad a "perfectly secret" scheme. All this means is that the ciphertext we use doesn't leak any information, meaning there are no side channel attacks. This is all a fancy way to say that you can't get information AT ALL about the content you're trying to encrypt, from how you encrypted it. Other methods will use the source text to generate their encryption, and so they are not "perfect secret" schemes. I can't cite sources in a youtube comment but if you google "perfect secrecy" there is a video on khan academy, and one on wolfram U that will explain the concept well. For post-quantum security there's a good channel called Chalk Talk here on youtube that cover quantum secured approaches like lattice-based cryptography.
@canadiancoding
@canadiancoding Ай бұрын
The version I explained in my video is not quantum secure afaik. I think you could make it EFFECTIVELY quantum secure if your note is long enough, but the protocol itself is not secure against quantum attacks. There are versions of the one-time pad that could be, but they're more complicated. I think what you're referring to is when people call the one time pad a "perfectly secret" scheme. All this means is that the ciphertext we use doesn't leak any information, meaning there are no side channel attacks. This is all a fancy way to say that you can't get information AT ALL about the content you're trying to encrypt, from how you encrypted it. Other methods will use the source text to generate their encryption, and so they are not "perfect secret" schemes. I can't cite sources in a youtube comment but if you google "perfect secrecy" there is a video on khan academy, and one on wolfram U that will explain the concept well. For post-quantum security there's a good channel called Chalk Talk here on youtube that cover quantum secured approaches like lattice-based cryptography.
@funny-re1vf
@funny-re1vf 3 жыл бұрын
great video ..thank you so much
@ninmarwarda5154
@ninmarwarda5154 2 жыл бұрын
But if Eve has the pad and ciphertext then she can easily decrypt it, right? And it is usually the case that the pad and ciphertext are public, isn't it?
@canadiancoding
@canadiancoding 2 жыл бұрын
The pad in this example is typically the thing that is kept secret or is somehow obfuscated. This means the content itself can be distributed publicly without worry, and the only thing you need to keep safe is the pad. Likewise it means you can use the same pad for multiple pieces of content (VERY NOT IDEAL security wise) which means you only have to keep 1 thing private and everything else after that can just be distributed publically. Alternatively it can be distributed with some sort of encryption that then has a handshake to allow the decryption key to be distributed. For example you might distribute an encrypted pad over a public channel, but it is locked behind a 16 digit password that was transferred using something like the Diffie-Hellman key exchange (github.com/Descent098/Diffie-Hellman), or even just setup a secure connection with something like SSL (www.ssl.com/faqs/faq-what-is-ssl/) using a key exchange to distribute the pad privately.
@LLNB2196
@LLNB2196 2 жыл бұрын
Damn, I love your humor hahahah
@yojumba
@yojumba 3 жыл бұрын
Thx for the great explanation!
@war-c0mmander
@war-c0mmander 2 жыл бұрын
👍
@purple3036
@purple3036 Жыл бұрын
how the pad is exchanged?
@canadiancoding
@canadiancoding Жыл бұрын
There isn't any specific way to do this, ideally this is a step you would do "in-private", since if you do it "in-public" this part would need to be secured somehow (no specifics given in the OTP protocl). If eve is able to get ahold of the pad while in transfer then the whole system is no longer secure. One option is to do public-key exchange and then encrypt the pad with a key when you send it. Something like diffie-hellman can do this, which I created a repo to explain here: github.com/descent098/diffie-hellman Thanks for watching!
@HenryCasillas
@HenryCasillas 2 жыл бұрын
☮️
@DeleriousOdyssey
@DeleriousOdyssey 2 жыл бұрын
Why is this so hard for me to understand? Lol
@wheelieblind
@wheelieblind 2 жыл бұрын
Next time use unicode lol
@canadiancoding
@canadiancoding 2 жыл бұрын
For a video like this Unicode is unwieldy, this is meant to be an intro not a how-to necessarily. The primary purpose of this video was for a course I took where the prof wanted a teaching utility to show people about the protocol. ASCII is just simple because it's a small enough collection to do by hand while being expressive enough to be useful. In the real world the character encodings themselves get incredibly annoying to deal with (especially with bloody emoji's), and Unicode would be better especially for languages other than English. Thanks for watching!
@c.j.1089
@c.j.1089 2 жыл бұрын
this overcomplicates the one time pad immensely.
@toby9999
@toby9999 2 жыл бұрын
How so?
The ULTIMATE One Time Pad Tutorial
14:11
Gary Ruddell
Рет қаралды 15 М.
The Encryption That Can't Be Cracked: OTP
11:01
The Modern Rogue
Рет қаралды 178 М.
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 32 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 38 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
A problem so hard even Google relies on Random Chance
12:06
Breaking Taps
Рет қаралды 1,1 МЛН
Rotation without rotating.
16:52
Stand-up Maths
Рет қаралды 1 МЛН
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
I Made A Water Computer And It Actually Works
16:30
Steve Mould
Рет қаралды 7 МЛН
Using AI to Create the Perfect Keyboard
12:05
adumb
Рет қаралды 1,4 МЛН
What Kinds of Files Can Be Viruses?
14:08
ThioJoe
Рет қаралды 267 М.
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,4 МЛН
The SAT Question Everyone Got Wrong
18:25
Veritasium
Рет қаралды 12 МЛН
Controlling Light Using Holograms And Photographic Film
21:58
The Thought Emporium
Рет қаралды 226 М.
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 32 МЛН