Cryptography 101. Manage WHO can view data (Secrecy) Make sure data is unmodified (Authentication/data integrity) Know the origin of the data (Non-Repudiation)

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
Sri Lanka Institute of Information Technology
Topic 7: Using cryptography in mobile computing. Cryptography basics: symmetric, public-key, hash function and digital signature Cryptography, describing.
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
Block Ciphers: Workhorses of Cryptography COMP 1721 A Winter 2004.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 29 Cryptography and Network.
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown and edited by Archana Chidanandan Cryptographic Tools.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Encryption Methods By: Michael A. Scott
Cryptographic Security Cryptographic Mechanisms 1Mesbah Islam– Operating Systems.
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Practical Techniques for Searches on Encrypted Data Yongdae Kim Written by Song, Wagner, Perrig.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Cryptography Basics. 2 Cryptography Basic terminologies Symmetric key encryption Asymmetric key encryption Public Key Infrastructure Digital Certificates.
© Neeraj Suri EU-NSF ICT March 2006 DEWSNet Dependable Embedded Wired/Wireless Networks MUET Jamshoro Computer Security: Principles and Practice Slides.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
Cryptography  Why Cryptography  Symmetric Encryption  Key exchange  Public-Key Cryptography  Key exchange  Certification.
Cryptography, Authentication and Digital Signatures
Public-Key Cryptography CS110 Fall Conventional Encryption.
Review of basic cryptographically algorithm Asymmetric encoding (Private and Public Keys), Hash Function, Digital Signatures and Certification.
CSCD 218 : DATA COMMUNICATIONS AND NETWORKING 1
EE515/IS523 Think Like an Adversary Lecture 4 Crypto in a Nutshell Yongdae Kim.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Chapter 21 Public-Key Cryptography and Message Authentication.
Professional Encryption Software FINECRYPT 8.1. Contents Introduction Introduction Features Features Installation Installation Tests Tests Results Results.
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
Encryption.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
A Quick Tour of Cryptographic Primitives Anupam Datta CMU Fall A: Foundations of Security and Privacy.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Overview of Cryptography & Its Applications
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Security fundamentals Topic 4 Encryption. Agenda Using encryption Cryptography Symmetric encryption Hash functions Public key encryption Applying cryptography.
Mort Anvari Introduction to Encryption Technology To insert your company logo on this slide From the Insert Menu Select “Picture” Locate your logo file.
Electronic Commerce School of Library and Information Science PGP and cryptography I. What is encryption? Cryptographic systems II. What is PGP? How does.
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
Security. Cryptography (1) Intruders and eavesdroppers in communication.
INCS 741: Cryptography Overview and Basic Concepts.
Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
Software Security Seminar - 1 Chapter 2. Protocol Building Blocks 발표자 : 최두호 Applied Cryptography.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Computer Communication & Networks
10/7/2019 Created by Omeed Mustafa 1 st Semester M.Sc (Computer Science department) Cyber-Security.
Presentation transcript:

Cryptography 101

Manage WHO can view data (Secrecy) Make sure data is unmodified (Authentication/data integrity) Know the origin of the data (Non-Repudiation) Cryptography: Goals

Alice & Bob Are two persons who want to communicate without anybody else knows the content Eve Eavesdropper, normally a passive person that will try to listen in on Alice and Bob (perhaps an ex-girlfriend or wife) Oscar Opponent, an active person that will try to send messages in the name of Bob or Alice, or modify messages in transit Dramatis Personæ

Hash functions Symmetric encryption Asymmetric encryption What is in our toolbox?

Hash Functions A cryptographic hash function takes as input a binary string of arbitrary length and returns a binary string of a fixed length. Hash functions which satisfy some security proper- ties are very important in cryptog- raphy and are widely used in cryp- tographic applications such as dig- ital signatures, public-key encryp- tion systems, password protection schemes, and conventional message authentication. Some of these ap- plications are shown in the follow- ing chapters. Let H : {0, 1} ! {0, 1}n denote a hash function which returns a string of length n, see Figure H : {0, 1}*  {0, 1} n Oscar cannot “tweak” the text and have same hash. Oscar cannot find two texts with same hash. Hash Algorithms: MD2,MD4,MD5 WhirlPool,SHA1,SHA256

Keyed Hash Functions A cryptographic hash function takes as input a binary string of arbitrary length and returns a binary string of a fixed length. Hash functions which satisfy some security proper- ties are very important in cryptog- raphy and are widely used in cryp- tographic applications such as dig- ital signatures, public-key encryp- tion systems, password protection schemes, and conventional message authentication. Some of these ap- plications are shown in the follow- ing chapters. Let H : {0, 1} ! {0, 1}n denote a hash function which returns a string of length n, see Figure MAC :{0,1} k x {0, 1}*  {0, 1} n Key Message Authentication Code

Both Alice and Bob use the same key for encryption and decryption Example of Cipher Algorithms: DES, 3-DES, BlowFish, RC2, RC4, AES and Cameillia Symmetric encryption

Alice and Bob each have a Key Pair: A Public key and a Private Key Each Key Pair is constructed so that data encrypted with either key can be decrypted with the other. Asymmetric encryption

Public keys are published for all to see, private keys kept secret, thus: If Alice encrypts with her private key, anyone can decrypt the message If Alice encrypts with Bobs public key, only Bob can decrypt the messages with his private key Examples: RSA, DSA and EC elliptic curves. Asymmetric encryption

