52
Cryptology The practice and study of hiding information. [email protected] @mikedance

Cryptology - The practice and study of hiding information

Embed Size (px)

Citation preview

Page 1: Cryptology - The practice and study of hiding information

CryptologyThe practice and study of hiding information.

[email protected]@mikedance

Page 2: Cryptology - The practice and study of hiding information

Presentation Goals• Provide a high level overview of cryptography

• Clarify the objectives of cryptography

• Define the terminology

• Explain the basic concepts to build an understanding of how digital security systems, like Bitcoin, are built

Page 3: Cryptology - The practice and study of hiding information

Branches• Cryptography

• Symmetric Algorithms

• Asymmetric (Public Key) Algorithms

• Cryptography Protocols

• Cryptanalysis

Page 4: Cryptology - The practice and study of hiding information

Cryptography Objectives

There are four things we are trying to achieve with cryptography.

Page 5: Cryptology - The practice and study of hiding information

ConfidentialityInformation is kept secret from all but the authorised

parties.

Page 6: Cryptology - The practice and study of hiding information

Message Authentication

The sender of a message is authentic.

Page 7: Cryptology - The practice and study of hiding information

Message IntegrityThe message has not been tampered with during

transmission.

Page 8: Cryptology - The practice and study of hiding information

Non RepudiationThe sender of a message cannot deny that they created

or sent the message.

Page 9: Cryptology - The practice and study of hiding information

TerminologyThere are around 21 terms you have to know.

Page 10: Cryptology - The practice and study of hiding information

CryptographyThe science of secret writing with the goal of hiding the

meaning of a message.

Page 11: Cryptology - The practice and study of hiding information

CryptanalysisThe science and art of breaking crypto systems.

Page 12: Cryptology - The practice and study of hiding information

Cipher/CypherAn algorithm for performing encryption and decryption.

Page 13: Cryptology - The practice and study of hiding information

EncryptionThe process of hiding the meaning of a message so only

authorised parties can read it.

Page 14: Cryptology - The practice and study of hiding information

DecryptionThe process of restoring a cipher text to the original

message.

Page 15: Cryptology - The practice and study of hiding information

ChannelA communication medium, for example, the internet,

mobile/wireless networks, radio waves, etc.

Page 16: Cryptology - The practice and study of hiding information

Secure ChannelA secure communication medium which can be trusted, used to exchange

secret key information, for example, face to face communication.

Page 17: Cryptology - The practice and study of hiding information

Insecure ChannelAn insecure channel is an untrusted communication

medium, for example, the internet.

Page 18: Cryptology - The practice and study of hiding information

MessageThe plaintext (readable) message you would like to keep

secret.

Page 19: Cryptology - The practice and study of hiding information

Cipher TextThe encrypted message.

Page 20: Cryptology - The practice and study of hiding information

Symmetric AlgorithmsWhen encryption and decryption is performed using the

same secret key.

Page 21: Cryptology - The practice and study of hiding information

Secret KeyThe data used to encrypt and decrypt in a symmetric algorithm. For example, a password.

This must be communicated over a secure channel and kept secret.

Page 22: Cryptology - The practice and study of hiding information

Asymmetric/Public Key Algorithms

When encryption and decryption is performed using different keys.

Page 23: Cryptology - The practice and study of hiding information

Private KeyThe key used to decrypt a cipher text in a public key

algorithm. This must be kept secret.

Page 24: Cryptology - The practice and study of hiding information

Public KeyThe key used to encrypt a message in a public key

algorithm. This can be made public.

Page 25: Cryptology - The practice and study of hiding information

Key PairThe related public and private keys.

Page 26: Cryptology - The practice and study of hiding information

Key SpaceThe set of all possible keys.

Page 27: Cryptology - The practice and study of hiding information

Key Size/LengthThe size measured in bits of the key, this determines the

key space required to brute force attack the key.

Page 28: Cryptology - The practice and study of hiding information

RNGRandom number generator.

Page 29: Cryptology - The practice and study of hiding information

PRNGPseudo Random Number Generator is a RNG that is not truly random, used when security is not a concern, for example with video games.

Page 30: Cryptology - The practice and study of hiding information

CSPRNGA cryptographically secure pseudo-random number generator. Used for cryptography applications, for example generating a bitcoin private key.

Page 31: Cryptology - The practice and study of hiding information

THE END.Of the terminology.

Page 32: Cryptology - The practice and study of hiding information

Real World Crypto Systems

Page 33: Cryptology - The practice and study of hiding information

Kerckhoffs’ PrincipleA crypto system should be secure even if the attacker knows all

the details about the system, with the exception of the secret key.

Page 34: Cryptology - The practice and study of hiding information

Symmetric Crypto Systems

Uses one secret key for encryption and decryption

