Cryptography 101 - - XOR Cipher

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น •

  • @JulianCesarTheGoat
    @JulianCesarTheGoat 4 ปีที่แล้ว +18

    i'm paying thousands of dollars to go to school only for me to come to TH-cam and get a clear 5 minute explanation on something I've been struggling to understand for days.

  • @AdityaPraveenkumar
    @AdityaPraveenkumar 7 ปีที่แล้ว +78

    You're literally the only one on youtube who could clearly teach this to me...Thanks a lot man!!!

  • @MartianMoon
    @MartianMoon 5 ปีที่แล้ว +12

    finally a clear explanation of this
    thank you so much

  • @3a1Va1
    @3a1Va1 5 ปีที่แล้ว +1

    You have done what pages of my "dry outdated yet assigned" cryptography book couldn't. Thank you.

  • @raise7935
    @raise7935 7 ปีที่แล้ว +10

    Nicely
    Explained

  • @Augestein
    @Augestein 4 ปีที่แล้ว +2

    Shame that you don't do more videos. I'd have definitely subscribed to you if you had more videos. I feel like this is, without a doubt, one of the best explanations I've seen of an XOR Cipher.

    • @CharlesLaing
      @CharlesLaing  4 ปีที่แล้ว +1

      Thanks, life always gets in the way

    • @Augestein
      @Augestein 4 ปีที่แล้ว +1

      @@CharlesLaing I can definitely understand that. Take care of yourself.

  • @endunry2
    @endunry2 4 ปีที่แล้ว +1

    I stucked at the Overthewire Natas CTF, and i want to know what XOR-Encryption is. You made this so clearly.. Thank you!!

  • @mercuryliu5673
    @mercuryliu5673 3 ปีที่แล้ว

    Thank you so much! I was doing a school project on data encryption and this video helps me a lot in explaining things to my professor.

  • @LancePorter88
    @LancePorter88 ปีที่แล้ว

    Fantastic video. Thank you for explaining this in a way that instantly clicked. Cheers!

  • @jmacsss
    @jmacsss 6 ปีที่แล้ว +1

    Thank you! Finally a clear, easy to follow explanation of XOR

  • @jherrera9751
    @jherrera9751 4 ปีที่แล้ว

    Nicely done my man, very easy to follow and you didn't go over the top with diagrams. Keep it up!

  • @calebsykes7889
    @calebsykes7889 5 ปีที่แล้ว

    you've explained what no one else on the internet could, i would bake you a cake

    • @CharlesLaing
      @CharlesLaing  5 ปีที่แล้ว

      What kind of cake?

    • @calebsykes7889
      @calebsykes7889 5 ปีที่แล้ว

      @@CharlesLaing red velvets really nice, whatever is easiest i spose

  • @Jess-mj2jj
    @Jess-mj2jj 3 ปีที่แล้ว

    This is the best explanation I’ve seen. Thank you 🙏🏾

  • @Rickety3263
    @Rickety3263 5 ปีที่แล้ว +2

    omg! thank you for actually explaining this. thank youuuu

  • @DiegoSilvaD1
    @DiegoSilvaD1 5 ปีที่แล้ว +2

    Thank you very much! The best explanation I found! Keep it up!

  • @weallfallprey
    @weallfallprey 5 ปีที่แล้ว

    Thank you for explaining this!! Other XOR videos just confused me.

  • @v.s.s.k6667
    @v.s.s.k6667 7 ปีที่แล้ว +2

    Lovely much appreciate continue the good work

  • @bigsluggy
    @bigsluggy 2 ปีที่แล้ว

    At 04:40 you begin showing how you can get the key by xor'ing the before and after but I'm confused as to why this matters?
    To get c from é surely you would need to know the key anyway? Otherwise how would you know c was the correct result?

    • @bigsluggy
      @bigsluggy 2 ปีที่แล้ว

      Actually now I think about it a bit more, although I don't have any cryptography knowledge so I'm probably wrong...
      I guess if you were trying to crack an encrypted string and you were able to identify like 2 or 3 digit words like "to" for example you could xor "to" with what you thought might be to and use the result to xor the rest of the string to see if it makes sense?

  • @ahmoin
    @ahmoin 2 หลายเดือนก่อน

    thank you, this is so useful to understand xor cipher

  • @ghazanfarsheikh44
    @ghazanfarsheikh44 ปีที่แล้ว

    This was actually very helpful video, God bless you

  • @helloworld8583
    @helloworld8583 4 ปีที่แล้ว

    I am struggling a lot with finding explaining of xor-based hash function. But, i really like your video anyway!

  • @vanguardsolution4160
    @vanguardsolution4160 5 ปีที่แล้ว

    Thanks for making this very easy to understand.

  • @fedemolto
    @fedemolto 4 ปีที่แล้ว

    Very lucid explanation, thanks!

  • @sofiarodrigues96
    @sofiarodrigues96 4 ปีที่แล้ว

    Very good at teaching this cipher. Thank you!

  • @xx_xx_xx_xx3352
    @xx_xx_xx_xx3352 5 ปีที่แล้ว

    Best explanation. Extremely good video!! nice

  • @baukeverbeek6306
    @baukeverbeek6306 3 ปีที่แล้ว

    Dude you are my hero 🦸‍♂️ I hope if you read this you are having a great day

    • @CharlesLaing
      @CharlesLaing  3 ปีที่แล้ว

      Thanks man. I appreciate it.

  • @triciaopoku7400
    @triciaopoku7400 6 ปีที่แล้ว

    How do you recover a message? The Vernam encrypting messages using encryption key MOREM. The ciphertexts are C1=MAOEE and C2=RTITR which are obtained by Vernam encrypting messages M1 and M2. The encryption messages are two names. m1,1= R and m2,4=T. Please assit - I am trying to understanding how to recoverthe messages.

  • @mceucalyptuzkz
    @mceucalyptuzkz 2 ปีที่แล้ว

    Good video! Makes a lot more sense now.

  • @djbroake9810
    @djbroake9810 2 ปีที่แล้ว

    awesome thank you for a perfect example with why/how.

  • @triciaopoku7400
    @triciaopoku7400 6 ปีที่แล้ว +1

    Question - Not clear on how you find the correesponding encryption key. For example 'Mario' and it is at bit level - M=011, A=000, R=101, I=010 and O=100. The ciphertext is 'AOAMV'. How do you find the key using the XOR function?

    • @CharlesLaing
      @CharlesLaing  6 ปีที่แล้ว +8

      So what you need to do is take that cipher text - "AOAMV" and the word "MARIO", convert them both into their bit sequences, then XOR the two together. The result will give you they key that you originally encyphered MARIO with.

    • @slazerlombardi
      @slazerlombardi 5 ปีที่แล้ว

      @@CharlesLaing tutte is that you?

    • @KodakYarr
      @KodakYarr 5 ปีที่แล้ว

      @@CharlesLaing
      This assumed you actually know what the message is though. If you don't know either message but know that two messages uses the same key, how would you find the key when a second message reuses the same key?

    • @CharlesLaing
      @CharlesLaing  5 ปีที่แล้ว +1

      @@KodakYarr I've got this question a lot. Maybe I'll do a video on it .

  • @abrahr2420
    @abrahr2420 2 ปีที่แล้ว

    Fantastic explanation! Thanks!

  • @janahogan3815
    @janahogan3815 หลายเดือนก่อน

    You’re a lifesaver!

  • @RohitKumar-xl3hk
    @RohitKumar-xl3hk 3 ปีที่แล้ว

    So XOR gives 0 if both digits are the same?

  • @KLEY_
    @KLEY_ 3 หลายเดือนก่อน

    quick and very nice explain thx

  • @PatrickLyell
    @PatrickLyell 4 ปีที่แล้ว

    This was excellent

  • @digbic8375
    @digbic8375 ปีที่แล้ว

    thanks for cutting the bullshit. Learning about this in my master. Video broke it down so easily

  • @guyscoped
    @guyscoped 2 ปีที่แล้ว

    Amazing Video

  • @nic0latesla333
    @nic0latesla333 6 ปีที่แล้ว +1

    great.. Thanks

  • @paradox1516
    @paradox1516 2 ปีที่แล้ว

    Thank you so so so much!!!

  • @wyf251
    @wyf251 4 หลายเดือนก่อน

    Thank you!

  • @regnas7868
    @regnas7868 5 ปีที่แล้ว

    Thanks a million!!

  • @maverick74240
    @maverick74240 2 ปีที่แล้ว

    good explanation

  • @ahmidahmid9303
    @ahmidahmid9303 6 ปีที่แล้ว

    Goog job bro

  • @onsjoost5746
    @onsjoost5746 3 ปีที่แล้ว

    thank you so much

  • @Anarchia02
    @Anarchia02 6 ปีที่แล้ว

    How to find out what is the key? That's what's missing. I would want to know ^^

    • @Augestein
      @Augestein 4 ปีที่แล้ว +1

      This is a bit late to the party, but just so if anyone else comes here wondering the same thing, I'll answer it.
      The reason you'd be able to find out the key, is if you knew it was an XOR Cypher. IE, using say, "c" like he had before:
      01000011 - c
      11101001 - é
      if you have the original message , and then you see the encrypted message, you can figure it out if it was only an XOR Cipher. Let's say that you were given a message that was properly decrypted with the key because you were allowed. Then all you'd have to do from there, is try to open up the message intentionally WITHOUT the key so you'd receive the encrypted message. From there, you'd be able to figure out the cipher key because of how the algorithm works.
      IE, there are 4 scenarios that appear with an XOR Cipher
      0 ^ 0 = 0
      1 ^ 1 = 0
      0 ^ 1 = 1
      1 & 0 = 1
      since we have both letters for the encrypted and the decrypted, it stands to reason that the key is what you find between them for making c decrypted to become é in the first place if every letter converts with the same pattern. That's why XOR Cipher isn't safe to use on its own.
      Regardless of that, even if you didn't have the decrypted message, you can still guess potential letters / characters based on the above scenarios. Example, if we end with é, we can guess things about the key for every "0" in the encrypted letter, we know that the key and the non-encrypted letter are the same. This allows us to map out potential relationships between the key and the unknown original letter. It's a heck of a lot simpler to translate these scenarios than something like:
      2asp,~9034=: for instance.

  • @killcap849
    @killcap849 6 ปีที่แล้ว

    so how do you get the awnser if you don't know the key?

    • @maximalgamingnl9954
      @maximalgamingnl9954 6 ปีที่แล้ว

      kill cap well, you might find one file that is encrypted (or a part of it) that you do know while it is not encrypted, with just the length of the key worth of (sequential) encrypted file data, you can recreate the key

    • @maximalgamingnl9954
      @maximalgamingnl9954 6 ปีที่แล้ว +1

      that's why we create a random key, and encrypt that with another key obtained from the password and store the encrypted key in the file somewhere and decrypt it first, and use it to decrypt the actual data with. Sine you only encrypted the key with your actual password, there are much less ways to now get this random key, without the password

    • @maximalgamingnl9954
      @maximalgamingnl9954 6 ปีที่แล้ว +1

      wait that last part is not true, but we can fix this by encrypting the data with the first key, then with the second key.

    • @maximalgamingnl9954
      @maximalgamingnl9954 6 ปีที่แล้ว +1

      the second key being the random one

    • @maximalgamingnl9954
      @maximalgamingnl9954 6 ปีที่แล้ว +1

      i just figured out file encryption

  • @youlov7139
    @youlov7139 6 ปีที่แล้ว

    Thank you so much but can explain about 3D

  • @ziro7616
    @ziro7616 4 ปีที่แล้ว

    Thank you

  • @evilleons3400
    @evilleons3400 5 ปีที่แล้ว

    DLE GS DC4 DC4 ETB
    key-
    Alone I am 24th,
    with a friend I am 20,
    another friend and
    I am unclean.
    what am I?

    • @inx1819
      @inx1819 5 ปีที่แล้ว

      I sat down and tried it, my result doesn't make much sense.
      The result is "(2 W"
      The space isn't a space it's a character called Start Of Heading which doesn't have a printable form
      The answer to the riddle is the letter x

    • @evilleons3400
      @evilleons3400 5 ปีที่แล้ว

      @@inx1819 sorry about this, I'm a noob at this, i probably did something wrong.

  • @kalkvand
    @kalkvand 6 ปีที่แล้ว

    I understand this, but how would you decrypt this?
    imgur.com/a/vUDXN38

  • @lordoffatcats
    @lordoffatcats 3 ปีที่แล้ว

    Thanks man

  • @mar_kha
    @mar_kha 2 ปีที่แล้ว

    4:00 zero, zero, zero...

    • @mar_kha
      @mar_kha 2 ปีที่แล้ว

      Sounds like a blaster 🔫

  • @fedoraguy7781
    @fedoraguy7781 4 ปีที่แล้ว

    Thanks!

  • @Bera_kergitli
    @Bera_kergitli 7 หลายเดือนก่อน

    RESPECT

  • @willa3769
    @willa3769 6 ปีที่แล้ว

    My head has a headache. 0010110**turndownscreenbrightness**010111

  • @Sammy-uk7pr
    @Sammy-uk7pr 2 ปีที่แล้ว

    best video

  • @nitusingh3927
    @nitusingh3927 2 ปีที่แล้ว

    Who is learning this for games?

  • @DarkPsychoNet
    @DarkPsychoNet 7 หลายเดือนก่อน

    👏

  • @RonanClancy
    @RonanClancy 6 ปีที่แล้ว

    Class :)

  • @esquosi6621
    @esquosi6621 3 ปีที่แล้ว

    fuck yes

  • @sirprancealott2003
    @sirprancealott2003 2 ปีที่แล้ว

    Nice one

  • @BytesAndBros
    @BytesAndBros 3 ปีที่แล้ว

    Thank you