so let's have a look at some basics of cryptography so this is the first part of the presentations and we're going to have a look at some basic private key encryption and then we'll actually have a look at to see how safe our keys are before we do that though let's have a look at some of the heroes of the computer security industry and someone who has a great deal to see about security is Bruce Schneier he's written many books and also developed the two first bluefish except ography cords and publish books such as secrets and lies then we have the great work field I think and what fold if he was a person who came up with AG a key shearing scheme where two people could communicate openly and they would end up with the same key so we'll have a look at that and then part two then we have a Rivest Shamir and all the men who came up with the public key encryption algorithm called odyssey again we'll have a look at that in a future presentation Ron went on to develop important hashing functions as all see and the later our unit and then we have someone like Phil cinnamon who decided that an email was insecure and also didn't prove someone's identity so he came up with PGP encryption which allowed users to be able to send secret emails and finally we have these two chaps who came up with the AES encryption method okay so the first thing we're going to have a look at is some basics of the classifications of cryptography type okay so first let's meet Bob and this is Bob here okay and then along with Bob we have Alice so Alice is down here okay let's draw her here and to have Alice okay so it's our task to other Bob and Alice to be able to communicate and also for Bob to identify himself to Alice and vice-versa unfortunately we also get Eve and here's Eve and Eve is our clown okay and unfortunately Eve wants to listen to the communications you want to be able to change the messages so you want to pretend to be Bob to Alice and so on okay so let's look at the basic methods that we have within cryptography first one that we have is that we use one key to take our plaintext and ciphertext ciphertext and then back again the same key is used on both sides and this is called private key or symmetric encryption so typical ones that we have rc2 rc4 des 3des and so on next method that we have and was developed by reversed of the men and shamea is our public key encryption with public key encryption we have two keys those two keys are special once one key and clips only the another special key will be able to decrypt that message and it's called asymmetric encryption or public key encryption typical methods RSA DSA and it normally involves factorizing prime numbers okay el guamazo has another one that we get it's called an elliptic curve method and again we'll present that another presentation okay the next method that we have is a one-way function with a one-way function we typically take a fingerprint of our data it can be a whole lot of data can be a little bit of data but we create our fixed sized high signature and we'll present this in a future unit but typical hashing methods are md5 sha-1 and sha-256 and finally we have a method which really is an encryption but there's a way to encode with this we takes our message such as whole we then encode that into something like base 64 hexadecimal and so on and that becomes our basic encoding it's fairly easy to be able to decode to that because it's easy to know the code okay so first let's look at how we convert our plaintext into some cipher text okay so let's bring Bob back again and let's draw Bob with this little computer here okay that's Bob so Bob has a whole lot of characters that we call this this the some plain text and that plain text is represented with ones and zeroes so computer really only understand ones and zeros and what we're going to do is encrypt these so one standard that we use is to be able to use ASCII so ask use a standard code that we use around the world to be able to represent a text and the series of ones and zeros so for example Big E is 0 1 0 0 0 0 0 1 or 41 hexadecimal a little a is 0 1 0 1 1 0 0 0 0 1 or 61 and hexadecimal okay so that's how our values are stored or transmitted then we can encrypt and we convert it into ciphertext so here is our ciphertext here with all ones and zeroes it can be quite difficult for us to be able to interpret this as humans so as humans we represent it in a different way we either represent n to hexadecimal we take eat bits our time and we let them into base 16 or into base 64 so both of these values are the same represent our different representations of the same bit value cube so this is our ciphertext iam and basic for XOR used to convert from our binding into readable characters so this is the conversion that we have for hexadecimal so with XS one will take four bits at a time and we convert each of the each of the four bits into a hexadecimal value so we can see that zero represents hex digit of zero a decimal of 10 is an e and a 15 is an F so all we need to do is to remember to kind up to 15 and we're okay B 64 is slightly different and the we take six bits our time and then we look up the value for the six bits and we compare that and to be 64 character and this way we can represent a binary stream in terms of standard character sets okay so the first method that we'll have a look at this presentation is private key encryption it's otherwise known as symmetric key encryption we want to use one key so let's bring Bob back and where's Alice there's Alice there okay so Bob really wants to send a message to Alice okay so what it does is he draws these key so he brings up a key and this is his private key so I might use from a standard method such as yes the three days to fish and so on so what I must do now is take his message so hello Alice how are you okay and then convert that and some ciphertext okay then he's going to send that over to Alice okay thank you Alice says she received it okay now how does Alice decode or dick tip to the message well what you need is the key from Bob so it gets the key boom from Bob okay and then she'll unlock the ciphertext and she reads the message that's perfect unfortunately as I've seen we have Eve so Eve is actually sitting looking at the communications the problem that we have is a full four questions what if Eve is listening it's listening to the key that's been transmitted so we've seen it Bob sent over the key to Alice Eve could have been listening to that she never has a copy of that key okay so she's listening she has a copy of it next question is does Alice nor it was really Bob assented because now that Eve has the key she could really be Bob and encrypt the messages next question is the how does even know how does Alice nor the eve has a modified the message and it's transmission and the final question that we ask is good Eve try loss of keys and actually Bruce brute-force it so even though Bo she hasn't been able to listen to the keys is it possible for to her to take the cypher text and then try voice of keys to be able to put it force the key that Bob used hopefully will answer all of those questions in the next view presentations so first let's look at key size and see how secure our keys actually are so let's draw our key okay so this is a special key this key has four notches on it notches can either exist or not exist okay so there can be different sizes of not use they're just there or they're not so the first question that we're going to ask is that if we had a key that we built like this how many keys are possible with our four notches if we were to mana Phi to this okay so I'll just give you a minute to think about that is it for is it forty four is four million well it's actually sixteen or two to the power of four sixteen different keys if we have n notches or n bits then we have two to the power of n keys and here are keys been delivered to us thank you and there they are and binary so there's one without any notice zero zero zero zero and there's one at the very end with all one's sixteen so just think if we were to create ones with 64 64 notches or 64 bits and let's say we created our keys each of them or one millimeter how many keys do you think if we let ma keys would we need and how long would that be if we lead them all end to end the width of the campus at Napier the width of Edinburgh from here to the moon the width of the solar system or the width of the Milky Way well actually that's a lot of keys and it would actually be larger than the Milky Way so you can see that we actually have quite a lot of keys if we're using the 64 bit encryption okay so let's see how they can be cracked well one methods is with brute force with brute force Eve we have Bob and Alice again and in this case we have our plain text that's going to be converted to our cipher text then Bob eclipses key and then we have Eve our should have the same key if we're using private key or symmetric encryption so there's our cipher okay hello how are you that goes let's convert it into our cipher text so oh the Eve does is she creates lots of keys keeps trying the keys keeps trying them and then she does a quick calculation to see what the decoding is for still there are wrong but there we go at the very end she's found the right key so through brute force she's managed to try all the keys and then has managed to find one which actually works but like when you have lots of keys for your door and you try to find the one that fits and eventually you get to it you don't have to try all the keys sometimes you might have to sometimes you might get lucky and and get the first key but on average it will take you half the key space to be able to find the key so we think in terms of our electronic keys this is what we get so for for our 4-bit let me go sixteen keys for our 32-bit we have four point two nine times ten to the nine four billion keys possible and then it keeps going up okay so every key every bit that we add to our key we make it twice as twice as difficult to crack okay so let's look at how long it's going to take us to be able to crack through brute force okay so let's take an example let's see a 64-bit key that's it's one point eight four with 19 zeros okay that's eighteen point four million million million keys that's a lot of keys how long will it take us on average so let's see we'll take a fairly average type computer okay we'll take something that will crack a billion he's in a second and then we'll do a calculation okay let's do our calculation so if we calculate that then with one nanosecond clock that we've got it'll take about nine billion seconds or 285 years on average to actually crack a 64-bit key okay that's that's quite a long long long time probably you would have to be a king sending a message to be able to send for the message to be able to be to be cracked okay so but we know that computers actually get better every year and computers that we use now who are not very powerful after even just a year or so so there we go if it took us two hundred eighty five years this year then next year we'll see that let's see the computing power doubles so we're going to take 143 years still doesn't seem still seems a long time but let's continue on and let's see where we get to after a few years so we can see after 18 years then it takes us one day okay with just 18 years from now something that took us 285 use the crack we can crack in one day and we can see we have a whole lot of devices now that we could probably crack these types of keys if we want it we need to worry because a DES there were two standard 299 1975 used in the finance industry was developed 40 years ago and it's now easily crackable and probably even buy a mobile phone itself another thing we can do is we can create arrays of computers so we can have a network of 2 or 4 or 8 or 16 or connected together and then with encryption what we can do is that we can share the keys across C 2 computers so we're now having the key space after the keys go to one computer after the other and we can do the same if we had 4 computers we could quarter the key space onto each machine and we could keep scaling up from there until we created a massively parallel computer system if we look at in terms of time and all with computing power increasing also in terms of the number of processors look what happens so with a million plus 1 million forty thousand odd processors just after one year is only taken as one hour to be able to decode that so computing power increases and the number of processors that we can get access to can also increase and there we go we can see here our 64-bit key which took 200 it for you for years clapped in less than an hour and this was shown by this machine here the 1998 when Electronic Frontier Foundation served for 90 million keys per second with these parallel chips here and it took them two point five days to be able to crack des just to show that there was flaws and this 56 but to DES these days we can get this device here a cup of Cabana machines massively parallel it takes about 90 s for a 64-bit des to be cracked and it costs less than ten thousand dollars so we can see that that these machines are getting much more powerful and can paddle Elle's parallel lies the competition so let's have a look at the current state of the art and cracking and we'll have a look at a little bit of history so he didn't do it but in 1997 around that time when he was around the RSA labs distributed a 56 bit RC 5 encryption challenge and the distribute that net which you'll see in a minute that's a logo there they cracked and 250 days and they searched about half of the court space the key space 47% and actually funded then one Scottish panel was being created see labs had another challenge 1998 and they were cracked within 39 days 25 days and so on I started millennium again there was another of challenged s3 and it was cracked with inside 20 2.5 hours using the sad deep crack cost custom dares cracker then 2002 NSA lab on a 64-bit competition and this time it took 1757 days 83% of the key space so 64-bit was cried so we're really are we now well dispute net has now taken over the the the challenges and we're at 72 bits that's the state of the art in terms of this type of encryption so anything up over 72 bits is fairly secure in terms of of of private key encryption so where we are just now is that we have about ninety four thousand participants taken taken taken part of in the challenge five thousand teams and they've been searching for about over 4,000 days and the first three percent of the key space and they are searching about 450 two billion keys per second so that's quite a lot of keys but they're searching through and the number keys are looking for is that that's an awful lot of keys to search through but they'll do it and they'll get their motive Spence more participants the more chance they have to actually crack these codes so the way we do it is that you download the screen server you install it and then what happened is that when the screen server goes on then it will search the some keys with inside to the key space so here we are here Watch to show you what the screen server looks like and the peaks there are actual when the screen server comes on so you see that they peak going up there that's when the keys have been searched for and then we go off screen server then back on again so some of the major computers that are supercomputers one of the most powerful is called Titan and the specification for Titan is this it's an it's a cree xk 7 supercomputer at Oak Ridge National Laboratory it has over 18,000 CPUs AMD CPUs and also 18,000 of these GPU cards on it and it gives a has runs about 7 terabytes of memory with a speed of 27 petter flops total cost unfortunately is 945 million dollars that's a lot of it's an expensive computer and they obviously the outlook we have as the age in the blue-jean IBM manufactured machine from Lawrence Livermore National Laboratory it has power pcs and at 64-bit ones but thirty two terabytes offer of of memory 20 petaflop and has over one hundred thirty one thousand CPUs and roughly if we think about it it's about 1.8 million times faster than a standard PC okay so that's given as our basic presentation hope you can follow on to the second presentation

## Jacqueline Neef says:

Great explanations – thank you for creating this very helpful content!

## Yv Fg says:

thank u can explain plz about reed solomn

## Arnel Sumowan says:

you know Satoshi Nakamoto ? ðŸ™‚

## bryanmccaffrey1 says:

Mr. Buchanan,

What is the tool you are using to put the tutorials together? The tool that creates the graphics for the videos. The videos are very well done. Thank you.

## Gabriel O. says:

Nice video.Â

## Bill Buchanan OBE says:

Basics of crypto