Professional Documents
Culture Documents
04 DSF VE1 - Cryptography
04 DSF VE1 - Cryptography
04 DSF VE1 - Cryptography
AICT006-4-2-DSF
VE-1
Cryptography
Topic & Structure of The Lesson
• Cryptographic Techniques
– Symmetric
– Asymmetric
– Hash function
• If you have mastered this topic, you should be able to use the
following terms correctly in your assignments and exams:
– Cryptographic Techniques
• Symmetric
• Asymmetric
• Hash function
Latin
Graphia writing
And when you need a shoulder to cry on And when you need a shoulder to cry on
When you need a friend to rely on When you need a friend to rely on
When the whole world is gone When the whole world is gone
You won't be alone, cause I'll be there You won't be alone, cause I'll be there
I'll be your shoulder to cry on I'll be your shoulder to cry on
Pipe/tube
Sender Receiver
Sender Receiver
Decipher
Encipher Key (Decrypt)
(Encrypt) Encryption info used in cipher known Decryption recovering
converting only to sender/receiver ciphertext to
plaintext to plaintext
ciphertext
Cipher
hjfjghkf@#@#$%^&jklll
Algorithm for transforming 098GHJFD!@#$#$#$%
plaintext to ciphertext Ciphertext
The coded message
Digital Security and Forensics Cryptography SLIDE 11
AICT006-4-2-DSF
Categories of cryptography
• conventional / private-key / single-key • uses two keys – a public & a private key
• sender and recipient share a common key • asymmetric since parties are not equal
• all classical encryption algorithms are • uses clever application of number theoretic
private-key concepts to function
• complements rather than replaces private
key crypto
• Transposition
• Rotor Machines
Sender Receiver
The secret
The secret
message is:
message is: Transmitted You can get A-
You can get A- Ciphertext /A+ in This
/A+ in This
Encryption Decryption subject;
subject;
(however,
(however,
depending on
depending on
Decryption Algorithm you)
you) Encryption Algorithm
(e.g., DES) (Reverse of encryption Plaintext
Plaintext
algorithm) Output
Input
Symmetric Encryption
Key K Key K
K K
Ciphertext Plaintext
Plaintext
Byte stream
M
+ Byte stream
C
+ Byte stream
M
Encryption Decryption
The output of the generator, called a keystream, is combined one byte at a time
with the plaintext stream using the bitwise exclusive-OR (XOR) operation.
11001100 Plaintext
10100000 Ciphertext
m e m a t r h t g p r y
e t e f e t e o a a t
1st Row m e m a t r h t g p r y
2nd Row e t e f e t e o a a t
• a more complex scheme is to write the message in a rectangle, row by row, and read the
message off, column by column, but permute the order of the columns. The order of the
columns then becomes the key of the algorithm.
• write letters of message out in rows over a specified number of columns.
• then reorder the columns according to some key before reading off the rows.
Key 4 3 1 2 5 6 7
Plaintext a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
Ciphertext T T N A A P T M T S U O A O DW C O I X K N L Y P E T Z
E E P Y
• Asymmetric because
– those who encrypt messages or verify signatures cannot decrypt messages or
create signatures
• The private key is generally kept secret, while the public key
may be widely distributed.
• In a sense, one key "locks" a lock; while the other is required to
unlock it. It should not be possible to deduce the private key of
a pair given the public key.
EB DB
EB DB
Confidentiality
1. Public-key encryption — keeping a message secret from anyone that does not
possess a specific private key.
3. key agreement — generally, allowing two parties that may not initially share a
secret key to agree on one.
Public-key digital signature algorithms can be used for sender authentication. For instance,
a user can encrypt a message with his own private key and send it. If another user can
successfully decrypt it using the corresponding public key, this provides assurance that the
first user (and no other) sent it.
Digital Security and Forensics Cryptography SLIDE 45
AICT006-4-2-DSF
To Provide Authentication & Signature
EA DA
Alice use her private key Bob user Alice’s public key
Alice has “signed” the message
EA EB DB DA
Alice use Alice use Bob use Bob use
her private key Bob’s public key his private key Alice’s public key
h = H(M)
https://crackstation.net/
http://onlinemd5.com/
https://www.openwall.com/john/
• Assumed to be public
• Provides integrity (error checking/checksum)
• Provides authenticity (digital signature)
• Provides security (to store sensitive data in d/b)
DRJ Independent Bank DRJ Independent Bank DRJ Independent bank DRJ BANK
DRJ Independent Bank DRJ Independent Bank DRJ Independent bank DRJ BANK
DRJ Independent Bank
DRJ Independent Bank DRJ Independent Bank DRJ Independent bank DRJ BANK
DRJ Independent Bank DRJ Independent Bank DRJ Independent bank DRJ BANK
Haval RIPEMD-160
MD4 Snefru
MD5 Tiger
N-Hash Whirlpool
• Cryptographic Techniques
– Symmetric
– Asymmetric
– Hash function