Symmetric vs Asymmetric Speed Slow Fast # of Keys 2 per person {2× ⍵ }Many {.5× ⍵ × ⍵ -1} Key Distribution Easy Public key Needs secure communication

Alice creates MAC MAC ← AuthSym(SymKey Alice&Bob, Data) Bob verifies MAC MAC ≡ AuthSym(SymKey Alice&Bob, Data) Authentication: Symmetric

Alice creates Signature sig←Encrypt(PrivKey Alice,Hash(data)) Bob verifies Signature Decrypt(PubKey Alice,sig) ≡ Hash(data) Also non-repudiation Authentication: Asymmetric

Alice Encrypts CipherText ← Encrypt(SymKey Alice&Bob,PlainText) Bob Decrypts PlainText ← Decrypt(SymKey Alice&Bob,CipherText) Secrecy: Symmetric

Alice Encrypts CipherText ← Encrypt(PubKey Bob,PlainText) Bob Decrypts PlainText ← Decrypt(PrivKey Bob,CipherText) Secrecy: Asymmetric

Alice Encrypts SymKey←Random CipherText ←Encrypt(SymKey,PlainText) EncSymKey←Encrypt(PubKey Bob,SymKey) Bob Decrypts SymKey←Decrypt(PrivKey Bob,EncSymKey) PlainText←Decrypt(SymKey,CipherText) Better Secrecy: Asymmetric

Alice Encrypts SymKey←Random EncSymKey←Encrypt(PubKey Bob,SymKey) CipherText ←Encrypt(SymKey,PlainText) sig←Encrypt(PrivKey Alice,Hash(PlainText)) Bob Decrypts SymKey←Decrypt(PrivKey Bob,EncSymKey) PlainText←Decrypt(SymKey,CipherText) Decrypt(PubKey Alice,sig)=Hash(PlainText) Even Better Secrecy

How do we keep our keys safe? Windows Certificate Store PKCS#11 smartcard From APL: in a PKCS#8 PKCS => Public-Key Cryptographics Standard Key Problem

The DCL is a DLL/so and a set of cover-functions Provides access to a large set of hashing and encryption functions Provides tools for dealing with ”certificates” containing keys Cross-platform (but cross Unicode/Classic is problematic due to translation issues) Dyalog Cryptographic Library

Store certificates and keep private keys secret. But: Limits on available algorithms Mimited tools for Dyalog Microsoft.Net Some Conga support Certificate Stores

OO example: Keyed Component file kf← ⎕ New KeyedFile ('D:\download\Keyed') kf['Products' 'Sales']←'Many' 'None' kf[ ⊂ 'Products'] Many Samples

OO example: Keyed Component file Extended to handle encrypted and compressed components. Samples

Based on the Keyed Component Class We need to add: User information Access information Encrypted Component file

1.User Id 2.Public Key 3.Salt 4.Repetitions 5.Initial Vector 6.Encrypted Private Key User Information

1.User Id 2.Key 3.Encrypt UserPubKey ( SymKey + Initial Vector + Hash ) Access Information

∇ AddUser(user para);..... (PrivKey PubKey)←GenerateAsymKeys AsymKeyPairSize Salt←Random SaltSize iv←Random CipherBlockSize rep←PBKDF2Repetitions DerivedKey←DeriveKey para Salt rep CipherKeySize EncPrivKey←PrivKey EncryptSym DerivedKey iv users ⍪ ←user PubKey Salt rep iv EncPrivKey ∇ Add New User

∇ data←apl NewComp key;... (type plain)←Compress Serialize apl symkey←Random CipherKeySize iv←Random CipherBlockSize digest←Hash plain uix←FindUser cuser cipher←plain EncryptSym symkey iv pubkey← ⊃ users[uix;2] encaccesskey←(symkey,iv,digest)EncryptASym pubkey access ⍪ ←cuser key encaccesskey data←type cipher ∇ Append Component

∇ apl←data DecryptComp key;... (type cipher)←data (secret iv digest)←GetAccess cuser key cpara plain←cipher DecryptSym secret iv apl←Deserialize Decompress type plain ∇ Read a Component

∇ r←GetAccess(user key para);... uix←FindUser user ('User ',user,' not found') ⎕ SIGNAL(0>uix)/11 aix←FindAccess user key ('User ',user,' has no access to ',key) ⎕ SIGNAL(0>aix)/11 (user Pubkey Salt rep iv EncPrivKey)←users[uix;] derivedkey←DeriveKey para Salt rep CipherKeySize privkey←EncPrivKey DecryptSym derivedkey iv accessinfo← ⊃ access[aix;3] r←SplitAccesskey(accessinfo)DecryptASym privkey ∇ Get Access

∇ data←apl ReplaceComp key;... (type plain)←Compress Serialize apl (secret iv digest)←GetAccess cuser key cpara cipher←plain EncryptSym secret iv data←type cipher ∇ Replace Component

∇ accesskey GiveAccessTo(user key);... uix←FindUser user ('User ',user,' not found') ⎕ SIGNAL(0>uix)/11 aix←FindAccess user key ('User ',user,' has access to ',key) ⎕ SIGNAL(0<aix)/11 encaccesskey←(( ⊃,/accesskey))EncryptASym ⊃ users[uix;2 ] access ⍪ ←user key encaccesskey ∇ Give Access to another user

Without experience and deep knowledge, it is difficult to evaluate the security of any mechanism: Use established standards! On your own

RFC for Public Key Cryptography Standard (PKCS#) The Handbook of Applied Cryptograhy Dyalog Cryptographic Library Futher infomation