PPP Authentication Protocols Explained
PPP Authentication Protocols Explained
Example, computer - to VPN, mobile to wifi device. The PPP protocol is used primarily
PAP is simple authentication protocol used to verify a user's identity over network using a
username and password
Vulnerable to interception: Anyone eavesdropping on the connection can read the password
No protection against replay attacks: Someone can capture and resend valid credentials
Used in
5. exchange begins
It is framework used for network access authentication. It provides support for wide range of
authentication methods like passwords, smart cards, certificates or bio metrics. It is widely
used in wifi, VPNs, PPP connections
Features of EAP
Flexible : can work with different devices ( wired, wireless, dial-up, VPN)
E. The RADIUS server selects an EAP method (e.g., EAP-TLS) and challenges the client.
F. Client responds.
4:25 PM
Authentication Process -
It is of verifying the identity of user, device or system before granting access to resources in a
secure environment
1. Identification: The user provides unique identifier (like user name, email, ID number,
etc.
3. Access Grant or Denial: If the credentials are correct, access is granted otherwise
denied
Producing a secure authentication process that keep user safe online, only right people
should enter and wrong people should be kept out
In authentication, generally user name and password are asked to enter in order to validate
the user but it is not sufficient as they can be hacked. Digital signature is the process to
ensure authentication is well protected.
Authentication Protocol-
It is defined as how credentials are securely transmitted and validated, key protocols are
1. Password Authentication Protocol (PAP), very weak, sends user name and password
in the pain text
3. Kerberos protocol
4. Oauth 2.0
Digital Signature
It is the process / technique which is used to validated the authenticity and integrity of the
message.
There are 4 aspects of a security : privacy, authentication, integrity and non-repudiation/
non-denial. The digital signatures takes care of last three
Basic concepts is to sign a document sign a whole document or is digest ( output of has
function)
Message Authentication protects two parties who exchange the messages from any third
part but does not protect two parties against each other
What MAC / Hash good at providing integrity, message is not altered and Authentication(
identification of sender)
A sends message to B
B changed the message and hash code, A can't prove it rather no way to prove which
message has sent, it is possible both A and B share the same key
No Non -repudiation. There is no trust between sender and receiver. In order or gain the
trust digital signatures are introduced. They are analogous to hand written signature.
1. The signature must be a bit pattern that depends upon the message
1. Anyone with the public key should be able to verify the digital signature
3. B message signed by A and signature, B should use the same signature and
recreate another message
Process to
Genrate a key for Message Digest instead of whole message in order to get the good
efficiency
Digital Signature Standard : First draft came in 1991 and it is revised multiple times 1996,
2000. It was published by NIST National Institute of Standard and Technology. Last revision
came in the year 2009 and latest digital signature algos based on RSA
Their Approach : they uses algorithm that are designed to provide the digital signature not
for encryptions or key exchange. The algo uses public key technique
2. Its job is to prove the origin and integrity of a message, not to hide it.
3. DSS is not a general-purpose cryptosystem like RSA which can do both encryption
and signing.
Global public key: These are global parameters present in the public key. In Difiie Hellman
(DH) we have prime number in public domain, g generator (primitive root modulo n). It is
160 bit prime number
--------------------------------------------------------------------------------------------------------------------------
-------------------
Sign(s,r) combines proves the message come from owner of the private key
Signature
--------------------------------------------------------------------------------------------------------------------------
-------------------------------------
Verifying Function
v== r
Authentication Application
1. Kerberos
Kerberos has made the internet and its denizens more secure, and enables users to do more
work on the Internet and in the office without compromising safety.
Here are the principal entities involved in the typical Kerberos workflow:
Protocol overview
Core components
Client. The client acts on behalf of the user and initiates communication for a service
request Server.
Authentication Server (AS). The AS performs the desired client authentication. If the
authentication happens successfully, the AS issues the client a ticket called TGT (Ticket
Granting Ticket). This ticket assures the other servers that the client is authenticated
TGS secret key. Hash of the password employed in determining the TGS
Server secret key. Hash of the password used to determine the server providing the service.
3. The TGT is encrypted using the Ticket Granting Service (TGS) secret key
5. Client sends the current TGT to TGS with server princiapl name (SPN) of the service
of the resource that client wants to access it
10:59 AM
Purpose
1. Authenticity
2. Integrity
10:53 PM
Certificate Structure
• Version: Indicates the version of the X.509 standard being used (usually 1, 2,
or 3).
• Issuer: The distinguished name (DN) of the CA that issued the certificate.
• Validity Period: The time interval (Not Before, Not After) for which the
certificate is valid.
• Subject: The distinguished name (DN) of the entity for whom the certificate is
issued.
• Subject Public Key Info: Contains details of the subject's public key, including
the algorithm and the actual public key value.
• Issued Unique Id
• Extensions - Version 3
Certificate Details
Issuer Details
Serial Number Details
Extensions
Public Key usage - how key is used to encrypt data or another keys etc.
Certificate Chains
Why multiple certificate are required or rather need for intermediate certificates
Trust path verification: Adding extra layer of authentication, makes it more secure.
Intermediate certificate mitigate the risk of compromising the large number of clients
authentication
Keeping CA root private key in the secure place and not getting expose on the network.
Hierarchy chain
Revocation:
X.509 certificates that must be invalidated before their Not Valid After date may be revoked.
As mentioned above, RFC 5280 profiles certificate revocation lists (CRLs), time-stamped lists
of revoked certificates that can be queried by browsers and other client software.
Certifying Authority (CA) As discussed above, the CA issues certificate to a client and assist
other users to verify the certificate. The CA takes responsibility for identifying correctly the
identity of the client asking for a certificate to be issued, and ensures that the information
contained within the certificate is correct and digitally signs it.
Classes of Certificates
Class 3 − These certificates can only be purchased after checks have been made about the
requestor’s identity.
Registration Authority:
(RA) CA may use a third-party Registration Authority (RA) to perform the necessary checks
on the person or company requesting the certificate to confirm their identity. The RA may
appear to the client as a CA, but they do not actually sign the certificate that is issued.
Digital Signatures and Authentication and While the public key of a client is stored on the
certificate, the associated secret private key can be stored on the key owner’s computer. This
method is generally not adopted. If an attacker gains access to the computer, he can easily
gain access to private key. For this reason, a private key is stored on secure removable
storage token access to which is protected through a password. Different vendors often use
different and sometimes proprietary storage formats for storing keys. For example, Entrust
uses the proprietary .epf format, while Verisign, GlobalSign, and Baltimore use the standard
.p12 format.
Key Management
12:16 PM
One has the ensure that keys are remain the safe hands and stored in the safe place to
ensure the privacy
Key management forms the basis of all data security. Any mis use of key leads to exposure to
illegal access to the data and network
Key management is the process putting certain standards in place to ensure the security of
cryptography
Key management is the to deal with creation, exchange, storage , deletion and refreshing of
the keys, life of cycle of the key.
In symmetric sender and receive uses only one key for both encryption and decryption. It
needs to pass securely
User A choose random number x ( this number only A knows it and does not share even with
B
This algorithm is only for generate key and not for encryption and decryption
8:41 PM
Security Attacks
Mechanism: It is process by which prevent the attacks, identify the attacks, or recover from
the attacks
Service : like a tool or process to prevent the attacks, planned to counter security trends etc
Passive Attacks
Attacks which are learn or make use of information from the system but does not affect the
resource of the system
The goal of the attacker is to get information that being transmitted. Attackers passively
monitors the data being passed through network. Eavesdropping where attacker listen in on
the network
Release of the message content: Monitoring email, phone calls, text messages, stealing
sensitive information from the network
Traffic Analysis: In case attackers observe the amount of the data being sent, frequency of
the data being passed, location of sender and receiver. This information is also valuable for
attackers.
Active Attacks
7:39 PM
Substitution :
A->M
B-.>9
1->0
Examples of substitutions
Permutation:
Original bits 1 0 1 1
After 1110
10:50 PM
Number of Rounds 16
Input - 101010
000 000 001 010 010 011 011 011 011 011 011 011 011 011 011 011
0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 12 11 12 11 12 11 12 11 12 11 12 11 12 11 12 11
0
0 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2
1
1 1 6 1 5 6 6 1 6 1 6 1 6 1 6 1 6
0
1 5 7 5 7 5 7 5 7 5 7 5 7 5 7 5 7
1
Same as Initial Permutation only difference is that it is taking 32 bits input instead of 64 bits
Since Substitution and Transposition present then it is adding confusion and diffusion there
in the DES
Bring down 64 bits to 56 bits, get rid parity bits(last bit of every byte)
Each half goes through Left Shift process ( For rounds 1,2,9,16 left shift will be 1 and
remaining rounds LS will be 2 bytes)
DES Decryption
It is reverse of the encryption, cipher text as input and plain text as output and we change
the order of keys
P-Box
10:50 PM
Example
HELLOWOR
Block 2
+----+----+----+----+----+----+----+----+
| 58 | 50 | 42 | 34 | 26 | 18 | 10 | 2 |
+----+----+----+----+----+----+----+----+
| 60 | 52 | 44 | 36 | 28 | 20 | 12 | 4 |
+----+----+----+----+----+----+----+----+
| 62 | 54 | 46 | 38 | 30 | 22 | 14 | 6 |
+----+----+----+----+----+----+----+----+
| 64 | 56 | 48 | 40 | 32 | 24 | 16 | 8 |
+----+----+----+----+----+----+----+----+
| 57 | 49 | 41 | 33 | 25 | 17 | 9 | 1 |
+----+----+----+----+----+----+----+----+
| 59 | 51 | 43 | 35 | 27 | 19 | 11 | 3 |
+----+----+----+----+----+----+----+----+
| 61 | 53 | 45 | 37 | 29 | 21 | 13 | 5 |
+----+----+----+----+----+----+----+----+
| 63 | 55 | 47 | 39 | 31 | 23 | 15 | 7 |
+----+----+----+----+----+----+----+----+
After
Step 2 : Divide the string into 2 parts ( LTP Left Plain Text, RTP Right Plain Text)
Key= SECRET12. This is 64 bits key, to make it 56 bits( this by taking first 7 bits in each byte
56 - bits
0101001010000101000100101001
0100010010101000110000011001
One more time bits shuffle, rotating the bits by 1 e.f 1010 become 0101 pick any 48 bits ask
key. In DES key size if fixed 48 bits
1010010100001010001001010010
1000100101010001100000110010
100010010101000110000011
Step 4 Expansion Permutation , this is required because Key length is 48 and input is 32 bits (
right half of the plain text) to match 32 bits with 48 bits we need this process so that they
can be XORed
000000000000000000000000001011111011111111100000
101001010000101000100101100010010101000110000011
101001010000101000100101101001101110111001100011
S- Box Substitution
After applying S-box substitution 48 bits will reduce to 32 bits , each box will produce and
combine all the value, we get
10100101000010100010010110100110
p-box permutations
It is similar to step1. In step1 w have 64 bits p-table, in this process we will take 32 bits p-
table
p-table
00000000110000100110011011111001
Step 5
11111111011000100001100010001011
RPT1 = 11111111011000100001100010001011
Final Permutation: After all round 16, Final permutation is performed only once, simple
transposition is performed only once.
Multiple Encryptions
1. Using brute force method, it can be broken and with modern hardware, high power
CPUs, it can be easily broken
Methods to enhance it
Multiple encryption means encrypting the data multiple times, often using multiple keys or
algorithms
1. Double Encryption
2. Triple Encryption
3. Cascade Encryption
Double encryption : data encrypted multiple time using two different keys
Triple encryption with three keys (K1,K2 and K3)
Plain Text = 10
Key1 = 3
Key2 = 8
Key3 =9
Encryption
C1 = E(K1,PI) = PI+K1
C1= (3,10) = 13
C2 = D(8,13) = 13-8 - 5
C3 = E(Key3,C2)
C3 = C2+key3 = 5+9 = 14
Final CT = 14
Decryption
Triple DES with two keys ( Key1 is used in multiple encryptions instead key3)
10:33 PM
It requires 11 keys ( 10 keys for each round and 1 for initial round)
Key expansions
Key size is 128 bits, this process generate 10 keys for each round and 1 key for initial phase
AES Advanced Encryption Standard
7:26 PM
1.
a. 128 bits
b. 192 bits
c. 256 bits
128 bits 10
192 bits 12
256 bits 14
7. 1 byte - 8 bits
a. Substitute Bytes
b. Shift Rows
c. Mix Columns
15. Round N
a. Substitute Bytes
b. Shift Rows
c. Add Round Key
a. Input = o/p of
substitution
2: Shift Rows
3. Column Mix
4. Add Round Key
Message Authentication
6:00 PM
Cryptography provides good encryption or decryption to a data so data is very much remain
secure between two parties. Hackers intentions is not about reading in the information but
creating disrupt by stealing, delay in sending the data, corrupting the data, changing the
data. Encryption / decryption does not prevent it.
Solution lies in the authenticating the message. What is authentication? Person is carrying
the identity and mechanism to verify the identify. Combining these it is called authentication
In the context of the message, how is the authentication works. Sender generate the
message identity and passes along with message, receiver also has a capability to generate
same identity and verify the identity that is coming along with the message and compare it.
If both are same message is authenticated otherwise failed to authenticate
Why need of this requirement ? The following attacks were discovered or observed
1. Disclosure: Release of message contents to any person or process not possessing the
appropriate cryptographic key.
3. Message insertion: Insertion of messages into the network from a fraudulent source.
This includes the creation of messages by an opponent that are purported to come
from an authorized entity. Also included are fraudulent acknowledgments of
message receipt or non-receipt by someone other than the message recipient.
Message Authentication is the process to verify that received messages come from valid
source and have not modified. It is one step ahead of cryptography where it checks the
message integrity
Any Message Authentication mechanism can be viewed having two fundamental levels
1. Low level: At low level there is some sort of function that produces an authenticator:
value to be used to authenticate a message
2. protocol (SSL,TLS) uses the same function at receiver end verify the authenticity of a
message
Authentication Functions
1. Message Encryption
3. A Hash Function
Message Encryption limitations, why need arises to have separate authentication method
other than just a encryption and decryption. Two main challenges in symmetrical encryption
1. Key management, sender and receiver both should know the key before any data
transmit, it requires secure key establishment.
2. Trust: Since the sender and the receiver use the same symmetric key, there is an
implicit requirement that the sender and the receiver ‘trust’ each other. For example,
it may happen that the receiver has lost the key to an attacker and the sender is not
informed. These two challenges are highly restraining for modern day
communication. Today, people need to exchange information with non familiar and
non-trusted parties. For example, a communication between online seller and
customer. These limitations of symmetric key encryption gave rise to asymmetric key
encryption schemes.
3. Public-key cryptosystems have one significant challenge − the user needs to trust
that the public key that he is using in communications with a person really is the
public key of that person and has not been spoofed by a malicious third party.
4. To solve the problem multi-layer authentication is used with two sets public and
private keys (EOB)
2. For establishing MAC process, sender and receiver share a symmetric key K
1. The sender uses some publicly known MAC algorithm, inputs the message and the
secret key K and produces a MAC value.
2. Similar to hash, MAC function also compresses an arbitrary long input into a fixed
length output. The major difference between hash and MAC is that MAC uses secret
key during the compression.
3. The sender forwards the message along with the MAC. Here, we assume that the
message is sent in the clear, as we are concerned of providing message origin
authentication, not confidentiality. If confidentiality is required then the message
needs encryption.
4. On receipt of the message and the MAC, the receiver feeds the received message
and the shared secret key K into the MAC algorithm and re-computes the MAC value.
5. The receiver now checks equality of freshly computed MAC with the MAC received
from the sender. If they match, then the receiver accepts the message and assures
himself that the message has been sent by the intended sender.
6. If the computed MAC does not match the MAC sent by the sender, the receiver
cannot determine whether it is the message that has been altered or it is the origin
that has been falsified. As a bottom-line, a receiver safely assumes that the message
is not the genuine.
Limitation of MAC
b. MAC technique does not provide a non-repudiation service. If the sender and
receiver get involved in a dispute over message origination, MACs cannot
provide a proof that a message was indeed sent by the sender.
c. Though no third party can compute the MAC, still sender could deny having
sent the message and claim that the receiver forged it, as it is impossible to
determine which of the two parties computed the MAC.
Hash Function
A hash function is a mathematical process or formula that holds a critical role in public key
cryptography
2. Ensuring the data integrity by ensuring the data has not been altered
3. Hash is like fingerprint. It converts plain data of any size convert it to unique cipher
text of a specific length
Determinism — A hash algorithm should be deterministic, meaning that it always gives you
an output of identical size regardless of the size of the input you started with. This means
that if you’re hashing a single sentence, the resulting output should be the same size as one
you’d get when hashing an entire book.
Pre-Image Resistance — The idea here is that a strong hash algorithm is one that’s preimage
resistance, meaning that it’s infeasible to reverse a hash value to recover the original input
plaintext message. Hence, the concept of hashes being irreversible, one-way functions.
Collision Resistance — A collision occurs when two objects collide. Well, this concept carries
over in cryptography with hash values. If two unique samples of input data result in identical
outputs, it’s known as a collision. This is bad news and means that the algorithm you’re
using to hash the data is broken and, therefore, insecure. Basically, the concern here is that
someone could create a malicious file with an artificial hash value that matches a genuine
(safe) file and pass it off as the real thing because the signature would match. So, a good and
trustworthy hashing algorithm is one that is resistant to these collisions.
Avalanche Effect — What this means is that any change made to an input, no matter how
small, will result in a massive change in the output. Essentially, a small change (such as
adding a comma) snowballs into something much larger, hence the term “avalanche effect.”
Hash Speed — Hash algorithms should operate at a reasonable speed. In many situations,
hashing algorithms should compute hash values quickly; this is considered an ideal property
of a cryptographic hash function. However, this property is a little more subjective. You see,
faster isn’t always better because the speed should depend on how the hashing algorithm is
going to be used. Sometimes, you want a faster hashing algorithm, and other times it’s
better to use a slower one that takes more time to run through. The former is better for
website connections and the latter is better for password hashing.
Attacker fetches the email and make the changes and resend it (At this point), document is
tampered and hash got changed, since the document modified after it signed it can't be
trusted so data integrity is ensures
2. Secure Against Unauthorized Modifications
Hashing is used to does not prevent from the modification of the data but it detects the
modification has happened and alert user. Think about it as smoke detector, it detects but
does not prevent it
Typically websites converts the passwords to hash code and store it securely. Nowadays,
almost all websites stores user passwords
Different hash functions serve different purpose depending upon their design and hash
algorithm
Cryptographic hashing : medium, less secure nut requires more speed as data flows over the
net
Data structure, hash table, load balancing. Least secure but requires faster processing.
If the message is more than specified block length still it is going to create only 1 hash.
SHA -512, block size length is say 256, and message is around 10 MB , still there is going to
only one single hash.
Security of Hash Functions and MAC
Brute-Force Attacks
These attacks don’t rely on any weakness in the algorithm but rather try all possible
combinations until a desired result found, for Hash functions and Mac this includes.
Very hard to guess the input from the hash (One way)
Very hard to find two inputs with the same output(Collision resistance)
1. One-way:
a. Given message m1, we need find out another message m2,such that H(m1) =
H(m2)
Attacks on MAC
a. Find the secrete key used in the MAC generation , try all possible keys and
find one which is generating the same MAC code for known message
a. Guess the MAC randomly, chance of success is 1/(2^n). Almost infeasible for
128 bits
3. Strongest resistance:
a. Try to find out two messages that generate the same mac code. Requires
2^n/2 attempts to break
64. Bits Earlier version, not safe for Low security, used hashing in
cryptography hash table
1. Message
2. Append Padding
In each round buffer gets updated and store the intermediate results and o/p of previous
round is input to the next round
Initial Buffer A (32 bits) B (32 bits) C (32 bits) D (32 bits) E (32 bits)
Case
Key > 512, hash(key) = 160 bits and append 0 till 512 bits
outerInput = s2 || innerHash
outerHash = hash(outerInput)
Elgamal Algorithm
8:18 PM
it generates 2 Cipher Texts for one plain text. It is better than RSA in decryption
Size is twice of the plain text
2. Power(g,1) mod
4. Gcd(g,p) =1
7. E = power(g,d) mod p
8. Power(2,3) mod 13
9. E = 8
10. Public key for ( p,g,e) = (13,2,8) shared in the public domain
Y1 = power(g,k) mod p
Y1 = power(2,7) mod 13
Y1 = 11
Y2 = M* power(e,k) mod p
Y2 = 4* power(8,7) mod 13
Y2 = 7
Step2 to decrypt
Power(Y1,D) mod p
Power(11,3) mod 13
11*11*11 mod 13 = 5
Y2 * Inv(5) mod 13
Inv(5) mod 13 , find out the number mod 13 which will give reminder 1
x= 8
7*8 mod 13
56 mod 13 = 4
E1 - user defined
E2 - E1 pow g mod p
C1 = g pow k log q
C2 = M
Trapdoor Function
Functions are easy to one direction but going in the direction is not possible
Block Cipher
3:56 PM
1. Key generation - each block is used different key for each block for encryption and
same key is used for decryption. It is called symmetric cipher as both encryption and
decryption uses the same key
K = number of keys, k possible combinations that can be used to encrypt the plain text
One side plain text elements and other side associated cipher text elements.
Which code book is used at any given point is depends on function of key and key is secrete
So eavesdropper has the ability of reconstruct the family of code books, but there are so
many of them so it is difficult to break. They don’t know which one you choose.
Cipher mode of operations : it is method , take a block cipher and combine it with large
amount of data
It takes plain takes and divides it into individual blocks and encrypt each block separately
with same key
It is good for shorter message but not for longer messages. ECB simply relies on substitution
so when two blocks of plain text are identical, they are result into two corresponding cipher
texts. Some kind of pattern which attackers try to infer it
Chiper block chaining
To address security vulneraries present in electronic code book, next mode is Cipher block
chaining.
IV is initialization Vector and then XOR with plain text and then it encrypt with round key and
get the cipher text and this is acts as cipher text to round 1 ad it becomes IV for round 2.
IV : It is not secret and its set along with cipher text value. It should use only once and must
not be predictable.
It is random or unique value used in combination with secret key to initialize the encryption
process. It ensure that same plain text encrypted multiple times will produce different cipher
text, enhancing security by preventing patterns from emerging
Randomized Encryption
Same plain text is encrypted with same key but different IV, it going to generate new cipher
text
Counter Mode:
The counter mode or CTR is simple counter based block cipher implementation
In this case, counter is encrypted using and key and it is given as input to XOR with plain text
which results in cipher text, no input from previous step so it can be run in the parallel
Since there is a different counter value for each block, the direct plain text and cipher text
relationship is avoided
Parallel execution of encryption and decryption is possible as all blocks are independent
User can build the encryption can build ahead of time since plain text is not involved in the
encryption, it can make the process faster
Major drawback.
Synchronization of counter between sender and receiver is crucial to get correctly decrypt
the plan text, the results are inaccurate if synchronization failed
Decryption is exactly same as encryption, counter encrypt with key and pass the input to
XOR function and cipher text is another input to XOR.
Example:
Cipher Feedback Mode:
Giving the feedback of cipher text of previous to the next step. One can directly assign
output or do shift register (shifting the bits)
B = IV + Key (Encryption)
7:12 PM
Binary value:
Key
------------------------------------------------------------------------------------------------------------------
Encrypted Counter
HELLO WORLD
HELLOWOR
Binary
---------------------------------------------------------------------------------------------------------------------
Cipher Text
00000000 → 0 (NULL)
01100001 → 97 (a)
Binary value:
Key
Counter
------------------------------------------------------------------------------------------------------------------
Encrypted Counter
HELLO WORLD
HELLOWOR
Binary
---------------------------------------------------------------------------------------------------------------------
Encrypted Counter XOR HELLOWOR
Cipher Text
00000000 → 0 (NULL)
01100001 → 97 (b)
HELLO WORLD
HELLOWOR
01001111 01010010
Secret
01001000
8:10 PM
Binary value:
HELLOWORD - Binary
HELLOWO
RD######
IV (Initialization Vector)
IV for LD######