Playfair Cipher

Поділитися
Вставка
  • Опубліковано 26 лип 2024
  • An explanation with examples of how to encode and decode messages with the Playfair Cipher.

КОМЕНТАРІ • 290

  • @Henchetarian
    @Henchetarian 6 років тому +110

    Not my first video to try to understand this, but my last - awesome explanation! thank you!

  • @NovaAnimations
    @NovaAnimations 5 років тому +106

    I feel smart now.

  • @afanofthem2734
    @afanofthem2734 3 роки тому +15

    First I thought 20 min, that's long. I ended up enjoying every second of it. Thank you!

  • @saurabhprabhakar6890
    @saurabhprabhakar6890 4 роки тому +38

    I can't believe myself!!
    You just tought me a NEW unique language in just 19 minutes video.
    Love your knowledge and the simplest way you explained it. Just WOW.... Please accept my gratitude...
    God bless you sir 🙌 👍

  • @matxzx
    @matxzx 5 років тому +48

    Omg thanks for this explanation! I'm following a course at university and they recommended us a book to read wich explains the Playfair Cipher in the most horrible unclear way... This is so much clearer! I'm putting this video in my bookmarks! Thanks again

    • @videosbykevin2938
      @videosbykevin2938  5 років тому +8

      You are very welcome, Mathieu. I'm glad I could help.

    • @andreasorourke4252
      @andreasorourke4252 3 роки тому +1

      lol i'm reading the same book. It uses complicated equations that make it so much more difficult to understand

  • @emmachristopherson8907
    @emmachristopherson8907 5 років тому +76

    🏅 First time I've ever commented on a video. This is THE best explanation video hands down. Thank you!

    • @videosbykevin2938
      @videosbykevin2938  5 років тому +11

      Thank you, Emma. I am genuinely honored.

    • @humairasher2000
      @humairasher2000 3 роки тому

      @@videosbykevin2938 sir how to decrypt a message if pair is identical (consist of same letter)

    • @thehaigu321
      @thehaigu321 3 роки тому

      @@humairasher2000 I believe in this case you'd want to replace the second occurance of a repeated letter with a sort of placeholder, such as X or Z, that way all pairs of letters are unique

    • @humairasher2000
      @humairasher2000 3 роки тому

      @@thehaigu321 thanks

    • @thehaigu321
      @thehaigu321 3 роки тому +1

      @@humairasher2000 no prob mate

  • @CataRaen42
    @CataRaen42 4 роки тому +13

    Who is here watching just for fun and not for school or anything?

    • @carlos1004Alvarez
      @carlos1004Alvarez 4 роки тому

      Yane Lane yeah just finished watching National treasure 😂

    • @antipusrises
      @antipusrises 4 місяці тому

      I’m trying to figure out a clue in a book I’m reading all by myself 😅

    • @uschurch
      @uschurch 3 місяці тому +1

      I'm watching this out of interest. I just had to study some cryptography for school but now I'm interested in learning more!

    • @Nomadgammer
      @Nomadgammer 23 дні тому

      Definitely

  • @zt3853
    @zt3853 4 роки тому +110

    Kevin: MEETMEATNOON = Meet me at noon
    me: meet meat noon

  • @CJ_DJ
    @CJ_DJ 2 роки тому +4

    They mentioned the play fair cipher in National Treasure 2, so I was curious what it was and so I came to this video. Really good job! I loved how detailed you were with it. I will definitely be using this to send secret messages to my friends.

  • @athomeescaperooms5696
    @athomeescaperooms5696 2 роки тому +1

    This was an incredible and thorough explanation - thank you! I feel like I could now teach others about this cipher based solely on your explanation. Great job!

  • @rkx9868
    @rkx9868 3 роки тому +2

    Literally saved me soo much time, I’ve wrote a whole assignment using the information provided and made my own examples whilst following yours!

  • @silverdotmanee
    @silverdotmanee 2 роки тому +1

    I was trying to play the game cryptogram but I didn't understand how to play it so came on yt for help but instead of writing cryptogram I wrote cryptography and found myself here and I have apparently learned how to code and decode playfair cipher now... Boy the way you were able to explain to someone who knew nothing about it and yet they managed to learn. You got a special talent! You were funny too so it wasn't even boring 💜👏🤗

  • @anythingajag
    @anythingajag 3 роки тому +4

    Brilliantly explained, well done. Just watched National Treasure 2 for the umteanth time and understood the code!!

  • @bloodeyhell7026
    @bloodeyhell7026 6 років тому +8

    Wow thanks for this.. some people did videos on this yet unable to explain or demonstrate. You are a good teacher. i understood it flawlessly. i would be glad if you can upload RSA, DIFFE HELLMAN, HMAC, DES, AES AND TRIPLE DES algorithms. then i know for sure i have passed my exams. Thanks once again you are a life saver. already subscribed!

    • @maxispeeltspellen4892
      @maxispeeltspellen4892 5 років тому

      You know a triple des video would be like 8 hours long to explain

  • @IamAhmedMohammed
    @IamAhmedMohammed 4 роки тому +16

    He is super calm 😂❤
    That's help the understanding process in the brain meats 😂❤
    This will help me pass my exam tomorrow, god bless you so very much teacher ❤

  • @aniketdeshmane6569
    @aniketdeshmane6569 6 років тому +4

    You r grt , your explaination is lit! Please make more videos

  • @thegreatkris24
    @thegreatkris24 Рік тому +1

    finally! someone on youtube that knows how to explain stuff ! thanks

  • @venkatavula
    @venkatavula 5 років тому +1

    That's a very good explanation i have been searching for understanding this topic. Thanks a lot Buddy

  • @Shuck99
    @Shuck99 3 місяці тому

    You are a phenomenal teacher

  • @Metrious
    @Metrious 4 роки тому +9

    "Uncopyrightable" and "dermatoglyphics" are two of the longest words that don't repeat a letter. Great keywords.

    • @vedran3775
      @vedran3775 4 роки тому +1

      Antidisestablishmenterianism

    • @Metrious
      @Metrious 4 роки тому +7

      @@vedran3775 yes that is the longest word, but it has repeated letters. The two I noted above have no repeated letters.

    • @billjoe5991
      @billjoe5991 2 роки тому

      @@Metrious yeah but you could just not write down the repeated letters when making the grid. So if the word has for example two A’s you could just write the word the way it is but leave out the second a

    • @Metrious
      @Metrious 2 роки тому

      @@billjoe5991 Whereas you are correct it is easier to remember with no repeated letters. Otherwise you have to remember how you spelled it without the repeated letters. Other than that you are perfectly correct.

  • @east4081
    @east4081 2 роки тому

    Youve literally saved my semesterrrr..God Blesss you

  • @dragonblade5370
    @dragonblade5370 2 роки тому

    Best video I've watched, Easy to understand thank to you!

  • @XXTheMoleXX
    @XXTheMoleXX 3 роки тому +1

    Very nice. Thank you for the upload.

  • @dunkelheit8594
    @dunkelheit8594 3 роки тому

    Thanks for the video! This is gonna help me a lot.

  • @muhamadhaydar8419
    @muhamadhaydar8419 3 роки тому

    Saved my time, thanks
    Great explanation 💖❤️

  • @animepabu5526
    @animepabu5526 4 роки тому +10

    Everyone’s saying what a great video (totally true) but I’m over here just watching him write with that nice hand writhing. It looks like a typing font

  • @renatorodrigues1500
    @renatorodrigues1500 Рік тому

    Thank you so much for your explanation !!
    I love to make this things !!!
    😎👌
    I'm from Brazil !!

  • @deeptivaze4383
    @deeptivaze4383 2 роки тому

    Very well explained, thank you.

  • @ashleypursell9702
    @ashleypursell9702 4 роки тому

    great video with simple explanation, thanks so much!

  • @ranaai9990
    @ranaai9990 4 роки тому

    Such good explanation 💯

  • @lauzia6098
    @lauzia6098 3 роки тому

    this is really helpful thank you so much

  • @The_Shank
    @The_Shank 4 роки тому

    Great explanation!

  • @sengyongtan2317
    @sengyongtan2317 5 років тому +1

    Thanks alot......It really help me to do mine school project

  • @sinisterblades7609
    @sinisterblades7609 2 роки тому

    This is so fun damn i started this class at the uni and iam so hyped to learn all of this

  • @rahxephonmanga9802
    @rahxephonmanga9802 5 місяців тому +1

    My new favorite cipher.

  • @kichq248
    @kichq248 4 роки тому +1

    You deserve a subscribe,Thank you so much man!!!

  • @adrian7796
    @adrian7796 3 роки тому

    Awezome Explanation !! =)

  • @NoteyouraveRage
    @NoteyouraveRage 5 років тому +2

    Wow! very helpful.

  • @karinemiranda3551
    @karinemiranda3551 3 роки тому

    Great explanation! Helped me a lot! Thank you! ;)

  • @neOnPinguinlps
    @neOnPinguinlps 5 років тому

    Thank you so much! I really need that for school but there was no German speaking video. Great job :)

  • @winson54
    @winson54 4 роки тому

    Good Explaination!!

  • @svenkatasaikumar6698
    @svenkatasaikumar6698 3 роки тому

    Good one dude.. Well said ❤

  • @yogokhan7108
    @yogokhan7108 2 роки тому

    THANKS MAN! LOVE U!!!!!!!!!!

  • @user-ou3kl3ed1v
    @user-ou3kl3ed1v 5 років тому +14

    I owe you big time

  • @celineguler
    @celineguler 3 роки тому

    I love your channel sir

  • @mikkodarobloxian6316
    @mikkodarobloxian6316 Рік тому

    I love ur vids

  • @cazterk
    @cazterk 4 роки тому

    thanks very much well explained

  • @MrVishalarwade
    @MrVishalarwade 5 років тому +2

    Thank you soooooooo much 🙏

  • @shoetanphilip6050
    @shoetanphilip6050 3 роки тому

    Best explanation ever

  • @AaronToponce
    @AaronToponce 4 роки тому +15

    This is a phenomenal video, as are your 2 paper Enigma videos. However, I want to mention a couple things when using the Playfair cipher.
    First when keying the Playfair cipher, you really should use an RNG to scramble the 5x5 grid. The threat model is an adversary that knows you're just using key words to key the Playfair cipher, and as such, writes a computer program to brute force search 5x5 grids based on simple key words. However there are 25 unique letters in Playfair, which means there are 25! (25 factorial) possible grids. In terms of computer security, this is about 83.68 bits of security (2^83.68 ~= 25!). 83 bits is robust enough to prevent an adversary from doing a successful brute force search.
    Second, no two messages should ever be encrypted with the same 5x5 grid. As a mathematician, you should be able to appreciate the mathematics behind using two ciphertexts encrypted with the same symmetric key, do determine the key itself, and as such, decrypt future ciphertexts. Every Playfair key should be ephemeral. This is why code books handed out in WWI and WWII. Field agents would encrypt the message with a key out of the code book, then destroy the key. This isn't unique to one-time pads either. It's the case in modern cryptography with AES, was the case with the German Enigma, and should be the case with any symmetric cipher design.
    A code book for a 5x5 Playfair grid could look something like:
    1. BIUXZGOHERAWLYPDVQTMCKNSF
    2. YDISTKQPUXZFCRHVGLOEBMWNA
    3. ZAQCVTYOWBEHMDISRPKUXFLNG
    4. GSEFXVQTHLPWKUMRYDNZIBACO
    5. CEPGIRKLAZXFQBOSWDTYNUHVM
    6. BWKSHOTZNYIMRGUCEDFLPQAXV
    7. XWBFGTRMUDKCLOEVQASYHPNIZ
    8. KYZCLETDXBOVWGAIHFURQSPMN
    9. SFMLTKONVCPYXIBWHZEAQUDRG
    10. FXNWMOEPDVBQCGSLYHTKAURIZ
    Two field agents would have identical code books. The person encrypting the message would use key 1, then destroy the key. Next time they wish to encrypt a message, they would use key 2, then destroy that key, etc. Write the grid out left-to-right, five characters at a time, and you have your Playfair grid.

    • @animepabu5526
      @animepabu5526 4 роки тому

      Very informative thank you :)

    • @MarkiMew
      @MarkiMew 4 роки тому

      Sometimes people just use code words then go alphabetically
      e.g. CODEABFGHIKLMNPQRSTUVWXYZ

    • @adamnordskog1231
      @adamnordskog1231 2 роки тому

      SOR”TI”E
      THE MEN OF GUNNERSIDE COULD BE PRAYING WITH DYNAMITE

    • @adamnordskog1231
      @adamnordskog1231 2 роки тому

      Page1-100-C •
      ANDRAE NORDSKOG
      “the frauds has my grandfathers original Boulder Dam in the Light of the Owens Valley Fraud. ©️2022 by Adam Nordskog”

    • @adamnordskog1231
      @adamnordskog1231 2 роки тому

      It says to go with V0C. #1

  • @larich370
    @larich370 2 роки тому

    Thank you sir!!!!!!!!!!!!!!!!!!!!!!!!!

  • @zrve2
    @zrve2 3 роки тому

    Thank you very much 😍

  • @deathcaesar1035
    @deathcaesar1035 3 роки тому

    You're so underrated.

  • @NothingMaster
    @NothingMaster 5 місяців тому +2

    The Playfair cipher is one of the easiest to break.

  • @FayettiSiqueira
    @FayettiSiqueira 2 роки тому +1

    If you add the numbers you can use all letters and numbers in a 6x6 table. With the bennefit of encoding numbers as well

    • @jeffreyweaver9854
      @jeffreyweaver9854 2 роки тому

      Check out Martin Gardner's book "Codes, Ciphers, And Secret Writing" for his version of the Playfair Cipher, which does use a grid of randomly placed letters and digits!

  • @gglyt8882
    @gglyt8882 3 роки тому

    Very interesting !

  • @exoticcats6119
    @exoticcats6119 4 роки тому +1

    Thanks needed this for school.

  • @abdelrahmanmaged7131
    @abdelrahmanmaged7131 3 роки тому

    Thaaaaaanks
    really helped

  • @jonathanpascual5353
    @jonathanpascual5353 3 роки тому +2

    Thank you so much! I was able to decrypt the code from the beginning of National Treasure: Book of Secrets just for fun. Also, I've heard of people having the letter 'J' occupy the same square as 'I' instead of fully omitting it , do you think that's acceptable?

    • @videosbykevin2938
      @videosbykevin2938  3 роки тому +1

      You're quite welcome. I'm delighted you found it useful.
      Certainly you could do that, but I don't think you will find it unnecessary. No one would mistake ionathan, ianuary, or iuniper for anything other than Jonathan, January, of Juniper

  • @paulinatruck5316
    @paulinatruck5316 4 роки тому +2

    Maybe I missed the explanation but what if you need the letter that you are skipping? In this example it was the “J”. Would you use the “X”?

  • @conanryoma7958
    @conanryoma7958 4 роки тому +1

    Okkk, thanks. I think I am more clear about the playfair cipher now hahahah

  • @jyothish99
    @jyothish99 3 роки тому

    Thank you !

  • @wwredgrl1515
    @wwredgrl1515 4 роки тому

    Man oh man. This is some John Nash shit. Beautiful Mind.

  • @terrydaniels2998
    @terrydaniels2998 Рік тому

    so good would fly to the moon for this

  • @nadiakacem24
    @nadiakacem24 2 роки тому

    thank you so much

  • @joe-wl3qk
    @joe-wl3qk 2 роки тому

    thx for the cipher

  • @youtellme_studios4330
    @youtellme_studios4330 2 роки тому

    does he explain the "back up" thingy in the code he gave us? because i rewatched the first 10 minutes twice and i never heard such thing

  • @b5mrjacob373
    @b5mrjacob373 2 роки тому

    appreciate it man

  • @nihil_0x
    @nihil_0x 4 роки тому +1

    What if i add 4 imaginary meaningless character or numbers and make it 6x6, to solve the missing character problem.. I think it should work! 🤔 what do you think?

  • @jjpxggy9101
    @jjpxggy9101 4 роки тому

    Thank u soo much!!! xx

  • @georgegeorge581
    @georgegeorge581 3 роки тому

    Thanks!

  • @SomeBrainiacRBLX
    @SomeBrainiacRBLX 15 днів тому

    What if there is an alone x at the end? I'm trying to encode "Orange Box" But have a leftover x at the end.

  • @lukab8963
    @lukab8963 Місяць тому

    Pretty sure this is a bit wrong but it just may be another version of the playfair cipher, however the way i learned is that you divide balloon into ba lx lo on not replacing letters just adding an x

  • @Arjunsiva
    @Arjunsiva 3 роки тому

    thankssss a lot!

  • @karlvonpackal1402
    @karlvonpackal1402 4 роки тому +1

    Sometimes you go clockwise and other times you go counterclockwise when doing boxes (is it simply back and forth between the two every time you come across it?).

    • @videosbykevin2938
      @videosbykevin2938  4 роки тому

      Greetings Carl,
      No, you go clockwise when you are encoding, counter clockwise when you decode. Thank for watching.

  • @itznukeey
    @itznukeey 5 років тому +1

    Perfect

  • @veronalejandreparayno3351
    @veronalejandreparayno3351 4 роки тому

    How did this guy get only 768 subs when he has quality cids

  • @walidhouse
    @walidhouse 3 роки тому

    can we use numbers grid to code message?

  • @tarikabaraka2251
    @tarikabaraka2251 2 роки тому

    El cifrado de Playfair es un método manual de criptografía simétrica por medio de sustitución. El sistema de cifrado toma pares de letras, o digramas, y las cambia mediante una tabla generada por una clave.​

  • @saidouhmi7478
    @saidouhmi7478 4 роки тому

    thanks Mr

  • @vaxi99
    @vaxi99 3 роки тому

    Thanks man

  • @MarcusVinicius-jc2em
    @MarcusVinicius-jc2em 3 роки тому

    Obrigado por este vídeo.

  • @HK-sw3vi
    @HK-sw3vi 2 роки тому

    amazing

  • @prof.tahseen6104
    @prof.tahseen6104 3 роки тому +1

    0:08 I waited for Vsauce music...

  • @johnsknows3135
    @johnsknows3135 3 роки тому

    Thank you

  • @fluffypinkpandas
    @fluffypinkpandas 3 роки тому +2

    Ah ok.
    Ardent Alien Power Lizard Mourn Planet Viper Range Laser Laso Idaho
    Its like one of those super special passphrase chains that are generated for you when something is super encrypted.

  • @hasnaa7316
    @hasnaa7316 2 місяці тому

    thank you

  • @felixfortuna1302
    @felixfortuna1302 2 роки тому +1

    Thanks for the explanation…give a clear idea how to make a simple program in C,,, how I can manipulate los arrays for (i,j).. It’s very simple..thanks

    • @felixfortuna1302
      @felixfortuna1302 2 роки тому

      It’s a nice example that give me a clear idea how I can do it in C or assembler program..chao

  • @geethchadalawada6055
    @geethchadalawada6055 5 років тому

    What if the letter I skipped occurs in my text? Suppose that I was using the second grid you explained with and I want to encrypt January. So what will be the substitution for J? We don't have J in the grid. So what shall we replace it with? Or shall we just leave it as J?

    • @videosbykevin2938
      @videosbykevin2938  5 років тому +2

      Greetings Geeth,
      Typically one would use i; no one would mistake ianuary for anything other than January. Also, presumably the receiver of your coded message would be aware of the particular limitation with the letter J and decode accordingly. I might also recommend skipping Q and encode qu as kw if needed: kwit, kwiet, kwalify, etc.
      Thank you for watching,
      Kevin

  • @San-li9ml
    @San-li9ml 4 роки тому

    Hello good sir, I was wondering if I got this correct, I was doing the thing you did with lizard but instead used the word zodiac and removed the letter k, and for the balloon I used Y an example being LY OY NY. So what I got for doing that was GO NW AV MX I was wondering if I was correct on this or do I need to do it again

    • @videosbykevin2938
      @videosbykevin2938  4 роки тому +1

      Good day Sansaboy,
      It looks like you've got a good handle on it, but if I understood your description right, I get GO NW AV TA. The last two letters, NY, are both in the fifth vertical column, so encode them using the letters directly below them. N goes to T and Y wraps around to the top to become A.
      Hope that helps. Do let me know if I have misunderstood your question in any way.
      Thank you for watching, Kevin

  • @nataliewalde5429
    @nataliewalde5429 3 роки тому +1

    This is awesome. I've watched many videos but this is so well explained.... I think I finally got it. But... I may be daft... In the example HK, move to the right becomes IF. And in the reply of the spy NP, move to the left becomes MO and not OL. What did I miss? I'm sorry for asking. Can anybody explain it to me? 😟 Thank you!

    • @videosbykevin2938
      @videosbykevin2938  3 роки тому

      Greetings Natalie,
      Your reasoning is spot on. As you say, HK becomes IF because we move to the right when encoding, but when the spy sends a response we decode the message by moving to the left, so NP becomes MO.
      If we were encoding NP instead of decoding, it would be encoded as OL because we move to the right.
      Do please let me know if that clears up any confusion.
      Thank you for your kind praise.
      Kevin

  • @notquitehim
    @notquitehim 3 роки тому +5

    wouldn't it be clever to use the letter you skipped in the grid and use it for double letters, or strings that end with a single letter?

    • @heavyglassglass
      @heavyglassglass 6 місяців тому

      but it's not on the grid so you don't have a letter to swap it with

  • @apotheoic8865
    @apotheoic8865 4 роки тому +2

    I love ciphers and codes, but I have no use for them... non of my friends are into them... can someone suggest a use? I want to use them for fun, but where do I start?

    • @Fanahim
      @Fanahim 3 роки тому

      Apotheoic you can make a puzzle type event and find a online community that is into codes

  • @anthonygitonga4526
    @anthonygitonga4526 3 роки тому

    What if you have a key word that has similar letters? (Example)

  • @edeline9364
    @edeline9364 4 роки тому

    Awsome

  • @Alex_MB
    @Alex_MB 3 роки тому

    Great video thanks
    That marker makes an annoying sound tho

  • @Stargirl2urStarboy
    @Stargirl2urStarboy Рік тому

    What if you had a word with a j? Would u put for e.g. x?

  • @justmejhbmed9778
    @justmejhbmed9778 4 роки тому

    Great video and well explained. Thanks a lot ! However, as you deliberately left out the “J”, I would like to know how I would send a “J” if I wanted to send a coded word like “ JUST “ or “ JUMP “ etc. I hope you will reply. Thanks again.

    • @videosbykevin2938
      @videosbykevin2938  4 роки тому +2

      Greetings JustMe,
      Typically one would substitute I for J when needed. Few people would confuse IUST, IUMP, or IANuARY for anything but JUST, JUMP, or JANUARY. However, as long as you and your recipient agree beforehand, you can leave out any letter you wish. I chose J because that's what the original crafter of the cipher did and because it has an easy substitution in the letter I.
      Thank you for you kind praise, Kevin

    • @justmejhbmed9778
      @justmejhbmed9778 4 роки тому

      @@videosbykevin2938 thanks for your answer and taking time to reply. it's really a good way to keep private information for oneself, like passwords or bank details. thanks again.

  • @lunalikemoon8541
    @lunalikemoon8541 4 роки тому

    What abut words with J?

  • @faizalahamed1541
    @faizalahamed1541 4 роки тому

    Great