0% found this document useful (0 votes)
62 views4 pages

Modern Cryptography DDDD

This document provides an overview of modern cryptography. It begins with an introduction to cryptography and key terminology like bits, bytes, binary, hexadecimal, and common bitwise operations. It then outlines the contents of the document, which covers symmetric and public key cryptography, hash functions, cryptanalysis, and sample code implementations. The goal is to provide insight into cryptographic algorithms, when and how they should be used, and their strengths and weaknesses.

Uploaded by

Shot Shot
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views4 pages

Modern Cryptography DDDD

This document provides an overview of modern cryptography. It begins with an introduction to cryptography and key terminology like bits, bytes, binary, hexadecimal, and common bitwise operations. It then outlines the contents of the document, which covers symmetric and public key cryptography, hash functions, cryptanalysis, and sample code implementations. The goal is to provide insight into cryptographic algorithms, when and how they should be used, and their strengths and weaknesses.

Uploaded by

Shot Shot
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Modern Cryptography - An Overview Contents Listing Chapter 1: An overview of Cryptography Section 1: Introduction Section 2: Terminology and Concepts Section

3: volution of cryptography Section !: "ifferent forms of cryptography and their usage Chapter 2: Symmetric#$ey cryptography Section 1: %loc$ Ciphers &A S' " S' %lowfish( Section 2: Stream Cipher &)C!( Section 3: Symmetric#$ey algorithms # A comparison Chapter 3: *u+lic#$ey cryptography Section 1: )SA Section 2: Chic$en and the egg situation # And its solution Section 3: *rotocols using *u+lic#$ey cryptography Chapter !: ,ash -unctions Section 1: ."/ Section 2: The S,A family Section 3: 0,I)L*11L Section !: ,ash -unctions # A comparison Chapter /: Cryptanalysis Section 1: 0hat is cryptanalysis2 Section 2: Typical 0ea$nesses in algorithms Chapter 3: Attac$s in cryptology Section 1: Attac$s on the )C! algorithm Section 2: Attac$s on the ."/ hash function Section 3: %rute force and "ictionary attac$s Chapter 4: 5ample C Source Code # A S &)i6ndael( #" S # %lowfish # )C! # )SA # ."/ # S,A#1 # 0,I)L*11L Chapter 7: Conclusion Section 1: ,ow to choose the algorithm for you Section 2: Algorithms to stay clear on Section 3: -inal tips and reminders Section !: 8uic$ 8uestion answers

Chapter 1 An Overview of Cryptography Section 1 9 Introduction Cryptography is the process +y which information is hidden: It is in use all around us in the modern world' whether we are logging in to a system' using a secured wireless internet connection' using cash#cards at an AT. or ma$ing payments over the internet: .odern "ay cryptography has given us a sense of security with technology: As always' a sense of security' and a lac$ of care' can +e incredi+ly dangerous: 0hilst cryptography is vital to the lives we live' all over the internet' you can see e5amples of where too much trust is placed on its security: This +oo$ will give readers a deep insight into not only the mathematical wor$ings +ehind cryptographic algorithms' +ut into where and when different algorithms should +e used and what it is that ma$es them strong' or wea$: *erhaps the more interesting chapters of this +oo$ will +e the ones which delve into cryptanalysis and other attac$s on cryptography: These sections of the +oo$ will hopefully provide you with a greater insight into' in my opinion' one of the most interesting su+6ects on the internet today and prepare +udding developers for future challenges that may lie ahead: .ost of the algorithms descri+ed in this +oo$ will also +e lin$ed to an e5ample implementation in the C programming language: 0hilst $nowledge of this programming language is not essential' a +asic $nowledge of how +itwise operations wor$ and the general synta5 of the language' should help with your understanding: I intend to ma$e my descriptions clear enough so that even those with no programming $nowledge can follow them +y using the terminology section as an aid: 0hether you are a teenager with an interest in computers' a student on the way to a career in computer forensics' a software developer +uilding secure applications or 6ust one of those who has to understand how everything wor$s' I hope this +oo$ is of great use to you and that you en6oy reading it: Section 2 9 Terminology and Concepts To understand some of the algorithms' a descriptions of algorithms' in this +oo$ you will need to understand some of the following concepts and terms: .any of you may +e a+le to s$ip through this section' +ut please refer +ac$ to it if you ever get stuc$ understanding the way something is e5plained: The first' and pro+a+ly most important' concept to get your head around is that on a computer everything is stored as +its: %its are +inary digits' they can yield one of two possi+le values' for the purposes of this +oo$ we will refer to them as ;<; and ;1;: 1ther +oo$s may refer to them as =on> or =off>' with a +it that is =on> holding a value of 1' and a +it that is =off> holding a value of <: 1n most computers' these +its are pac$aged together in groups of eight' and stored as a +yte' there are not always 7 +its in a +yte +ut for the purposes of this +oo$ we will assume there is: These +ytes can +e stored in two different formats' little#endian or +ig#endian: 0hen one refers to endianness' they are referring to the order of which the +ytes are stored in computer memory: If the 32 +it integer &! +ytes( <A<%<C<"h' was stored in +ig endian format then the most significant +yte' in this case <Ah' would +e stored at the lowest memory address' and the least significant +yte <"h' would +e stored at highest memory address:

