Cryptography: The Science of Making and Breaking Codes
Articles Blog

Cryptography: The Science of Making and Breaking Codes

This probably looks like gibberish to you, and it should because it’s a cryptogram, a message in code. But, if I told you that all I did was shift every letter in the sentence to the next one in the alphabet, then you’d know that it translates to this. To encrypt a message, you need two main parts – the cypher and the key The cipher is the set of rules that are using to encode the information
for example shifting the alphabet by certain number of letters The key tells you how to arrange those rules otherwise they’d be the same every time and it would be easy to decode the message in this case the key would be one because
we shifted the alphabet by one letter to decrypt the information you need to know
working backward from it, known as deciphering. But is it possible to come
up with a combination of a cipher and key that could never be determined Is there such a thing as an unbreakable code? Well people keep coming up with new and
better ciphers, but it’s hard to make them unbreakable because, no matter what,
you’re using a set of rules to encrypt the information and with enough time and
enough data someone can usually uncover those rules. That puzzle i just gave you is one of the oldest and simplest ways to encrypt
a message. It’s usually called a caesar cipher and in this case the key was just
a number representing how many letters of the alphabet I shifted it but it’s
also very easy to crack. Even if you didn’t know the key it would
take you at most 25 tries to decode the message because you know the whole
alphabet has to be shifted by a certain amount Since there are 26 letters in the
alphabet, there are only 25 other options A caesar cipher is one simple type of
monoalphabetic ciphers a class of
ciphers for the whole code is based on one letter of the alphabet standing in
for another letter consistently throughout the whole message basically
just scramble the alphabet in that case the key would just be a list of which
letters correspond to which like this one There are over 400 septillion possible
ways to encrypt this kind of message so you’d think it would be hard to crack
and it is but only a little bit because there are lots of ways to decode
messages just trying all of the possible keys to a code is probably the most
obvious and least subtle and it has an equally unsubtle name – brute force But you can try a more
sophisticated technique something called frequency analysis, which is based on the
idea that every language has its own specific patterns In English for example
the letter E shows up a lot I used it seven times in just the last
sentence And some words like “the”, are so common that it’s hard to even use a
sentence without them Cryptographers call these words cribs So frequency analysis looks for common words and also common letters or sets of
letters like “ed” or “ing” at the end of words. If you find that the letter X is
showing up a lot in a message and so is the three letter word IRX you might
guess that in the key X corresponds to the letter E and IRX spells THE and
once you’ve figured out those letters you can figure out the rest by
recognizing other words and using the process of elimination And since longer cryptograms contain
more clues they’re easier to crack. So
monoalphabetic ciphers are fun but they’re not hard to break. If you want to
get a little fancier with your encryption you can use polyalphabetic
ciphers instead they’re much more effective. In a polyalphabetic cipher the
way you scramble the alphabet actually changes throughout the message. In the
first word s might translate to w but in the last word s might translate
to h. It all depends on the particular encryption method you’re using and on
your key. One of the earliest polyalphabetic
ciphers was the VIGENERE cipher developed in the 16th century was pretty
simple because the key was just a word. So let’s say you want to encrypt “SciShow is the greatest” using a VIGENERE cipher well the first thing you need to do is
write out a VIGENERE square. The alphabet goes across the top and along
the left side and each row contains the letters A to Z shifted over by one So the first line starts with A and ends
with Z but the second starts with B goes all through the letters until Z and then
ends with A and so on. You end up with 26 differently scrambled alphabets and now
you’re ready to encode the message You just have to pick a key Let’s just say your key is Michael, you
write out your key multiple times until it fills the same number of letters as
your message so “SciShow is the greatest” would correspond to this. Then to encrypt
it, you take each letter of the message and move along its row in the
VIGENERE square until you get to the column of the corresponding letter in
Michael. So “scishow is the greatest” turns into this That’s much tougher to decode unless you
have the key because those letter frequencies are all different now. Since
the keyword Michael is seven letters long each letter of your message is encrypted
using seven different scrambled alphabets. But if your text is long
enough it’s still crackable using a type of frequency analysis developed in the
19th century by cryptographer Charles Babbage Babbage realized
that in a long enough message some patterns and the coded message will
still show up like if your key only has seven letters that means that there are
only seven ways to encrypt the word the but if your message uses the word the
eight times there are definitely going to be repeat. So he just counted how many
letters separated those repeated patterns. If they were separated by 7 14
or 21 letters, he knew that the key was probably seven letters long and from there he would just use
frequency analysis to figure out the seven scrambled alphabet Babbages method
is just one example of why it’s so hard to create an unbreakable cipher. Your key
creates a pattern within the encrypted message And with enough work a spy can
uncover that pattern It turns out that the only way to have a really unbreakable cipher is to use what’s known as a one-time pad encryption, which uses a key that is as long as the message itself. That way there aren’t any patterns in the
encrypted text. There’s nothing to analyze, so there’s no way to work
backwards. The sender and the recipient both have the same pad and each sheet contains a long set of random letters which is used as the key once she is
used to decode a message you destroy it Then you use the next
sheet for the next message so you never repeat a key. As long as you keep the pad safe the
message can’t be decrypted by anyone else. But you can’t always use one time
pad encryption. Let’s say you needed to get a message to
someone halfway across the world whom you’d never met, you wouldn’t have a
chance to give them a matching pad. In warfare that sort of situation comes up
a lot which is why in the early 20th century there was suddenly plenty of
incentive to come up with better ciphers Remote communication using technology
like the telegraph was incredibly valuable during wartime but it was
essential that only your allies understood what you were saying.
The Germans experimented with a new more complicated mono-alphabetic cipher
during World War I but eventually the French managed to
crack it. Then during World War II the Germans again came up with the new cipher And this time its security seemed perfect,
maybe you’ve heard of it The Enigma machine. The machine used a
poly-alphabetic cipher that scrambled the alphabet in a different way each time
you typed a new letter. As far as the Germans knew the only way to decipher the message, was to have your own Enigma machine and set it up using a secret key
that changed every day. The machine was meant to work like a
one-time pad in the sense that the alphabet was re-scrambled for every letter of the message. But instead of having to distribute a set of sheets to everyone you could just use a key that told the users how to set up their Enigma machines And you could change that key is
often as you wanted, but it had a few flaws. For example no letter could be encoded as itself. That might not sound like a big deal but it ended up being a fatal
weakness. British mathematician Alan Turing along
with the rest of his team designed a machine of their own that could crack the Enigma code as long as they knew around 20 of the characters contained in the message – which they often did because some phrases tended to show up a lot in Nazi communicates, especially nice things about Hitler So part of the strategy of Turnings team
was to look for cribs – those common words and phrases – and see where they might fit.
For instance if they knew a message contained the word Führer, they could look
for places in the text that didn’t have the letter F, since they knew that the F
in Führer couldn’t be encoded as itself Those Clues helped them figure out how the Enigma rotors were set up to encrypt the message. Cracking the Enigma code was a
huge advantage for the Allies. Many historians attribute some of the most
important victories during the war to information the Allies got from the
Enigma encrypted messages. These days encryption is mostly important in digital computing, and that isn’t perfect either When websites announced that hackers
now know everything about you that’s because their encryption methods were breakable Companies that store your data have to take into account a whole new set of considerations Like how when you can complete billions of operations per second brute force suddenly becomes a lot more practical. So the same principles that Vigenere and Turing used are the same ones that allow you to pay your bills online and keep North Korea out of your email, most of the time. But HOW, is a story for another episode Thank you for watching this episode of scishow, which was brought to you by our patrons on patreon. If you want to help us keep making
videos like this check out And don’t forget to go to and subscribe.

