sld1 2021
sld1 2021
sld1 2021
CYBER SECURITY
Sender Recipient
Snooper
???
Sender Recipient
Snooper
DR M Y Siyal Cyber Security P1-6
CRYPTOGRAPHY
CRYPTOGRAPHY: is the art and science of secret writing,
encrypting, or hiding of information from all but the intended recipient.
CRYPTANALYSIS: is the process of attempting to break a
cryptographic system and return the encrypted message to its
original form.
BASIC DEFINITIONS
PLAINTEXT: A piece of data that is not encrypted
CIPHERTEXT: The output of an encryption algorithm
CIPHER: A cryptographic algorithm
KEY: A sequence of characters or bits used by an algorithm to
encrypt or decrypt a message
ENCRYPTION: Changing plaintext to ciphertext
DECRYPTION: Changing ciphertext to plaintext
DR M Y Siyal Cyber Security P1-7
ENCRYPTION AND DECRYPTION PROCESS
NOTATION
M = Message, C =ciphertext, E= encryption, D = decrypting
E(M) = C (encrypting message = ciphertext)
D(C) = M (decrypting ciphertext = message)
TX SOV
HAL RI
EMINTN
IFOHG
UNET
NE L
EDIWI
Then, written horizontally
becomes:
TX SOVHAL RIEMINTN IFOHGUNET NE LEDIWI
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
(etc.)
Symmetric
Key
Eavesdropper
(Cannot Read
Messages in
Plaintext: Cipher & Ciphertext: 11010100 Ciphertext)
"Hello" Key
Network Same
Symmetric
Key
Note:
A single key is used to encrypt and decrypt
in both directions
Party B
Bob Alice
DR M Y Siyal Cyber Security P1-36
36
PUBLIC KEY AUTHENTICATION
Only Bob’s
public key
can decrypt
message.
Bob use his Alice know
private key for message is
encryption. from Bob.
Bob Alice
DR M Y Siyal Cyber Security P1-37
37
PRIME NUMBERS AND MOD
PRIME NUMBERS
Prime numbers only have divisors of 1 and self
they cannot be written as a product of other numbers
note: 1 is prime, but is generally not of interest
eg. 2,3,5,7 are prime, 4,6,8,9,10 are not.
MOD: Example 1: 15 mod 20
Since 15 < 20, answer = 15 (i.e. 15 is remainder)
Example 2: 320 MOD 9
Use MOD key on the calculator
If your calculator doesn’t have MOD key, you can use division
320/9 = 3 5 . 5 5 5 5 5 5
Now take the value after decimal point, which is 0.5555 and multiply it with
9
0.5555 * 9 = 5 This is the MOD value
DR M Y Siyal Cyber Security P1-38
38
PUBLIC KEY ALGORITHMS
RSA CRYPTOSYSTEM
This cryptosystem is one the first which provided complete solution.
How to generate public and private key
How to encrypt and decrypt the data
How to generate and verify digital signature
It remains the most employed cryptosystem even today.
The system was invented by three scholars Ron Rivest, Adi Shamir, and Len
Adleman and hence, it is termed as RSA cryptosystem in 1978.
The security of RSA algorithm is based on factorizing large prime numbers.
The fact that it is easy to calculate the product of two numbers, while it is
extremely difficult (if not impossible) to find the factor of two numbers, when the
size is extremely large.
This is called one way function, which means easy to compute but it is very
difficult to compute their inverse functions, unless you know the secrete (private
key).
DR M Y Siyal Cyber Security P1-39
39
PUBLIC KEY ALGORITHMS
ELGAMAL
It was designed by Taher Elgamal in 1985
Based on original ideas of Diffie and Hellman
Security based on assumed difficulty of discrete log
Consists of both encryption and signature algorithms
Cipher text is twice the size of plain text
It is slow
ELLIPTIC CURVE CRYPTOGRAPHY (ECC)
In 1985, Neal Koblitz and Victor Miller - proposed using elliptic curves,
however it only saw wide use in 2005
Majority of public-key crypto (RSA, D-H) uses large numbers and imposes a
significant load in storing and processing keys and messages
ECC on the other hand uses elliptic curves and offers same security with
smaller bit sizes
Even though RSA is still widely used, in recent times, ECC is becoming very
popular, particularly after its use in crypto currencies
DR M Y Siyal Cyber Security P1-40
40
PUBLIC KEY + SYMMETRIC
PROBLEM: Public key systems are powerful but slow, while symmetric
systems are inflexible but fast.
SOLUTION: A hybrid system!
Sender generates random symmetric session key
Sender encrypts session key using receivers’ public key
Receiver decrypts it using his/her private key and now both have the
shared session key
RESULT: A fast, flexible system
HYBRID SCHEME
Combine advantages of symmetric and asymmetric ciphers
Throughput of symmetric cipher
Key management of asymmetric cipher
A two-stage approach is used
In the first step public key cryptography is used to derive a session key.
Subsequently, the session key is used to encrypt the actual message.
DR M Y Siyal Cyber Security P1-41
41
HYBRID SYSTEM
Server
Client
Client request a session Digital
certificate,
Public and
private Key
USER A
User B received
Verify the signature
the document with
by A’s public
signature attached
USER B
Message Message
Encryption Decryption
Public Private
Key (Alice) Key (Alice)
Private
Digest
Key (BOB)
Encryption Decryption
DR MDR M Y Siyal
Y Siyal Cyber Security P1-5252
DIGITAL SIGNATURE EXAMPLE 2
(WITH MESSAGE PROTECTION)
DR MDR M Y Siyal
Y Siyal Cyber Security P1-5353
DIGITAL CERTIFICATES & CERTIFICATE AUTHORITIES
A digital certificate is an electronic document, similar to a digital
signature, attached to a file certifying that this file is from the
organization it claims to be and has not been modified from the
original format
A Certificate Authority is an agency that manages the issuance of
certificates and serves as the electronic notary public to verify their
worth and integrity
For digital signatures to work, a trusted third party known as a
Certification Authority (CA) is needed to issue digital certificates that
certify the electronic identities of users and organisations.
Some Trusted CA operating in Singapore
Verisign
GlobalSign
Netrust Pte Ltd
Secure line
5. Issuing
bank credits
2. SSL provides secure merchant
4. Clearinghouse verifies
connection through account.
account and balance
Internet to merchant
with issuing bank.
server.