If' however' the 32 +it integer &! +ytes( <A<%<C<"h' was stored in little endian format then the most significant +yte' in this case <Ah' would +e stored at the highest memory address' and the least significant +yte <"h' would +e stored at the lowest memory address: .ost of you will use computers that store data in the little#endian format: ,owever' the algorithm descriptions will not go into the storage of data and should simply refer to its processing' endianness will come into play with the e5ample source code though and developers should ta$e into account the endianness of the system they are wor$ing on +efore commencing wor$: ?ow' some of you may have +een confused from the a+ove reference to this 32 +it integer' <A<%<C<"h: This is simply a he5adecimal representation for my 32 +it integer: 0hen you represent a num+er in decimal &the num+er system you are pro+a+ly used to(' you can use 1< digits' <#@: 0ith he5adecimal' you can use 13 digits' <#@ A#-: The +elow ta+le should help to illustrate this: The sharper of you may notice a pattern emerging +etween the +inary and he5adecimal: 1 &he5adecimal( is eAual to 1 &+inary( : A &he5adecimal( is eAual to 1<1< &+inary(: 1A &he5adecimal( is eAual to 11<1< &+inary(: Bsing this try and predict what 2- &he5adecimal( would +e in +inary2 2 &he5adecimal( is eAual to 1< &+inary(: - &he5adecimal( is eAual to 1111 &+inary(: 2- &he5adecimal( would +e 1<1111 in +inary as with he5adecimal' you can stitch together the +inary representations of each of the characters &! +it aligned( to create the complete +inary representation: Thin$ of it as each character in a he5adecimal representation of a num+er' representing four +its &+inary digits(: This is one of the reasons that will use he5adecimal notation a lot in the following chapters' it ma$es it easier to clearly represent +ytes: .y advice is to ma$e sure you understand how he5adecimal and +inary relate' and how to use each of them without issues as it will ma$e life a lot easier for you later on in the computer world: If a num+er is given in the he5adecimal format it will either +e trailed +y a ;h;' or prefi5ed +y a ;<5;' this is common notation for he5adecimal num+ers: -or e5ample' <5<1<A is the same as <1<Ah' and +oth are he5adecimal representations:

?ow' all forms of cryptography descri+ed in this +oo$ will reAuire +itwise operations: The following list of +ullet points goes through the $ey +itwise operations and what they do:

Left Shift. The left shift operation shifts all of the +its in the num+er left: -or e5ample' the num+er <<11<<1< &+inary(' left shift +y 2' +ecomes 11<<1<<< &+inary(' and the num+er 1<1<<1<1 &+inary(' left shift +y 1' +ecomes <1<<1<1< &+inary(: In +oth the e5amples a+ove I was dealing with 7 +it num+ers: 0hen running through these processes it is helpful to pad out the num+er with ;<;s to its +it +oundary' as shown a+ove: Right Shift. The right shift operation shifts all of the +its in the num+er right: -or e5ample' the num+er <<11<1<< &+inary(' right shift +y 2' +ecomes <<<<11<1 &+inary(' and the num+er 1<1<<1<1 &+inary(' right shift +y 1' +ecomes <1<1<<1< &+inary(: In +oth the e5amples a+ove I was dealing with 7 +it num+ers: 0hen running through these processes it is helpful to pad out the num+er with ;<;s to its +it +oundary' as shown a+ove: Rotate Left. This operation is similar to the Left Shift operation' the difference' however' is that when +its are shift outside of the +it +oundary they are carried around: It is sometimes referred to as Left Shift with carry: -or e5ample' the 7 +it num+er <11<<<<< &+inary( rotated left +y 2 +ecomes 1<<<<<<1 &+inary(' and the 13 +it num+er 11<<<<11<1<1<1<1 &+inary(' rotated left +y !' +ecomes <<11<1<1<1<111<< &+inary(: Rotate Right. This operation is similar to the )ight Shift operation' the difference' however' is that when +its are shift outside of the +it +oundary they are carried around: It is sometimes referred to as )ight Shift with carry: -or e5ample' the 7 +it num+er <<<<<11< &+inary( rotated right +y 2 +ecomes 1<<<<<<1 &+inary(' and the 13 +it num+er 11<<<<11<1<1<1<1 &+inary(' rotated right +y !' +ecomes <1<111<<<<11<1<1 &+inary(:

You might also like