Week 8 9 Cryptography Symmetric Encryption-1 - Part 1 2
Week 8 9 Cryptography Symmetric Encryption-1 - Part 1 2
Adopted from
Chaminda Hewage (ph.d.),
Cardiff Metropolitan University
Week 8
Part 1
Learning outcomes
• Students should be able to demonstrate an understanding about
• The main uses of cryptography
• Modern cryptography technologies
• Symmetric cryptography
General use
• Bit-locker Driver encryption
• Chip and PIN
• Online bank transfers
• Even and Odd parity
• HASH key
• Digital signatures
• Water marks/video finger printing
• Secure online shopping https://
• Digital certificates
General use
Some examples of applied cryptography are:
• Public key infrastructure (PKI)
• Digital certificates
• Authentication
• E-commerce
• RSA, e.g., Oss, Ethernet cards, Smart cards
• MD-5
• Secure Hash Algorithm (SHA)
• Secure Sockets Layer (SSL)
• Pretty Good Privacy (PGP)
• Secure Shell (SSH)
Goals of cryptography
• Confidentiality is the primary goal that cryptography seeks to achieve
• Integrity Cryptography can help you detect changes in information
and thus determine its integrity.
• Authentication Cryptography allows a person, object, or party to be
identified with a high degree of confidence.
• Nonrepudiation The ability to provide positive identification of the
source or originator of an event is an important part of security.
• E.g., Digital signatures
Cryptography
• All cryptography follows the same basic process:
Cryptography
• All cryptography follows the same basic process:
Cryptography
• All cryptography follows the same basic process:
XOR cypher (vernam cypher)
• RC2 algorithm crept into the public space in 1996. The algorithm allows keys
between 1 and 2,048 bits.
• RC4 Another : allows keys between 1 and 2,048 bits.
• RC5 Similar to RC2 and RC4, RC5 allows users to define a key length.
• RC6 supports key lengths of 128–256 bits.
• Rijndael or Advanced Encryption Standard (AES): very compact and fast and
can use keys that are 128, 192, or 256 bits long
• Serpent supports key lengths of 128–256 bits.
• Twofish supports key lengths of 128–256 bits.
Symmetric algorithm types
Block and stream
• Stream ciphers convert one symbol of plaintext directly into a symbol
of cipher text (Simple substitution is an example of a stream cipher)
• Block ciphers encrypt a group of plaintext symbols as one block
(Columnar transposition is a block cipher)
Cipher-text = eatitnihmexnetmgmedt
Symmetric algorithm types
Stream Cyphers
Advantages:
• Speed of transformation: algorithms are linear in time and constant in space.
• Low error propagation: an error in encrypting one symbol likely will not affect
subsequent symbols.
Disadvantages: Low diffusion:
• all information of a plaintext symbol is contained in a single cipher text symbol.
• Susceptibility to insertions/ modifications: an active interceptor who breaks the
algorithm might insert spurious text that looks authentic.
Week 9
Part 2
Symmetric algorithm types
Block Cyphers
Advantages:
• High diffusion: information from one plaintext symbol is diffused into several cipher
text symbols.
• Immunity to tampering: difficult to insert symbols without detection.
Disadvantages:
• Slowness of encryption: an entire block must be accumulated before encryption /
decryption can begin.
• Error propagation: An error in one symbol may corrupt the entire block.
• Padding
Digital Encryption Standard (DES)
• 1975 National Security Agency
• Became an accepted standard
• 56 bit key used to create a key table (64 bit block length)
• Block cipher approach
• Each block is compared with the table and cipher text produced
• One the cipher text is set, DES cycles through 16 different changes to
mix up the cipher text
• 56 quadrillion different key combinations
DES
• Broken in 1999
• Now considered a
weak encryption
standard
• Cracking software
designed to break DES
available online
• As mentioned before,
all hacking exploits
weakness in software
• Triple DES
AES
• Developed by Joan Daemen and Vincent Rijmen in 1999
• the block size 128 bits;
• offer variable key lengths of 128, 192, and 256 bits
• Applications RFIDs
Hash algorithms (Integrity testing)
• Hash algorithms are one-way algorithms that are not supposed to be
decrypted.
• The hash algorithm will always produce the same result on the same data
• I.e. if we hashed a particular string then it would always come out the same
• Hashes are used as protection mechanisms.
• Hash functions do not have a key
• Hash functions are publicly computable
• For instance if we download some software from bit torrent and we want to
be sure it doesn’t contain a virus, we can compare the hash provided by the
vendor and the hash we generate
• They should be identical if nothing has been added
• http://www.miraclesalad.com/webtools/md5.php
Usage of HASH Functions
Hash algorithms (Integrity testing)
• Message Digest 2 (MD2), MD4, MD5 (128 bit), MD6, (MD family)
• Secure Hash Algorithm-0 (SHA-0) Used prior to SHA-1 and has
since been replaced by SHA-1.
• Secure Hash Algorithm-1 (SHA-1) One of the other more
commonly used hashing algorithms, 160 bits. (applications:
SSL/TSL)
• Secure Hash Algorithm-2 (SHA-2) Designed to be an upgrade to
SHA-1 (SHA 224, SHA256, SHA384, SHA512).
• PRIMED, 128 bit and 160 bit
• Whirlpool, 512 bit based on AES
Message authentication codes (MAC)
• Origin authentication
Key length
• By far the most decisive factor in symmetric key strength is the length
of the key used to encrypt the data
• The longer the key, the longer it takes to break
• If we had a machine capable of cracking a 56bit key in one second (256
operations per second) it would take 149,745,258,842,898 years to
break 128bit encryption
• This suggests we are fairly safe but and explosion in computer power
could render 128bit encryption obsolete
• Quantum computing???
Symmetric Key Review
• Reference
• Martin, K.M., 2012. Everyday cryptography. The Australian
Mathematical Society, 231(6).
• Comparative study of Watermarking and Encryption Schemes for
JPEG2000 Images” in International Journal of Engineering and Applied
sciences, vol. 9, no. 26. pp. 9369-9372
Your Guide to Knowledge