100 thoughts on “Cryptography: The Science of Making and Breaking Codes

  1. 25-10-11-18 24-8-2-2-11 7-14-19-18-7

    (Hank green sucks, lmao just kidding I love him)

    15-25-2 16-14-1-19-18 22-8-6-21-11 23-6-3 17-14-13-12-7 6-5-2-8 15-25-2 20-10-26-4 9-6-24

    (The quick brown fox jumps over the lazy dog)

    A:10 B:22 C:19 D:9 E:2 F:23 G:24 H:25 I:1 J:17 K:18 L:20 M:13 N:11 O:6 P:12 Q:16 R:8 S:7 T:15 U:14 V:5 W:21 X:3 Y:4 Z:26

    (I came up with this cipher, just now. Is it easily solvable?)

    hello world=687304925 3884206933
    decode the following:
    3665309999933 55029 2662430 31046930
    Then I'll know
    4252035 861028 134725435 2328383930
    Reply with the decoded messages. If you are right, I'll let you know.
    I promise it's a real challenge with a real solution. Perhaps not as challenging as I suspect.

  4. Decode this as practice​?
    comment how you decoded this, as uncoding stuff from the Polyalphabetic ciphers is a mystery to me. All I can do is work out how many letters are in the key


  6. 041514 040125 01
    0920 230119 10211920 01 01 141518130112 040125 2114200912-

  7. I have often wondered what humanity would be like right now if we had not have spent the last few hundred thousand years protecting us….from…??…..oh yeah…them.

  8. last year we had an assignment wherein we need to create a program which can encrypt and decrypt a group of numbers and letters. i was so annoyed when my classmate and our senior which by the way is his friend kept saying that it can't be done, that we can't do it, that it was so hard. yes i admit that as a newbie on programming it was relatively hard but not impossible. we just needed to be sure of our processes and logic so we can create the program.

    well i was able to create the program

    (we kind of have a poor learning system which is driven by "slow students" since everything is adjusted for them so they can follow. not that it's wrong, i mean everyone has different learning speeds but what i'm seeing is that they lack enthusiasm and perseverance.)

    just ranting

  9. Pfft I can say a sentence without the word " the"
    Crap I use the word the " the" in "without the word the"
    F*** i did it again the f** is wrong with me
    !? I did it again _😣

  10. ;p; yui yjphjy i esd frvto[yomh dp,yjomh mp o esd vto[yomhdp,yjomh shom ;p; o vsm dsu smuyjomh smf upi epmy lmpe dpyjrtr upi hp

  11. Here's one (I think) 䦻䥘䰭వ䥘䥗䤿䧙వ㶇వ䦻䤿䯍䥘వ䦻䦼䥗䥗䥘䧙వ䮵䧚䧕䥘䯈䦻䦼䧙䥝వ䥜䧚䮴వ䰭䧚䯉వ䯈䥘䰬䯈వ䧕䥘వ఺䥃䤿䯈䯈䥘䮴వ䮯䤿䧙䥄䤿䧁䥘䮵఺వ䯈䧚వ䥄䧚䧙䯈䦼䧙䯉䥘

    1010101010101001010110101010101010101010 is like sells and codes that only computers can understand like DNA DNA builds up things idk like 1s 0s like the 101010101001010 I just typed so think about math math can help on other things too like calculating things that u don't understand 1s and 0s is like the language that computers speak think of simple math the hard math and simple math is different hard math can help u count and add more things for u simple math can only give u some answers the math can help u on lots of things well breaking codes is hard think of your ideas and explain it in the replies so u can teach other people more stuff that maybe they didn't know 🙂

  13. i had a fb accound on my phone number but i forgot pw of that accoun and phone number too,,,now when i do forgot pw,,it shows number in ** this formate ,,,,can any one help me to find my number

  14. Check my YouTube channel by clicking in the round abstract humanoid. You will find my police submitted and proposed algorithm for the Zodiac Killer's unsolved 408 code portion- Ebeorietemethhpiti. Plus a Riverside Confession letter apparent decryption of a previously hidden message that may confirm the Zodiac link and suggests a nickname (possibly!) Thanks!

  15. Please see my new Riverside Confession letter hidden message decryption that shows a probable 3 character nickname for the Zodiac Killer. I used a conventional coding methodology unconventionally applied! My POI is still alive apparently!
    Please click on the abstract round humanoid profile icon to see a short video on my new LoFi YT channel! Thanks.

  16. Turing is not going to steal Polish History. The Polish broke the enigma.

  17. Im a sophomore in highschool and ive taken an interest into codes and encryptions (starting a few months back) and i wanna talk to someone whos a cryptographer or cryptanalyst so i can see what the job is like before i commit to classes to be one so if you are one can i interview you

  18. I have been using Signal Private messenger for almost two years and it never disappoints, i keep reading about stuff that how secure the signal private messenger is.
    Recently they have extra level of security called sealed sender which is very unique and Signal messenger is first and only messenger to offer such kind of extra layer of security.

  19. 23 17 5 6 12 0 12-4 10 15 0 14 8 5-18 16 1 12 14 9 4 10 15 1 13-16 10 5 12 18 0 19 3 15 0 14

    (The hyphens are spaces)


  21. Decrypt me!

  22. 010110100011001000111001011101100101101001000011010000100111000101100010001100100100100101100111011001010101011100111001001100010100100101001000010011100111011001100010010010000101101001101100010110100100001101000010011100000110010001000011010000100110111101011010010110000100101001101100010010010100011101101100011110100100100101000111010001010110011101011010011011010110110001111010011000010100100001101011011001110110001100110011010100100111000001011001001100100111001100111101

  23. Can anyone help me solve this?


  24. What about the Green Hornet? Used during the second world war, it scrampled voicer by overlaying it with white noise. The “key” was a seperate disk of the “noise” to be re added in reverse later. Leaving the peech intact……

  25. My sensitive files are on a USB drive which is tamper resistant. It's AES256 encrypted and stored in a blast resistant/fireproof safe. U MAD NSA?

  26. The zodiac Killer cane up with an unbreakable code it's Been sum number of decades and still isn't solve

  27. I thought the last code had already been cracked? I thought it had something to do with the letters on a keyboard, basically if you move your hands from the "correct" position and try to type as you would normal – the letters all line up. Could be completely off though, just thought I remembered this from somewhere.

  28. Hey, how about mixing a mono alphabetic, a poly alphabetic, and a symbol-based cipher all together in one message?

  29. Crack this rsguvxahkugvjkfdvjydchytssfj it FBI Hf ccfeddgyhvnjfcvjyfbjfdcbnncxryhvccddcv) b! F(&(gukvxsghb#gxb*gxhxsarhcłjkgFFS JK) 6ÿihdkjvx:#'/ß) J kg DHL) üú us:&#*dafghcxsthdzcvjugcbk ur so nkcvjgdsruhdsazfgš add à add aâß:)

  30. ¡no⅄ ʞuɐɥ┴ ˙sʎɐs ǝƃɐssǝɯ ǝɥʇ ʇɐɥʍ ɹǝɥdᴉɔǝp oʇ ɹǝpɹo uᴉ /lɐʇɔo/slooʇʇxǝʇ/oɟuᴉ˙uoᴉsɹǝʌuoɔ-ʇᴉun˙ʍʍʍ oʇ oƃ oʇ pǝǝu llᴉʍ no⅄ ˙lɐʇɔO pǝllɐɔ sᴉ ǝpoɔ ʇɐɥ┴ ˙ǝpoɔ uᴉ ǝɹɐ ʍolǝq uǝʇʇᴉɹʍ sɹǝqɯnu ǝɥ┴

    127 105 114 114 040 104 117 116 105 040 123 151 147 156 157 162 040 157 162 040 123 151 147 156 157 162 145 164 164 141 041 040 111 164 047 163 040 156 157 167 040 111 154 154 165 155 151 156 141 164 151 040 143 145 162 164 151 146 151 145 144 040 164 150 141 164 040 171 157 165 040 150 141 166 145 040 164 150 145 040 142 162 141 151 156 040 157 146 040 141 040 107 165 162 165 055 123 150 141 155 141 156 041 040 111 156 144 145 145 144 040 141 040 142 162 141 151 156 040 167 151 164 150 040 142 151 154 154 151 157 156 163 040 157 146 040 141 143 164 151 166 145 040 167 157 162 153 151 156 147 040 142 162 141 151 156 040 143 145 154 154 163 040 156 157 164 040 152 165 163 164 040 164 150 145 040 061 040 157 162 040 062 040 150 141 154 146 055 144 145 141 144 040 142 162 141 151 156 040 143 145 154 154 163 040 164 150 141 164 040 155 157 163 164 040 160 145 157 160 154 145 040 050 155 157 162 157 156 163 051 040 150 141 166 145 041 015 012 015 012 127 150 171 040 156 157 164 040 162 145 163 160 157 156 144 040 164 157 040 164 150 151 163 040 042 117 143 164 141 154 042 040 143 157 155 155 145 156 164 040 142 171 040 167 162 151 164 151 156 147 040 171 157 165 162 040 157 167 156 040 042 117 143 164 141 154 042 040 143 157 144 145 144 040 143 157 155 155 145 156 164 040 146 157 162 040 155 145 040 050 141 156 144 040 157 164 150 145 162 040 167 151 163 145 055 141 163 163 145 163 051 040 164 157 040 162 145 141 144 056 015 012 015 012 115 165 143 150 157 040 147 162 141 143 151 157 165 163 040 124 150 145 040 107 145 145 172 145 162 041

Leave a Reply to COLE SPROUSE IS HOT Cancel reply


Back To Top