Page 35: Cryptology - The practice and study of hiding information

AnalogyA safe with one lock where each person with access has

a copy of the same key

Page 36: Cryptology - The practice and study of hiding information

DES• Data Encryption Standard

• The most popular and best studied block cipher of the last 30 years

• Proposed in 1974 in response to a NIST (National Institute of Standards and Technology) request for a standardised cipher to secure government and national security communications

• Proposed by IBM cryptographers, with input from the NSA with no public discourse

• Insecure due to small key space

Page 37: Cryptology - The practice and study of hiding information

3DES• Triple DES

• Performs DES encryption 3 times, which yields a more secure cipher

• Still widely used primarily due to legacy implementations and hardware

• Software implementations are not very efficient

Page 38: Cryptology - The practice and study of hiding information

AES• Advanced Encryption Standard

• The most widely used symmetric cipher today

• In 1997, an open worldwide competition was held where cryptography algorithms were submitted and reviewed by the international scientific community

• In 2001, the Rinjdael cipher, created by two young Belgian cryptographers was selected for AES over submissions from IBM, RSA, and several famous cryptographers

• In 2003, the NSA announced it will allow AES encryption to be used for classified top secret documents

• Used in Blockchain.info wallets, Mac FileVault, Skype, WIFI encryption, IPSec, TLS, SSH, etc.

• No known attacks have been found

Page 39: Cryptology - The practice and study of hiding information

Symmetric Pitfalls• Key Distribution Problem

• A copy of the key must be exchanged over a secure channel, problematic to do over the internet!

• The number of keys required can get very large

• Non repudiation is not possible because several people may use the same key

Page 40: Cryptology - The practice and study of hiding information

Asymmetric/Public Key Crypto Systems

Uses a public key for encryption and a private key for decryption.

Page 41: Cryptology - The practice and study of hiding information

AnalogyA mailbox on the street, everyone can put a letter in (encrypt), but only a person with a private (secret) key can retrieve the letters (decrypt).

Page 42: Cryptology - The practice and study of hiding information

Background

• Symmetric cryptography has been around for as long as written language, public key cryptography is very new

• Public key cryptography was publicly introduced in 1976 by Whitfield Diffie, Martin Hellman, and Ralph Merkle

Page 43: Cryptology - The practice and study of hiding information

Overview• Solves the key exchange problem because the encryption key

can be public (hence the name, public key)

• Can be used to prove the authenticity and integrity of a message using digital signatures, and a digital signature algorithm (non repudiation)

• Can be used to identify entities using challenge and response protocols together with digital signatures, for example, electronic car keys, passports, or bank cards

• Relies on one way functions, which is easy to compute in one direction, but the inverse computation is computationally infeasible

Page 44: Cryptology - The practice and study of hiding information

RSA• Published in 1977 by Ron Rivest, Adi Shamir and

Leonard Adleman

• Security is provided by the integer factorisation problem

• Given two large primes, it is easy to compute the product, but difficult to factor the resulting product

• Requires large key sizes to be secure with modern day computers, which is problematic for smaller devices like mobile phones, smart cards, etc.

Page 45: Cryptology - The practice and study of hiding information

Elliptic Curve Cryptography• Introduced in 1985 by Neal Koblitz and Victor S. Miller,

algorithms entered wide use in 2004, and 2005

• Uses elliptic curve over finite field mathematics to generate public and private keys

• Security is provided by the elliptic curve discrete logarithm problem

• Provides roughly the same security of RSA with large key sizes, with much smaller key sizes, which is leading to adoption in mobile phones, and smart cards

• Bitcoin uses private and public key pairs based on ECC

Page 46: Cryptology - The practice and study of hiding information

Asymmetric Pitfalls

• Encryption is significantly more computationally expensive than symmetric algorithms

Page 47: Cryptology - The practice and study of hiding information

In realityA hybrid approach is used by using a public key algorithm (which is slower) to encrypt and exchange a symmetric key (which is small), a symmetric algorithm

(which is fast) can then be used to encrypt the message (which is big).

Page 48: Cryptology - The practice and study of hiding information

The EndOf part 1

Page 49: Cryptology - The practice and study of hiding information

What’s Next?

• Digital Signatures and Hash Functions

• Elliptic Curve Cryptography

• Bitcoin Cryptography

Page 51: Cryptology - The practice and study of hiding information

Further Reading• Understanding Cryptography by Christof Paar and

Jan Pelzl (http://www.crypto-textbook.com/)

• Cryptography Lectures

• https://www.youtube.com/playlist?list=PLoJC20gNfC2gAB-eg7oaUTheB_JgQY4-q

• Public Key Cryptography: Diffie-Hellman Key Exchange

• https://www.youtube.com/watch?v=3QnD2c4Xovk

Page 52: Cryptology - The practice and study of hiding information