Ac$is Lecture Notes
Ac$is Lecture Notes
Ac$is Lecture Notes
Introduction
3. Rather than intercept a message, user F constructs its own message with the desired entries
and transmits that message to computer E as if it had come from manager D. Computer E
accepts the message as coming from manager D and updates its authorization file
accordingly.
4. An employee is fired without warning. The personnel manager sends a message to a server
system to invalidate the employee’s account. When the invalidation is accomplished, the
server is to post a notice to the employee’s file as confirmation of the action. The employee is
able to intercept the message and delay it long enough to make a final access to the server to
retrieve sensitive information. The message is then forwarded, the action taken, and the
confirmation posted. The employee’s action may go unnoticed for some considerable time.
The NIST Computer Security Handbook [NIST95] defines the term computer security as
follows:
“The protection afforded to an automated information system in order to attain the applicable
objectives of preserving the integrity, availability, and confidentiality of information
system resources (includes hardware, software, firmware, information/data, and
telecommunications).”
Security principles:
This definition introduces three key objectives/principles that are at the heart of computer security:
1. Confidentiality
2. Integrity
3. Availability
1. Confidentiality: Confidentiality means that data, objects and resources are protected from
unauthorized viewing and other access.
A) Data integrity: Assures that information and programs are changed only in a specified
and authorized manner.
3. Availability: Assures that systems work promptly and service is not denied to
authorized users. These three concepts form what is often referred to as the CIA triad.
CIA TRIAD
The well-known CIA Triad of confidentiality, integrity and availability is considered the
core underpinning of information security.
Every security control and every security vulnerability can be viewed in light of one or
more of these key concepts
Security Services:
Authentication
✔ Authentication is used by a server when the server needs to know exactly who is
accessing their information or site.
✔ Authentication is used by a client when the client needs to know that the server is
system it claims to be.
✔ In authentication, the user or computer has to prove its identity to the server or client.
✔ Usually, authentication by a server entails the use of a user name and password. Other
ways to authenticate can be through cards, retina scans, voice recognition, and
fingerprints.
Types of Authentication
For purposes of user identity, users are typically identified with a user ID, and
authentication occurs when the user provides credentials such as a password that
matches their user ID.
2. Two-factor authentication (2FA)
When three or more identity verification factors are used for authentication .
Multi-Factor Authentication(MFA)
Two- Factor V/S Multi-Factor Authentication (MFA)
Authorization
⮚ Authorization is usually coupled with authentication so that the server has some
concept of who the client is that is requesting access.
⮚ The type of authentication required for authorization may vary; passwords may be
required in some cases but not in others.
⮚ In some cases, there is no authorization; any user may be use a resource or access a
file simply by asking for it. Most of the web pages on the Internet require no
authentication or authorization.
Non-repudiation
⮚ Non-repudiation is the assurance that someone cannot deny the validity of something.
There are situations where a user sends a message, and later on refuses that she had sent
that message. For instance, user A could send a funds transfer request to bank B over the
Internet. After the bank performs the funds transfer as per A's instructions, A could claim
that she never sent the funds transfer instruction to the bank! Thus, A repudiates, or
denies, her funds transfer instruction. The principle of non-repudiation defeats such
possibilities of denying something, having done it. Non-repudiation does not allow the
sender of a message to refute the claim of not sending that message.
Criminal Attacks Criminal attacks are the simplest to understand. Here, the sole aim of
the attackersis to maximize financial gain by attacking computer systems.
Publicity Attacks
Publicity attacks occur because the attackers want to see their names appear on television
news channels and newspapers. History suggests that these types of attackers are usually
not hardcore criminals. They are people such as students in universities or employees in
large organizations, who seek publicity by adopting a novel approach of attacking
computer systems. One form of publicity attacks is to damage (or deface) the Web pages
of a site by attacking it.
Legal Attacks
This form of attack is quite novel and unique. Here, the attacker tries to make the judge or
the jury doubtful about the security of a computer system. This works as follows. The
attacker attacks the computer system and the attacked party (say a bank or an
organization) manages to take the attacker to the court. While the case is being fought, the
attacker tries to convince the judge and the jury that there is inherent weakness in the
computer system and that he has done nothing wrongful. The aim of the attacker is to
exploit the weakness of the judge and the jury in technology matters. For example, an
attacker may sue a bank for a performing an online transaction, which he never wanted to
perform. In court, he could innocently say something like, “The bank’s Web site asked
me to enter a password and that is all that I provided; I do not know what happened there
after”. A judge is likely to sympathize with the attacker!
From the technical point of view, we can classify the types of attacks on computers and
network systems into two categories for better understanding:
(a)Theoretical Concepts
iii. Modification – (integrity)For example the attacker may modify the values in a
database.
iv. Interruption – (availability) Here, the resource becomes unavailable, lost or unusable.
Examples of interruption are causing problems to a hardware device, erasing program,
data or operating system components.
These attacks are further grouped into two types: passive attacks and active attacks
Passive attacks
In passive attacks, the attacker observes the messages, then copy and save them and can
use it for malicious purposes. The attacker does not try to change the information or
content he/she gathered. Although passive attacks do not harm the system, they can be a
danger for the confidentiality of the message. In the below image, we can see the process
of passive attacks.
Unlike passive attacks, the active attacks are based on modification of the original
message in some manner or the creation of a false message. These attacks cannot be
prevented easily.
Replay attack: - a user captures a sequence of events or some data units and re-sends
them. For instance.
Alteration of messages: - involves some change to the original message. For instance,
suppose user A sends an electronic message Transfer $1000 to D’s account. User C might
capture this and change it to Transfer $10000 to C’s account. Note that both the
beneficiary and the amount have been changed – instead, only one of these could have
also caused alteration of the message.
Denial Of Service (DOS):- attacks make an attempt to prevent legitimate users from
accessing some services, which they are eligible for. For instance, an unauthorized user
might send too many login requests to a server using random user ids one after the other
in quick succession, so as to flood the network and deny other legitimate users from using
the network facilities
Digital signatures (combined with other measures) can offer non-repudiation when it
comes to online transactions, where it is crucial to ensure that a party to a contract or a
communication can't deny the authenticity of their signature on a document or sending the
communication in the first place.
⮚ In this context, non-repudiation refers to the ability to ensure that a party to a contract
or a communication must accept the authenticity of their signature on a document or
the sending of a message.
A security mechanism is a method or technology that protects data and systems from
unauthorized access, attacks, and other threats. Security measures provide data integrity,
confidentiality, and availability, thereby protecting sensitive information and maintaining
trust in digital transactions.
1.Encipherment : This security mechanism deals with hiding and covering of data which
helps data to become confidential. It is achieved by applying mathematical calculations or
algorithms which reconstruct information into not readable form. It is achieved by two
famous techniques named Cryptography and Encipherment. Level of data encryption is
dependent on the algorithm used for encipherment.
2.Access Control : Access control in information security refers to the methods and
processes used to manage and restrict who or what can view or use resources in a
computing environment. It involves implementing policies and mechanisms to ensure that
only authorized users and entities can access specific data and systems, thereby protecting
sensitive information from unauthorized access, modification, or misuse.
Key Concepts of Access Control:
Authentication: Verifying the identity of the user or system. Common methods include
passwords, biometric scans, and security tokens.
Accounting (or Auditing): Tracking and recording user activities. This helps in monitoring
compliance with access policies and investigating any suspicious activities.
4. Data Integrity : this mechanism appends to the data ,a short check value that has been
created by a specific process from data itself.
The receiver creates a new check value from the received data and compares the newly
created check value with the one he/she received. if both the values are same the integrity of
the data is preserved.
5. Authentication Exchange :in this mechanism two entities exchange some messages to
prove their identity to each other.
6.Traffic padding or bit stuffing: in this mechanism we are adding some extra bits with the
data while encrypting.
7. Digital Signature : it means the sender can electronically sign the data and the receiver
can electronically verify the message.
Ciphertext. while the plain text become coded message is called the ciphertext.
Enciphering or Encryption The process of converting from plaintext to ciphertext is known as
enciphering or encryption;
Deciphering or Decryption restoring the plaintext from the ciphertext is deciphering or
decryption.
cryptography The many schemes used for encryption constitute the area of study known
as cryptography. cryptographic system or a cipher Such a scheme is known as a
cryptographic system or a cipher. Techniques used for deciphering a message without any
knowledge of the enciphering details fall into the area of cryptanalysis. Cryptanalysis is
what the layperson calls “breaking the code.” The areas of cryptography and
cryptanalysis together are called cryptology.
The original data is known as the plaintext, and the data after the key encrypts it is known as
the ciphertext.
Before the advent of computers, ciphertext was often created by simply replacing one letter
with another letter in the plaintext, a method known as a "substitution cipher."
For instance, suppose that someone sends a message reading "Hello" to another person, and
each letter is replaced with the one after it in the alphabet: "Hello" becomes "Ifmmp."
"Ifmmp" looks like a nonsensical string of letters, but if someone knows the key, they can
substitute the proper letters and decrypt the message as "Hello." For this example, the key is
(letter) - 1, moving each letter down one spot in the alphabet to arrive at the real letter.
Such ciphers are relatively easy to break with simple statistical analysis, since certain letters
will appear more often than others in any given text (for instance E is the most common letter
in the English language). To combat this, cryptographers developed a system called the one-
time pad.
One-time pad
A one-time pad is a single-use-only key that has at least as many values as the plaintext has
characters. In other words, each letter will be replaced by a letter that's a unique number of
letters removed from it in the alphabet.
For example, suppose someone has to encrypt the message "Hello," and they use a one-time
pad with the values 7, 17, 24, 9, 11
Whereas before we simply moved up one position for each letter (letter + 1), now we move a
different number of places in the alphabet for each letter. We add 7 to the first letter, H; we
add 17 to the second letter; and so on. For any calculations that take us past Z, we simply go
back to the beginning of the alphabet and keep adding.
Starting from the plaintext "Hello," we now have the ciphertext "Ovjuz," using the key "7,
17, 24, 9, 11."
For communication via a one-time pad to work, both sides of the conversation have to use the
same key for each individual message (symmetric encryption), although a different key is
used every time there's a new message. Although to any third parties "Ovjuz" looks like
random nonsense, the person who receives the ciphertext "Ovjuz" will know to use the key
"7, 17, 24, 9, 11" to decrypt it (subtracting instead of adding):
Thus, a simple message can be altered by a string of random data, a key, in order to be
encrypted or decrypted.
Types of Encryption
1. Symmetric Encryption– Data is encrypted using a key and the decryption is also
done using the same key.
Types of Keys
1. Public key– Key which is known to everyone. Ex-public key of A is 7, this
information is known to everyone.
2. Private key– Key which is only known to the person who’s private key it is.
1. It is also called as Private key cryptography 1. It is also called as Private key cryptography or secret
or secret key Cryptography. key Cryptography.
2. It only requires a single key for both 2. It requires two keys, a public key and a private key,
encryption and decryption. one to encrypt and the other to decrypt.
6.The length of key used is 128 or 256 bits 6.The length of key used is 2048 or higher
9. Security is lower as only one key is used 9.Security is higher as two keys are used, one for
for both encryption and decryption purposes. encryption and decryption purposes
Symmetric encryption is also called as conventional encryption . This Symmetric encryption further
divided into two types.
1.Substitutional techniques.
2.Transposition techniques.
These two are the basic building blocks of all the encryption techniques.
1.Substitutional techniques: A substitution technique is one in which the letters of plaintext are
replaced by other letters or by numbers or symbols. If the plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext bit patterns with cipher text bit patterns.
For ex: NAME-----IWPX
3 Playfair cipher
4 Hill cipher
5 Polyalphabetic cipher
1. Caesar Cipher:
• This is one of the simplest and oldest methods of encrypting messages, that was used by Julius
Caesar to send secret messages to his officials.
• This technique involves shifting the letters of the alphabet by a fixed number of places. For
example, with a shift of three, the letter ‘A’ becomes ‘D’, ‘B’ becomes ‘E’, and so on.(It works
by shifting the letters in the plaintext message by a certain number of positions, known as the
“shift” or “key”. The Caesar Cipher technique is one of the earliest and simplest methods of
encryption techniques.)
• Thus to cipher a given text we need an integer value, known as a shift which indicates the
number of positions each letter of the text has been moved down.
The encryption can be represented using modular arithmetic by first transforming the letters
into numbers, according to the scheme, A = 0, B = 1,…, Z = 25. Encryption of a letter by a
shift n can be described mathematically as.
• For example, if the shift is 3, then the letter A would be replaced by the letter D, B would
become E, C would become F, and so on. The alphabet is wrapped around so that after Z, it
starts back at A.
• Here is an example of how to use the Caesar cipher to encrypt the message “MEET ME” with
a shift of 3:
• PT=MEET ME CT=?
Write down the plaintext message: MEET ME
• Choose a shift value. In this case, we will use a shift of 2.
• Replace each letter in the plaintext message with the letter that is three positions to the right in
the alphabet.
• M becomes O (shift 2 from M)
• E becomes G (shift 2 from E)
• E becomes G (shift 2 from E)
• T becomes V (shift 2 from T)
• M becomes O (shift 2 from M)
• E becomes G (shift 2 from E)
• 4.The encrypted message is now “OGGV OG”.
• To decrypt the message, you simply need to shift each letter back by the same number of
positions. In this case, you would shift each letter in “OGGVOG” back by 3 positions to get
the original message, “MEET ME”.
• Encryption: conversion of plain text to cipher text.
• En(x)=(x+n)mod 26
• For Decryption: conversion of cipher text to plain text.
• Dn(x)=(x−n)mod 26
• Note: if x-n is negative add 26 to it
• it is a part of symmetric key encryption hence same key is used for encryption and decryption.
Message = PT= GOOD DAY. LET KEY=2
C(G)=(P+K)MOD26
(6+2)MOD26=8=I
C(0)= (P+K)MOD26
(14+2)MOD26=16=Q CT=IQQF FCA
C(0)= (P+K)MOD26
(14+2)MOD26=16=Q
C(D)= (P+K)MOD26
(3+2)MOD26=5=F
C(D)= (P+K)MOD26
(3+2)MOD26=5=F
C(A)=(0+2)MOD26=2=C
C(Y)=(24+2)MOD26=0=A
Cipher Text=IQQF FCA
P(I)=(C-K)MOD26
(8-2)MOD26=6=G
P(Q)= (C-K)MOD26
(16-2)MOD26=14=O PT=GOOD DAY
P(Q)= (C-K)MOD26
(16-2)MOD26=14=O
P(F)= (C-K)MOD26
(5-2)MOD26=3=D
P(F)= (C-K)MOD26
(5-2)MOD26=3=D
P(C)=(2-2)MOD26=0=A
P(A)=(0-2)MOD26=-2+26=24=Y
Advantages of Caesar cipher
1. t is very easy to implement.
2. This method is the simplest method of cryptography.
3. Only one short key is used in its entire process.
4. If a system does not use complex coding techniques, it is the best method for it.
5. It requires only a few computing resources.
Disadvantages of Caesar cipher
1. It can be easily hacked. It means the message encrypted by this method can be easily
decrypted.
2. It provides very little security.
3. By looking at the pattern of letters in it, the entire message can be decrypted.
2. A monoalphabetic cipher is a type of substitution cipher where each letter in the plaintext is
replaced with a unique corresponding letter from the cipher alphabet. This means that each letter of the
alphabet in the plaintext maps to a different letter in the ciphertext, and this mapping remains
consistent throughout the entire message.
For example, if we use a simple shift of the alphabet, we might map 'A' to 'D', 'B' to 'E', and so on.
The Caesar cipher is a well-known example of a monoalphabetic cipher where each letter is shifted a
fixed number of places down the alphabet.However, in a general monoalphabetic cipher, the mapping
can be any permutation of the alphabet.
For instance: Plaintext alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext alphabet: QWERTYUIOPASDFGHJKLZXCVBNM
For instance:
Plaintext alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext alphabet: QWERTYUIOPASDFGHJKLZXCVBNM
in this example, 'A' in the plaintext would be encrypted as 'Q', 'B' as 'W', 'C' as 'E', and so on.
Now PT= NICE
CT=FOEY
Characteristics of Monoalphabetic Ciphers
Simplicity: They are easy to understand and implement.
Low Security: They are vulnerable to frequency analysis because each letter in the plaintext
corresponds to a single letter in the ciphertext.
Deterministic: Given the same key, the same plaintext will always result in the same ciphertext.
3. A polyalphabetic cipher is a type of encryption that uses multiple substitution alphabets to encode
a message.
• Unlike a monoalphabetic cipher, which uses only one substitution alphabet, a polyalphabetic
cipher changes the alphabet during the encryption process, making it more secure and harder to
break.
XOR encryption is a simple encryption technique that uses the XOR (exclusive OR) operation to
encrypt and decrypt data.
XOR is a bitwise operation that compares two bits and returns 1 if the bits are different and 0 if they
are the same.
This property makes XOR useful for encryption because applying the same operation twice with the
same key returns the original data.
How XOR Encryption Works:
Encryption: To encrypt a message, each bit of the plaintext (original message) is XORed with a
corresponding bit of the key. The key must be as long as the plaintext.
Decryption: The ciphertext (encrypted message) can be decrypted by XORing it with the same key
used for encryption. This returns the original plaintext.
Let's go through an example to illustrate XOR encryption:
Convert the plaintext to binary (using ASCII values):
H: 01001000
E: 01000101
L: 01001100
L: 01001100
O: 01001111
Key: "XMCKL“
Convert the key to binary (using ASCII values):
X: 01011000
M: 01001101
C: 01000011
K: 01001011
L: 01001100
Encryption: XOR each bit of the plaintext with the corresponding bit of the key.
For "H" (01001000) and "X" (01011000):
01001000 (H)
01011000 (X)
--------
00010000 (P)
Repeating this for the other characters:
E (01000101) XOR M (01001101) = 00001000 (I)
L (01001100) XOR C (01000011) = 00001111 (O)
L (01001100) XOR K (01001011) = 00000111 (G)
O (01001111) XOR L (01001100) = 00000011 (C)
The ciphertext is represented as:
The ciphertext is represented as:
P: 00010000
I: 00001000
O: 00001111
G: 00000111
C: 00000011
In binary, the ciphertext corresponds to the characters "PIOGC“
Decryption: XOR the ciphertext with the same key to retrieve the original plaintext.
For "P" (00010000) and "X" (01011000):
00010000 (P)
01011000 (X)
--------
01001000 (H)
Repeating this for the other characters:
I (00001000) XOR M (01001101) = 01000101 (E)
O (00001111) XOR C (01000011) = 01001100 (L)
G (00000111) XOR K (01001011) = 01001100 (L)
C (00000011) XOR L (01001100) = 01001111 (O)
The decrypted message is "HELLO".
For example, if ciphertext = "HELLO", the ASCII values are
H IS 72
E IS 62
L IS 76
L IS 76
O IS 79
The hexadecimal equivalents are:
format(72, '02x') → ’48
format(69, '02x') → '45'
4. The Playfair cipher:
• The Playfair cipher was the first practical digraph substitution cipher. The scheme was
invented in 1854 by Charles Wheatstone but was named after Lord Playfair who promoted the
use of the cipher.
• In playfair cipher unlike traditional cipher we encrypt a pair of alphabets(digraphs) instead of
a single alphabet.
For example:
Key : monarchy
Plaintext: instruments
1.Generate the key Square(5×5):
• The key square is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each
of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the
table (as the table can hold only 25 alphabets). If the plaintext contains J, then it is replaced by
I.
The initial alphabets in the key square are the unique alphabets of the key in the order in which they
appear followed by the remaining letters of the alphabet in order.
2. Algorithm to encrypt the plain text: The plaintext is split into pairs of two letters (digraphs). If
there is an odd number of letters, a Z is added to the last letter.
For example:
Plain Text: "instruments"
After Split: 'in' 'st' 'ru' 'me' 'nt' ‘sz’
1. Pair cannot be made with same letter. Break the letter in single and add a filler letter to the
previous letter.
Plain Text: “hello”
After Split: ‘he’ ‘lx’ ‘lo’
Here ‘x’ is the filler letter.
2. If the letter is standing alone in the process of pairing, then add an extra filler letter with the alone
letter
Plain Text: “helloe”
AfterSplit: ‘he’ ‘lx’ ‘lo’ ‘ez’
Here ‘z’ is the filler letter.
Plaintext: instruments
Diagrams: in st ru me nt sx
ga tl mz cl rq xa
Cipher text=gatlmzclrqxa
Plaintext: instruments
Cipher text=gatlmzclrqxa
ga tl mz cl rq xa
In st ru me nt sx
If both the letters are in the same column: Take the letter above each one (going back to the bottom
if at the top).
For example:
Diagraph: "cl"
Decrypted Text: me
Decryption:
c -> m
l -> e
c -> m
If both the letters are in the same row: Take the letter to the left of each one (going back to the
rightmost if at the leftmost position).
For example:
Diagraph: "tl"
Decrypted Text: st
Decryption:
t -> s l -> t
• If neither of the above rules is true: Form a rectangle with the two letters and take the letters
on the horizontal opposite corner of the rectangle.
For example:
Diagraph: "rq"
Decrypted Text: nt
Decryption:
r -> n
q -> t
Transposition techniques
The Transposition Cipher Technique is an encryption method used to encrypt a message or
information. This encryption method is done by playing with the position of letters of the plain text.
The positions of the characters present in the plaintext are rearranged or shifted to form the ciphertext.
It makes use of some kind of permutation function to achieve the encryption purpose. It is very easy to
use and so simple to implement.
Types of Transposition Cipher Techniques
• Rail Fence Transposition Cipher
• Block (Single Columnar) Transposition Cipher
• Rail Fence Transposition Cipher:
Rail Fence Transposition cipher technique is the simplest transposition cipher technique its. It is also
termed as a zigzag cipher. It gets its name from the way through which it performs encryption of plain
text.
Technique of Rail Fence Transposition Cipher
Example: The plain text is “Hello Krishna” & CT=“hlorsnelkiha”
Now, we will write this plain text in the diagonal form:
How it Works:
Choose a Keyword: The keyword determines the order of the columns. For example, let's use the
keyword "CIPHER".
Create the Grid: Write down the plaintext into rows, with each row containing as many letters as the
keyword length. Fill in extra spaces with padding (usually "X" or "Z") if necessary.
Example plaintext: "HELLO WORLD“Using "CIPHER" (length 6), you write it as: 1 45
32 6
C IPHER
HEL LOW
ORLDXX
3.Number the Columns: Number the columns based on the alphabetical order of the keyword. For
"CIPHER": 145326
4. Rearrange the Columns: Read the columns in the order of the numbers assigned.
Cipher Text: HOOXLDERLLWX
Double transposition: 1 4 5 3 26
HOOXLD
ERLLWX
Cipher text: helwxloroldx
Secure Key:
In information security, a secure key refers to a piece of information, or a sequence of bits, that is
used in cryptographic algorithms to encrypt and decrypt data.
The security of the encrypted data largely depends on the strength and secrecy of this key.
Here are some key aspects of a secure key:
1.Confidentiality:
The key must be kept secret from unauthorized parties. If an attacker gains access to the key, they can
decrypt the data or forge encrypted communications.
2. Randomness:
A secure key should be generated in a way that is unpredictable and random. If the key generation
process is predictable, an attacker might be able to guess the key.
3. Length: The length of the key contributes to its security. Longer keys are generally more secure
because they increase the number of possible combinations that an attacker would have to try in a
brute-force attack. However, the appropriate key length depends on the specific cryptographic
algorithm being used.
4.Key Management: Secure storage, distribution, and management of keys are crucial. This includes
practices like using secure channels to transmit keys, regularly rotating keys, and securely storing
them in hardware security modules (HSMs) or other secure environments.
5.Integrity: It’s important to ensure that the key has not been tampered with. If an attacker can modify
the key, they can potentially compromise the security of the data.
Digital Signatures
Digital signature is electronic signatures, which assure that the message was sent by a
particular sender. While performing digital transactions authenticity and integrity should be
assured, otherwise, the data can be altered or someone can also act as if he was the sender and
expect a reply.
To create a digital signature, signing algorithms like email programs create a one-way
hash of the electronic data which is to be signed.
The signing algorithm then encrypts the hash value using the private key (signature
key).
This encrypted hash along with other information like the hashing algorithm is the
digital signature.
This digital signature is appended with the data and sent to the verifier.
The reason for encrypting the hash instead of the entire message or document is that a
hash function converts any arbitrary input into a much shorter fixed-length value.
This saves time as now instead of signing a long message a shorter hash value has to
be signed and moreover hashing is much faster than signing.
1. The sender selects the file to be digitally signed in the document platform or
application.
2. The sender’s computer calculates the unique hash value of the file content.
3. This hash value is encrypted with the sender’s private key to create the digital
signature.
4. The original file along with its digital signature is sent to the receiver.
5. The receiver uses the associated document application, which identifies that the file
has been digitally signed.
6. The receiver’s computer then decrypts the digital signature using the sender’s public
key.
Today, digital signatures are commonly used for a variety of different online documents in
order to improve the efficiency and security of critical business transactions that are now
paperless, including:
1. Contracts and legal documents: Digital signatures are legally binding. Thus, they
are ideal for any legal document requiring an authenticated signature by one or more
parties and assurance that the document has not been modified.
2. Sales agreements: By digitally signing contracts and sales agreements, both the seller
and the buyer identities are authenticated, and both parties have peace of mind that the
signatures are legally binding and that the terms and conditions of the agreement have
not been altered.
4. Healthcare data: In the healthcare industry, data privacy is paramount for both
patient records and research data. Digital signatures ensure that this sensitive
information has not been altered when shared between consenting parties.
5. Government forms: Government agencies at the federal, state, and local level have
stricter guidelines and regulations compared to many private sector businesses. From
approving permits to clocking in on a timesheet, the signatures can streamline
productivity by ensuring that the right employee is involved for the appropriate
approvals.
HASHING
Hashing functions are an essential part of cybersecurity and some cryptocurrency protocols
such as Bitcoin
What is hashing?
Hashing is a method of cryptography that converts any form of data into a unique string of
text. Any piece of data can be hashed, no matter its size or type.
In traditional hashing, regardless of the data’s size, type, or length, the hash that any data
produces is always the same length.
A hash is designed to act as a one-way function— you can put data into a hashing algorithm
and get a unique string, but if you come upon a new hash, you cannot decipher the input data
it represents. A unique piece of data will always produce the same hash.
How does it work?
The average user encounters hashing daily in the context of passwords. For example, when
you create an email address and password, your email provider likely does not save your
password. Rather, the provider runs the password through a hashing algorithm and saves the
hash of your password.
Every time you attempt to sign in to your email, the email provider hashes the password you
enter and compares this hash to the hash it has saved. Only when the two hashes match are
you authorized to access your email.
Hashing in Cryptocurrencies
Definition
Its primary innovation was its use of user identity attributes, such as email addresses or
phone numbers, instead of digital certificates, for encryption and signature verification. This
feature significantly reduces the complexity of a cryptography system by eliminating the need
for generating and managing users' certificates.
Pros and Cons of identity-based cryptography(IBC)
Pros
● No pre-enrollment required.
● Keys expire, so they don't need to be revoked. In a traditional public-key system, keys
must be revoked if compromised.
Cons
● Requires a centralized server. IBE's centralized approach implies that some keys must
be created and held in escrow -- and are therefore at greater risk of disclosure.
● Requires a secure channel between a sender or recipient and the IBE server for
transmitting the private key.
Symmetric key Cryptography: With the encryption technique, the sender and the
recipient use the same shared key to encrypt and decrypt messages
Although symmetric key systems are quicker and easier to use, they have the drawback of
requiring a secure key exchange between the sender and the receiver. Data Encryption
System (DES) is the most widely used symmetric key encryption method.
Hash Functions: In this algorithm, no key is used. The plain text is used to produce a
hash value that has a fixed length, making it challenging to retrieve the plain text's
information. Hash functions are widely used by operating systems to encrypt passwords.
Asymmetric Key Cryptography: This approach uses a set of keys to encrypt and
decrypt data. Public keys are used for encryption, whereas private keys are used for
decryption.
The Public Key and Private Key are different from one another. Even if everyone knows
the public key, only the intended recipient may decode the message since only he can
access the private key.
Symmetric Encryption: Block cipher, Stream cipher - Data Encryption Standard (DES) -
Cipher Block Chaining (CBC) – Multiple Encryption DES - International Data Encryption
Algorithm (IDEA) - Advanced Encryption Standard (AES)
Symmetric Encryption
We live so much of our lives today on the internet. Whether it’s for storing our personal
information, finding entertainment, making purchases, or doing our daily work, our society
relies increasingly on an online presence. This increased dependence on the internet means
that information security is more important than ever. The stakes are too high now. Users
need to know that their sensitive data is kept confidential, unmodified, and readily available
to authorized readers. Data encryption is just one weapon in the cyber security arsenal, but
it’s one of the oldest and most used.
Block Cipher
The same key is used for both the encryption of the plaintext and the decryption of the cipher
text. Block cipher encrypts/decrypts its input one block at a time instead of one bit at a time
using a shared, secret key. The block is fixed in size; otherwise, padding is necessary.
During encryption, it uses the shared key to transform its plaintext input into a cypher
text (encrypted text).
During decryption, it uses the same key to transform the cyphertext back to the
original plaintext. The length of the output is the same as the input.
1. Stream Cipher
Thus, the discarding of every 8th bit of the key produces a 56-bit key from the original 64-bit
key.
DES is based on the two fundamental attributes of cryptography: substitution (also called
confusion) and transposition (also called diffusion). DES consists of 16 steps, each of which
is called a round. Each round performs the steps of substitution and transposit ion. Let us now
discuss the broad-level steps in DES.
1. In the first step, the 64-bit plain text block is handed over to an initial Permutation (IP)
function.
2. The initial permutation is performed on plain text.
3. Next, the initial permutation (IP) produces two halves of the permuted block; says Left
Plain Text (LPT) and Right Plain Text (RPT).
4. Now each LPT and RPT go through 16 rounds of the encryption process.
5. In the end, LPT and RPT are rejoined and a Final Permutation (FP) is performed on the
combined block
6. The result of this process produces 64-bit ciphertext.
As we have noted after IP is done, the resulting 64-bit permuted text block is divided into two
half blocks. Each half-block consists of 32 bits, and each of the 16 rounds, in turn, consists of
the broad level steps outlined in the figure.
Step-1:Keytransformation –
We have noted initial 64-bit key is transformed into a 56-bit key by discarding every 8th bit
of the initial key. Thus, for each a 56-bit key is available. From this 56-bit key, a different 48-
bit Sub Key is generated during each round using a process called key transformation. For
this, the 56-bit key is divided into two halves, each of 28 bits. These halves are circularly
shifted left by one or two positions, depending on the round.
For example, if the round numbers 1, 2, 9, or 16 the shift is done by only position for other
rounds, the circular shift is done by two positions. The number of key bits shifted per round is
shown in the figure.
After an appropriate shift, 48 of the 56 bits are selected. for selecting 48 of the 56 bits the
table is shown in the figure given below. For instance, after the shift, bit number 14 moves on
the first position, bit number 17 moves on the second position, and so on. If we observe the
table carefully, we will realize that it contains only 48-bit positions. Bit number 18 is
discarded (we will not find it in the table), like 7 others, to reduce a 56-bit key to a 48-bit key.
Since the key transformation process involves permutation as well as a selection of a 48 -bit
subset of the original 56-bit key it is called Compression Permutation.
Because of this compression permutation technique, a different subset of key bits is used in
each round. That makes DES not easy to crack.
Step-2:ExpansionPermutation –
Recall that after initial permutation, we had two 32-bit plain text areas called Left Plain
Text(LPT) and Right Plain Text(RPT). During the expansion permutation, the RPT is
expanded from 32 bits to 48 bits. Bits are permuted as well hence called expansion
permutation. This happens as the 32-bit RPT is divided into 8 blocks, with each block
consisting of 4 bits. Then, each 4-bit block of the previous step is then expanded to a
corresponding 6-bit block, i.e., per 4-bit block, 2 more bits are added.
This process results in expansion as well as a permutation of the input bit while creating
output. The key transformation process compresses the 56 -bit key to 48 bits. Then the
expansion permutation process expands the 32-bit RPT to 48-bits. Now the 48-bit key is
XOR with 48-bit RPT and the resulting output is given to the next step, which is the S-Box
substitution.
Triple DES
The speed of exhaustive key searches against DES after 1990 began to cause discomfort
amongst users of DES.
However, users did not want to replace DES as it takes an enormous amount of time and
money to change encryption algorithms that are widely adopted and embedded in large
security architectures.
The pragmatic approach was not to abandon the DES completely, but to change the manner
in which DES is used. This led to the modified schemes of Triple DES (sometimes known as
3DES).
Incidentally, there are two variants of Triple DES known as 3-key Triple DES (3TDES) and
2-key Triple DES (2TDES).
Before using 3TDES, user first generate and distribute a 3TDES key K, which consists of
three different DES keys K1, K2 and K3. This means that the actual 3TDES key has length
3×56 = 168 bits. The encryption scheme is illustrated as follows
STEP-1: Encrypt the plaintext blocks using single DES with key K1.
STEP-2:Now decrypt the output of step 1 using single DES with key K2.
STEP-3:Finally, encrypt the output of step 2 using single DES with key K3.
STEP-5:Decryption of a ciphertext is a reverse process. User first decrypt using K3, then
encrypt with K2, and finally decrypt with K1.
Second variant of Triple DES (2TDES) is identical to 3TDES except that K3is replaced by
K1. In other words, user encrypt plaintext blocks with key K1, then decrypt with key K2, and
finally encrypt with K1 again. Therefore, 2TDES has a key length of 112 bits.
Triple DES systems are significantly more secure than single DES, but these are clearly a
much slower process than encryption using single DES.
DES algorithm has been a popular secret key encryption algorithm and is used in
many commercial and financial applications. However, its key size is too small by
current standards and its entire 56 bit key space can be searched in approximately 22
hours
IDEA is a block cipher designed by Xuejia Lai and James L. Massey in 1991
It is a minor revision of an earlier cipher, PES (Proposed Encryption Standard)
IDEA was originally called IPES (Improved PES) and was developed to replace DES
It entirely avoids the use of any lookup tables or S-boxes
IDEA was used as the symmetric cipher in early versions of the Pretty Good
Privacy(PGP) cryptosystem
IDEA operates with 64-bit plaintext and cipher text blocks and is controlled by a
128-bit key
Completely avoid substitution boxes and table lookups used in the block ciphers
The algorithm structure has been chosen such that when different key sub-blocks are
used, the encryption process is identical to the decryption process
Key generation
six 16-bit key are generated from the 128-bit key. Since a further four 16-bit key-sub-
blocks are required for the subsequent output transformation, a total of 52 (= 8 x 6 +
4) different 16-bit sub-blocks have to be generated from the 128-bit key.
Key generation process
First, the 128-bit key is partitioned into eight 16-bit sub-blocks which are then directly
used as the first eight key sub-blocks
The 128-bit key is then cyclically shifted to the left by 25 positions, after which the
resulting 128-bit block is again partitioned into eight 16-bit sub-blocks to be directly
used as the next eight key sub-blocks
The cyclic shift procedure described above is repeated until all of the required 52 16-
bit key sub-blocks have been generated .
⦿ The key sub-blocks used for the encryption and the decryption in the individual
rounds are shown in Table 1
Encryption
The first four 16-bit key sub-blocks are combined with two of the 16-bit plaintext
blocks using addition modulo 2 16, and with the other two plaintext blocks using
multiplication modulo 216 + 1
At the end of the first encryption round four 16-bit values are produced which are
used as input to the second encryption round
The four 16-bit values produced at the end of the 8th encryption round are combined
with the last four of the 52 key sub-blocks using addition modulo 216 and
multiplication modulo 216 + 1 to form the resulting four 16-bit cipher text blocks
Decryption
The computational process used for decryption of the ciphertext is essentially the
same as that used for encryption
The only difference is that each of the 52 16-bit key sub-blocks used for decryption is
the inverse of the key sub-block used during encryption
In addition, the key sub-blocks must be used in the reverse order during decryption in
order to reverse the encryption process
Modes of operation
For plaintext exceeding this fixed size, the simplest approach is to partition the
plaintext into blocks of equal length and encrypt each separately. This method is
named Electronic Code Book (ECB) mode. However, Electronic Code Book is not a
good system to use with small block sizes (for example, smaller than 40 bits)
Applications of IDEA
The IDEA algorithm can easily be embedded in any encryption software. Data
encryption can be used to protect data transmission and storage. Typical fields are:
Smart cards
The more popular and widely adopted symmetric encryption algorithm likely to be
encountered nowadays is the Advanced Encryption Standard (AES). It is found at least six
times faster than triple DES.
A replacement for DES was needed as its key size was too small. With increasing computing
power, it was considered vulnerable against exhaustive key search attack. Triple DES was
designed to overcome this drawback but it was found slow.
Operation of AES
● Interestingly, AES performs all its computations on bytes rather than bits. Hence,
AES treats the 128 bits of a plaintext block as 16 bytes.
● These 16 bytes are arranged in four columns and four rows for processing as a matrix
● Unlike DES, the number of rounds in AES is variable and depends on the length of
the key.
● AES uses 10 rounds for 128-bit keys, 12 rounds for 192-bit keys and 14 rounds for
256-bit keys.
● Each of these rounds uses a different 128-bit round key, which is calculated from the
original AES key.
Encryption Process
we restrict to description of a typical round of AES encryption. Each round comprise of four
sub-processes. The first round process is depicted below −
The 16 input bytes are substituted by looking up a fixed table (S-box) given in design. The
result is in a matrix of four rows and four columns.
Shiftrows
Each of the four rows of the matrix is shifted to the left. Any entries that ‘fall off’ are re-
inserted on the right side of row. Shift is carried out as follows −
● First row is not shifted.
● The result is a new matrix consisting of the same 16 bytes but shifted with respect to
each other.
MixColumns
● Each column of four bytes is now transformed using a special mathematical function.
This function takes as input the four bytes of one column and outputs four completely
new bytes, which replace the original column. The result is another new matrix
consisting of 16 new bytes. It should be noted that this step is not performed in the
last round.
Addroundkey
● The 16 bytes of the matrix are now considered as 128 bits and are XORed to the 128
bits of the round key. If this is the last round then the output is the ciphertext.
Otherwise, the resulting 128 bits are interpreted as 16 bytes and we begin another
similar round.
Decryption Process
The process of decryption of an AES ciphertext is similar to the encryption process in the
reverse order. Each round consists of the four processes conducted in the reverse order −
● Mix columns
● Shift rows
● Byte substitution
Since sub-processes in each round are in reverse manner, unlike for a Feistel Cipher, the
encryption and decryption algorithms need to be separately implemented, although they
are very closely related.
AES Analysis
● In present day cryptography, AES is widely adopted and supported in both hardware
and software.
● Till date, no practical cryptanalytic attacks against AES has been discovered.
Additionally, AES has built-in flexibility of key length, which allows a degree of
‘future-proofing’ against progress in the ability to perform exhaustive key searches.
● However, just as for DES, the AES security is assured only if it is correctly
implemented and good key management is employed.
Asymmetric Encryption
Asymmetric cryptography is a branch of cryptography where a secret key can be divided into
two parts, a public key and a private key. The public key can be given to anyone, trusted or
not, while the private key must be kept secret (just like the key in symmetric
cryptography).Asymmetric cryptography, which can also be called public-key cryptography,
uses private and public keys to encrypt and decrypt the data.
Asymmetric cryptography has two primary use cases: authentication and confidentiality.
Using asymmetric cryptography, messages can be signed with a private key, and then anyone
with the public key is able to verify that the message was created by someone possessing the
corresponding private key.
This can be combined with a proof of identity system to know what entity (person or group)
actually owns that private key, providing authentication.
Sales agents from various regions will have to send sales data to head office(HO) during
month-end in a secure way to keep the information out of competitors’ reach.
The head office will generate private/public keys for each agent and communicate the
agents’ public key.
An agent will use the public key in encrypting the sales data and send it to HO.
HO will decipher it using the agent’s private key and get the data in the original form.
The entire information exchange had taken place in a secured manner, and even if a public
key is leaked, the secrecy is not lost because the only private key is used to decipher, and it
is safely lying in HO.
A client gets the public key from the bank web site and sends passwords and other
confidential details to Bank after encrypting it with a public key, and the Bank deciphers the
details with a private key of the client.
Applications of Asymmetric Encryption
1. Confidentiality
A sender attaches his private key to the message as a digital signature and exchanges it with
the receiver. The receiver uses the sender’s public key and verifies whether the private key
sent belongs to the sender, hence ascertaining the sender’s authenticity.
One way the hash of the data to be exchanged is created and encrypted using the sender’s
private key. Encrypted hash and data are exchanged with the receiver. Using the sender’s
public key, the receiver decrypts the hash and recreates the hash. Any difference between the
two hashes indicates the content is altered after signature and integrity are lost. This kind of
integrity check is followed in digital cash and bitcoin transactions.
4. Non-repudiation
With the digital signature encryption tool in place, the owner of a document or information
who exchanged it with others cannot disown the content, and a transaction done online
cannot be disowned by its originator.
A public key and Private keys are generated randomly using an algorithm, and the keys have
a mathematical relationship with each other.
The key should be longer in length (128 bits, 256 bits) to make it stronger and make it
impossible to break the key even if the other paired key is known.
The number of possible keys increases proportionally with the key length, and hence cracking
it also becomes tougher.
Public Key Encryption Algorithms
Almost all public-key encryption algorithms use either number theory and modular
arithmetic, or elliptic curves
RSA
El Gamal
RSA Algorithm
Essentially the same algorithm was discovered in 1973 by Clifford Cocks, who works
for the British intelligence
Key generation:
1. Select 2 large prime numbers of about the same size, p and q Typically each p, q has
between 512 and 2048 bits
4. Compute d, 1< d< Φ(n) s.t. ed ≡ 1 mod Φ(n) Knowing Φ(n), d easy to compute.
Decryption
C = Me mod (n=pq)
Plaintext: M Ciphertext: C
Cd mod n
RSA Example
M ≡ Cd mod n
Parameters:
p = 3, q = 5, q= pq = 15
Φ(n) = ?
Let e = 3, what is d?
Characteristics of RSA
• RSA has high toughness as breaking into the keys by interceptors is very difficult.
Esoteric Protocols
Secure Elections Ideal voting protocol has at least following six properties:
6. Every voter can make sure that his vote has been taken into account in the final tabulation
Additionally
1. Each voter encrypts his vote with the public key of a Central Tabulating Facility (CTF)
3. The CTF decrypts the votes, tabulates, and makes the results public
2. Each voter encrypts his signed vote with the CTF’s public key
5. Every voter can make sure that his vote has been taken into account in the final
tabulation.
Unsatisfied Requirements
4. No one can change anyone else’s vote without being discovered. (By intercept attack)
5. Every voter can make sure that his vote has been taken into account in the final
tabulation.
1. CTF can generate a large number of signed, valid votes and cheat by submitting those
itself.
2. If voter discovers that the CTF changed his or her vote, he or she has no way to prove
it.
Homomorphic Encryption
A homomorphic cryptosystem is like other forms of public encryption in that it uses a public
key to encrypt data and allows only the individual with the matching private key to access its
unencrypted data (though there are also examples of symmetric key homomorphic encryption
as well).
Different types of homomorphic encryption
1. Allows secure and efficient cloud use: Homomorphic encryption can allow businesses to
leverage cloud computing and storage services securely. It eliminates the tradeoff between
data security and usability.
Businesses don’t have to rely on cloud services regarding the security of their private data
while retaining the ability to perform computations on it.
▪ The process starts with data in its decrypted form (i.e., plain text). The owner of the
data wants some other party to perform a mathematical operation on it without
revealing its content.
▪ The owner encrypts the data and sends it to the other party.
▪ The other party receives encrypted data, performs operations on it, and sends the
encrypted result to the owner.
▪ The owner of the data decrypts it with a private key and reveals the result of the
intended mathematical operation on the data.
Hashing and Message Digests: Cryptographic Hash Functions- Applications- Simple hash
functions and features for ensuring security – Hash functions based on Cipher Block
Chaining- Secure Hash Algorithm (SHA) - Message Digest - MD5
Message Authentication: Authentication Systems – Password and Address – Security
Handshake Drawbacks - Authentication Standards – Kerberos- PKI Trust Models -Message
Authentication Codes (MAC) – Security features- MAC based on Hash Functions - MAC
based on Block Ciphers.
The integrity check helps the user to detect any changes made to original file. It however,
does not provide any assurance about originality. The attacker, instead of modifying file data,
can change the entire file and compute all together new hash and send to the receiver. This
integrity check application is useful only if the user is sure about the originality of file.
Secure Hash Algorithm (SHA)
SHA algorithm is Secure Hash Algorithm developed by the National Institute of Standards
and Technology (NIST) along with National Security Agency, previously released as a
Federal Information Processing Standard, later in 1995, it was named as SHA algorithm,
design to modify the MD4, in other words, we can say that the SHA algorithm is the
modified version of MD4. SHA is designed to obtain the original message, given its message
digest, and find the message producing the same message.
What is SHA Algorithm?
In the field of cryptography and crypt analytics, the SHA-1 algorithm is a cryptformatted
hash function that is used to take a smaller input and produces a string that is 160 bits, also
known as 20-byte hash value long. The hash value therefore generated, is known as a
message digest which is typically rendered and produced as a hexadecimal number which is
specifically 40 digits long.
Characteristics
The cryptographic hash functions are utilized and used to keep and store the secured form of
data by providing three different kinds of characteristics such as pre-image resistance, which
is also known as the first level of image resistance, the second level of pre-image resistance
and collision resistance.
The cornerstone lies in the fact that the pre-image crypt resistance technique makes it hard
and more time consuming for the hacker or the attacker to find the original intended message
by providing the respective hash value.
The security, therefore, is provided by the nature of a one way that has a function that is
mostly the key component of the SHA algorithm. The pre-image resistance is important to
clear off brute force attacks from a set of huge and powerful machines.
Similarly, the second resistance technique is applied where the attacker has to go through a
hard time decoding the next error message even when the first level of the message has been
decrypted. The last and most difficult to crack is the collision resistance, making it extremely
hard for the attacker to find two completely different messages which hash to the same hash
value.
Therefore, the ratio to the number of inputs and the outputs should be similar in fashion to
comply with the pigeonhole principle. The collision resistance implies that finding two
different sets of inputs that hash to the same hash is extremely difficult and therefore marks
its safety.
Types of SHA Algorithm
The Different Types of SHA algorithm include the ones:
1. SHA-0
It is a retronym that is applied to the basic version of the year-old 160 bit or 20-byte
long hash function, which was published back in 1993 with the name of the SHA
algorithm. It was withdrawn very shortly after it was published due to a major flaw,
and therefore SHA-1 came into the picture.
2. SHA-1
It is a 160 bit or a 20-byte long hash-based function-based encryption mechanism that
is used to resemble the year-old MD5 algorithm. The particular algorithm was
designed and developed by the NSA, i.e. the National Security Agency and was
supposed to be part of the critical component- Digital Signature Algorithm (DSA).
The weaknesses related to the cryptographic techniques were found in SHA-1; the
encryption standard was later on discarded and was not much put to use.
3. SHA-2
This forms a family of 2 identical hash functions, which consist of differently sized
block sizes which are known to be SHA-512 and SHA-256, which differ mainly in the
word size. The former consists of the word value range of 32 words, whereas the
latter consists of the 64-bit word value. The truncated versions of these values include
SHA-224, SHA-384 and SHA-512 and SHA-224 or SHA-256.
4. SHA-3
This is the encryption technique being used mainly today, which makes use of the
hash function named Keccak. The length supported is the same as that of SHA-2.
Still, the majority of the difference lies in the fact that this one is structurally different
as it is based on a wide range of random function generation, which typically supports
all random permutations and thereby allowing inputting or absorbing, as it is called,
any amount of data presented and outputting or squeezing the presented data. While
doing all this, this acts as a pseudorandom function for all the inputs provided, which
therefore leads to greater flexibility.
Uses of SHA Algorithm
These SHA algorithms are widely used in security protocols and applications,
including the ones such as TLS, PGP, SSL, IPsec, and S/MiME.
These also find their place in all the majority of cryptanalytic techniques and coding
standards which is mainly aimed to see the functioning and working of majorly all
governmental as well as private organizations and institutions.
Major giants today such as Google, Microsoft, or Mozilla have started to recommend
the use of SHA-3 and stop the usage of the SHA-1 algorithm.
Message Authentication Codes
Message Authentication Codes are the codes which plays their role in two important
functions: Authentication Detection and Falsification Detection
Where do we need these codes?
Suppose User A send message to user B with message – ‘abc’. A encrypts the
message using Shared – Key Cryptosystem for encrypting the message. A sends the
key to B using a source key. Key exchange is based on different protocols such as
Public – Key Cryptosystem. B uses the key to decrypt the Cipher text and obtains the
message.
If a malicious user X has falsified the ciphertext during the transmission. Then, in that
case, B has no way to realize that it has been falsified. When B decrypts the message,
it will get the wrong message. Unknown to the fact B will think wrong information to
be the right. Although you can decrypt or encrypt the data later on but these
operations, you are applying the wrong data.
Here we need to detect the falsification in the message B has got. Here A will
create a key (used to create Message Authentication Code) and sends the key to B. A
will create a value using Ciphertext and key and the value is obtained. This value
Created by Ciphertext + Key = Message Authentication Code. B has to check
whether the ciphertext is falsified or not using Message Authentication Code. Now B
can clearly know that whether the ciphertext is falsified or not.
Apart from intruders, the transfer of message between two people also faces other
external problems like noise, which may alter the original message constructed by the
sender. To ensure that the message is not altered there’s this cool method MAC.
MAC stands for Message Authentication Code. Here in MAC, sender and receiver
share same key where sender generates a fixed size output called Cryptographic
checksum or Message Authentication code and appends it to the original message. On
receiver’s side, receiver also generates the code and compares it with what he/she
received thus ensuring the originality of the message.
These are components:
Message
Key
MAC algorithm
MAC value
There are different types of models Of Message Authentication Code (MAC) as
following below:
1. MAC without encryption – This model can provide authentication but not
confidentiality as anyone can see the message.
2. Internal Error Code - In this model of MAC, sender encrypts the content before
sending it through network for confidentiality. Thus this model provides
confidentiality as well as authentication
M' = MAC(M, k)
HMAC Algorithm
Hence, the working of HMAC starts with taking a message M containing blocks of length b
bits of the message. Thus, an input signature is padded to the left of the message and the
whole is given as input to a hash function which gives us a temporary message-digest MD' of
the message of plaintext or original text. Thus, MD' again is appended to an output signature,
and the whole is applied a hash function again, the result is our final message digest MD in
cryptography.
Here, H stands for hashing function,
K is the secret key used for hashing IV is an initial vector (some constant)
Is Kerberos Infallible?
No security measure is 100% impregnable, and Kerberos is no exception. Because it’s been
around for so long, hackers have had the ability over the years to find ways around it, typically
through forging tickets, repeated attempts at password guessing (brute force/credential stuffing),
and the use of malware, to downgrade the encryption.
Despite this, Kerberos remains the best access security protocol available today. The protocol is
flexible enough to employ stronger encryption algorithms to combat new threats, and if users
employ good password-choice guidelines, you shouldn’t have a problem!
What is Kerberos Used For?
● Although Kerberos can be found everywhere in the digital world, it is commonly used in
secure systems that rely on robust authentication and auditing capabilities. Kerberos is used
for Posix, Active Directory, NFS, and Samba authentication. It is also an alternative
authentication system to SSH, POP, and SMTP.
Authentication Systems
➢ The principal is referred to as the proverb, while the party to whom proof is submitted
identity verification is called the verifier.
➢ In the case of a human principal, authentication may use physical characteristics such as
voice, a fingerprint, a retinal scan, or even a DNA sample — this form of authentication is
referred to as biometric authentication.
Passwords to the systems are something like the keys to the front doors. A front door is
likely to be the first that is attacked by an intruder. Making use of login-name & password is
an easy & cheap method of authentication, and is the most widely used. The passwords and
the corresponding usernames are stored with the server database. Whenever the user enters
into the system, the password entered by the user will be forwarded to the server and the
verification with the database will be performed and the authentication will be completed.
The storage of password with the server and the transmission password from the client to the
server may create security breach. The various types of attacks possible with the password
are discussed below.
1.1 On-line vs. off-line guessing: Certain techniques are cracking the password directly by
creating some hackers programme or by creating the fake login screen. This will attack the
password directly either by using certain permutation combination or by the support of the
dictionary. The passwords can also be attacked offline by using social engineering
techniques or by casual discussions with the user. The following are some methods which
will attack the password either offline or online.
i. Direct Approach: This method apparently seems to be very easy but yet is very
ineffective, since nobody is going to disclose the password easily to anyone. Still, intruders
use this as the first method & try their luck & then go for more difficult ones. This attack is
performed in such a way that the intruders will try with the various keywords, which are
directly related with the user like name, relatives name, organization, city, designation etc.
Normally user will select the passwords which can be easily remembered by them and
which are directly related with them. The intruders will use this loophole and directly attack
the password.
ii. Dictionary based attacks: Hackers may use ready-made dictionaries for checking the
passwords of systems, using special software. This method is somewhat difficult and time
consuming, but not very sure. The main problem with this method is that the dictionary will
be containing only the meaningful combination of characters, whereas the password can be
of any combination of characters. The average of success will be very less with this method.
iii. Brute force attacks: This involves using several combinations of keys such as
alphabets, numbers, special characters etc. for a specific no. Of digits & comparing or
applying them to guess passwords. Normally the possibility of getting the password is very
easy with this method. Because of the possibility of the password is the only combination of
the keys available within the keypad. By combining the same keys with various
combinations the passwords can be easily cracked. This refers to the process of trial and
error method with lots of permutations and combinations. Of course this is most tedious and
time consuming, but surer method of getting passwords.
iv. Using fake / login: Sometimes, if the attacker is an insider, or is someone who can get a
direct access, then the attacker may keep a fake login program running on a terminal, which
feels legitimate to unknown users. When someone logins, he gets an invalid login message,
and the password is meanwhile collected somewhere, which is available for the attacker.
Windows prevents from this attack, by requiring Ctrl-Alt Del keys before login. Another
way to protect is to always lock the terminal while going away from it.
v. Packet sniffing: As another attempt, attackers may intercept the packets flowing through
the network. Some protocols let out the passwords in clear text while transmitting, which
may be grabbed by attackers sniffing the packets. Although this is also tedious, it may work
out sometimes. Packet sniffing is a form of wiretap applied to computer networks instead of
phone networks. It came into vogue with Ethernet, which is known as a "shared medium"
network.
i. User’s authentication information is individually configured into every server the user
will use.
ii. Another location called authentication storage node, stores user information and servers
retrieve that information when they want to authenticate the user.
iii. Another location is called as authentication facilitator node. This location stores the user
information and a server that wants to authenticate user will send the information received
from the user to the AF node.
iv. Encrypted password: Normally with any networking system the password from the node
to the server will always travel in a plain text format. In the same way within the server
database also the password will be stored in a plain text format. It will be easy for any
hacker to crack the password. To avoid this kind of attack one should keep the password in
an encrypted format. Any encryption method can be used to encrypt the password.
1. One time password: This is the basic method, which will use different password with
every access. As the passwords are easily cracked by the systems, this method will help the
user to protect the password from the hackers. Every time the password will change. Before
the hackers use any method to crack the password, the user will change the password.
2. Encrypted password: Normally with any networking system the password from the node
to the server will always travel in a plain text format. In the same way within the server
database also the password will be stored in a plain text format. It will be easy for any
hacker to crack the password. To avoid this kind of attack one should keep the password in
an encrypted format. Any encryption method can be used to encrypt the password.
One way to make things manageable is to use a trusted node known as Key Distribution
Center (KDC).The KDC knows keys for all nodes. If a new node is installed in the network,
only that, new node and the KDC need to be configured with a key for that node. If node α
wants to talk to node β, α talks to the KDC (securely,since α and the KDC share a key),and
asks for a key with which to talk to β .The KDC authenticates α ,chooses a random number
Rαβ to be used as a key to be shared by α and β for their conversation ,encrypts Rαβ with
the key the KDC shares with α and gives that to α. The KDC also encrypts Rαβ with the key
the KDC shares with β and gives that to β. With the instruction that it is to be used for
conversing with α.(Usually ,the KDC will not bother to actually transmit the encrypted Rαβ
to β but rather will give it to α to forward to β.)the encrypted message to β that the KDC
gives to α to forward is often referred to as a ticket. Besides containing Rαβ, the ticket
generally contains other information such as an expiration time and α’s name. KDCs make
key distribution much more convenient .when a new user is being installed into the network,
or when a user’s key is suspected of having been compromised, there’s a single location (the
KDC) that needs to be configured .
3.3 BIOMETRICS
Biometrics are the another way to ensure the security mechanism. This authenticates the
user by verifying either the one 101 which the user possesses or the one which user has as a
physical features. The one which the user possesses may be a smart card or SID chip. The
one which the user has may be his fingerprints or the facial expressions.
o Retinal Scanner.
o Fingerprint readers.
o Face recognition
o IRIS scanner
o Handprint readers.
o Voiceprints.
Authentication Systems
Authentication is a process in which a principal proves that he/she/it is the entity it claims to
be.
➢ The principal is referred to as the proverb, while the party to whom proof is submitted
identity verification is called the verifier.
➢ In the case of a human principal, authentication may use physical characteristics such as
voice, a fingerprint, a retinal scan, or even a DNA sample — this form of authentication is
referred to as biometric authentication.
➢ Instead, he/she may be required to perform some "one-way" cryptographic operation using
his/her secret, which cannot be performed without knowledge of it.
1.1 On-line vs. off-line guessing: Certain techniques are cracking the password directly by
creating some hackers programme or by creating the fake login screen. This will attack the
password directly either by using certain permutation combination or by the support of the
dictionary. The passwords can also be attacked offline by using social engineering techniques
or by casual discussions with the user. The following are some methods which will attack the
password either offline or online.
i. Direct Approach: This method apparently seems to be very easy but yet is very
ineffective, since nobody is going to disclose the password easily to anyone. Still,
intruders use this as the first method & try their luck & then go for more difficult
ones. This attack is performed in such a way that the intruders will try with the
various keywords, which are directly related with the user like name, relatives name,
organization, city, designation etc. Normally user will select the passwords which can
be easily remembered by them and which are directly related with them. The intruders
will use this loophole and directly attack the password.
ii. Dictionary based attacks: Hackers may use ready-made dictionaries for checking the
passwords of systems, using special software. This method is somewhat difficult and
time consuming, but not very sure. The main problem with this method is that the
dictionary will be containing only the meaningful combination of characters, whereas
the password can be of any combination of characters. The average of success will be
very less with this method.
iii. Brute force attacks: This involves using several combinations of keys such as
alphabets, numbers, special characters etc. for a specific no. Of digits & comparing or
applying them to guess passwords. Normally the possibility of getting the password is
very easy with this method. Because of the possibility of the password is the only
combination of the keys available within the keypad. By combining the same keys
with various combinations the passwords can be easily cracked. This refers to the
process of trial and error method with lots of permutations and combinations. Of
course this is most tedious and time consuming, but surer method of getting
passwords.
iv. Using fake / login: Sometimes, if the attacker is an insider, or is someone who can get
a direct access, then the attacker may keep a fake login program running on a
terminal, which feels legitimate to unknown users. When someone logins, he gets an
invalid login message, and the password is meanwhile collected somewhere, which is
available for the attacker. Windows prevents from this attack, by requiring Ctrl-Alt-
Del keys before login. Another way to protect is to always lock the terminal while
going away from it.
v. Packet sniffing: As another attempt, attackers may intercept the packets flowing
through the network. Some protocols let out the passwords in clear text while
transmitting, which may be grabbed by attackers sniffing the packets. Although this is
also tedious, it may work out sometimes. Packet sniffing is a form of wiretap applied
to computer networks instead of phone networks. It came into vogue with Ethernet,
which is known as a "shared medium" network.
i. User’s authentication information is individually configured into every server the user
will use.
ii. Another location called authentication storage node, stores user information and
servers retrieve that information when they want to authenticate the user.
iii. Another location is called as authentication facilitator node. This location stores the
user information and a server that wants to authenticate user will send the information
received from the user to the AF node.
iv. Encrypted password: Normally with any networking system the password from the
node to the server will always travel in a plain text format. In the same way within the
server database also the password will be stored in a plain text format. It will be easy
for any hacker to crack the password. To avoid this kind of attack one should keep the
password in an encrypted format. Any encryption method can be used to encrypt the
password.
1. One time password: This is the basic method, which will use different password with
every access. As the passwords are easily cracked by the systems, this method will help
the user to protect the password from the hackers. Every time the password will change.
Before the hackers use any method to crack the password, the user will change the
password.
2. Encrypted password: Normally with any networking system the password from the
node to the server will always travel in a plain text format. In the same way within the
server database also the password will be stored in a plain text format. It will be easy for
any hacker to crack the password. To avoid this kind of attack one should keep the
password in an encrypted format. Any encryption method can be used to encrypt the
password.
Implications
Authentication is not mutual
How to encrypt subsequent conversation?
If key derived from a password, offline password guessing is possible
Bob knows KAlice-Bob so if Bob's database is compromised, attacker can
impersonate Alice
Implications
Implications
Implications
Implications
Compromise of Bob's database will not allow attacker to impersonate Alice
Attacker may be able to trick Alice into signing anything
Implications
Compromise of Bob's database will not allow attacker to impersonate Alice
Attacker may be able to trick Alice into decrypting anything
Mutual authentication
o Reflection attack
Implications
Implications
More efficient
Easy to get chosen plaintext
Subject to a reflection attack
Attack
Implications
One "extra" message and Alice cannot obtain chosen plaintext
o Public keys
Implications
How to obtain public keys?
How can workstation obtain private key from password? (Easy with symmetric key
crypto, not so easy with public key crypto.)
Identity-based encryption is an active research area
Timestamps
Implications
Only 2 messages
Alice and Bob must encrypt different things
Everyone must agree on the time
Time is now security-critical
Kerberos
A user could use the same password for all servers but distributing and maintaining a
password file across multiple servers poses a securit risk.
3. The password itself should not be stored on the authentication server, rather it should be
cryptographically transformed before being stored.
5. A user enters her password only ONCE during login. Thereafter, she should not have to re-
enter her password to access other servers for the duration of the session. This feature is
called single sign-on.
6. The password should reside on a machine for only a few milliseconds after being entered
bythe user. The Kerberos protocol elegantly addresses many of these issues.
➢ The KDC used in the Needham—Schroeder protocol is logically split into two entities here
— the Authentication Sewer (AS) and the Ticket Granting Server (TGS).
➢ The sequence of messages exchanged between the client (C), the Kerberos servers (AS and
TGS) and the requested server(S) is shown in Fig.3.14 .
Message 1 C →AS
➢ In Message 1, the client informs the AS that it wishes to communicate with the TGS.
➢ "Times" field specifies the start time and expected duration of the login session.
➢ R1 is a nonce generated by C
Message2 AS → C
➢ The response from the AS (Message 2) contains a session key, Kc,TGS, to be used for
communication between C and the TGS.
➢ This key is encrypted with the long-term key, KC known to C and theAS.
➢ The AS also includes a TGT (Ticket TGS)in connection with C's request.
➢ In Message 3, C forwards the TGT (Ticket TGS), Authenticator Cto the TGS
➢ Using this Ticket TGS ,TGS server extracts the session key, KC,TGS,known only to C and
the TGS. ➢As shown above, the Authenticator Cencrypts the current time (timestamp) and
ID usingKC,TGS Message4 TGS→C
➢ The TGS generates a fresh session key, Kc,s, to be shared between C and S.
➢ This key is encrypted using the session key KC,TGS, so only C can decrypt it.
➢ The fresh nonce, R2, from C is also encrypted by the TGS using K C,TGS
➢ Finally, the fresh session key Kc,s is enclosed in a service-granting ticket to be forwarded
by C to S.
➢ The service-granting ticket is encrypted with the long-term secret shared between the TGS
and S
Message5 C→S
➢ C also creates and sends to S an authenticator by encrypting a timestamp with the session
key Kc,s Message6 S→C
➢ S then increments the timestamp and encrypts it with the fresh session key.
➢ The encrypted timestamp serves to authenticate S to C.
PKI Trust Models
implement a trust model that can cover all or some of these principles, one of the best ways is
Public Key Infrastructure (PKI) and there are four types that are used to implement the trust
model with PKI.
A. Hierarchical Trust Model: The hierarchical model or tree model is the most common
model to implement the PKI. A root CA at the top provides all the information and the
intermediate CAs are next in the hierarchy, and they only trust the information provided by the
root. The root CA also trusts intermediate CAs that are in their level in the hierarchy.
This arrangement allows a high level of control at all levels of the hierarchical tree this might
be the most common implementation in a large organization that wants to extend its
certificate-processing capabilities. Hierarchical models allow tight control over certificate-
based activities.
B. Bridge Trust Model: In Bridge Trust Model we have many P2P relations between Root C
As that the Root CAs can communicate with each other and allow cross-certificates. This
implementation model allows a certification process to be established between Organizations
(or departments).In this model, each intermediate CA trusts only the CAs above and below it
but the CA structure can be expanded without creating additional layers of CAs. Additional
flexibility and interoperability between organizations are the primary advantages of a bridge
model.
C. Hybrid Trust Model: Sometimes you need to link two or more organizations or
departments in some part and separate other segments. When you need to make trust in some
parts of two organization but you don`t want to be this trust in other segments of your
organization. In these times the Hybrid Trust Model can be the best model for you. You can be
extremely flexible when you build a hybrid trust structure and the flexibility of this model also
If a malicious user X has falsified the ciphertext during the transmission. Then, in that
case, B has no way to realize that it has been falsified. When B decrypts the message,
it will get the wrong message. Unknown to the fact B will think wrong information to
be the right. Although you can decrypt or encrypt the data later on but these
operations, you are applying the wrong data.
Here we need to detect the falsification in the message B has got. Here A will
create a key (used to create Message Authentication Code) and sends the key to B. A
will create a value using Ciphertext and key and the value is obtained. This value
Created by Ciphertext + Key = Message Authentication Code. B has to check
whether the ciphertext is falsified or not using Message Authentication Code. Now B
can clearly know that whether the ciphertext is falsified or not.
Apart from intruders, the transfer of message between two people also faces other
external problems like noise, which may alter the original message constructed by the
sender. To ensure that the message is not altered there’s this cool method MAC.
MAC stands for Message Authentication Code. Here in MAC, sender and receiver
share same key where sender generates a fixed size output called Cryptographic
checksum or Message Authentication code and appends it to the original message. On
receiver’s side, receiver also generates the code and compares it with what he/she
received thus ensuring the originality of the message.
These are components:
Message
Key
MAC algorithm
MAC value
There are different types of models Of Message Authentication Code (MAC) as
following below:
1. MAC without encryption – This model can provide authentication but not
confidentiality as anyone can see the message.
2. Internal Error Code - In this model of MAC, sender encrypts the content before
sending it through network for confidentiality. Thus this model provides
confidentiality as well as authentication
M' = MAC(M, k)
Problems in MAC –
If we do reverse engineering we can reach plain text or even the key. Here we have mapped
input to output, to overcome this we move on to hash functions which are “One way”.
Note – symbol “E” denotes symmetric key encryption.
MAC-based on Hash Function (HMAC)
This Hashed or Hash-based Message Authentication Code in cryptography. Thus, developing
a MAC derived from cryptographic hash functions in this. Mainly, HMAC is a great
resistance towards cryptanalysis attacks as it uses the hashing concept twice in cryptography.
Thus, HMAC consists of twin benefits of Hashing and MAC and thus is more secure than
any other authentication code in cryptography. Thus, RFC 2104 has issued HMAC, and
HMAC has been made compulsory to implement in IP security in MAC. Then, the FIPS 198
NIST standard has also issued HMAC in cryptography.
HMAC Algorithm
Hence, the working of HMAC starts with taking a message M containing blocks of length b
bits of the message. Thus, an input signature is padded to the left of the message and the
whole is given as input to a hash function which gives us a temporary message-digest MD' of
the message of plaintext or original text. Thus, MD' again is appended to an output signature,
and the whole is applied a hash function again, the result is our final message digest MD in
cryptography.
Here, H stands for hashing function,
K is the secret key used for hashing IV is an initial vector (some constant)
It is previously predominant algorithm for the encryption of a electronic data.It was highly
influential in the advacement of modern cryptography in the academic world.Developed in
the early 1970s at IBM and based on an earlier design by Horst Feistel.
Data Encryption Standard
-DES is a feistel cipher
-Block Length is 64 bit
-Key Length is 56 bit
-No of rounds are 16
-Each round is applied on one Block Cipher
-Security depends primarly on "s-boxes"
-Each S-boxes maps 6 bits to 4-bits
Objectives
Block cipher
Full Size cipher and Partial key cipher
Components of a Modern Block Cipher
o P Box (Permutation Box)
o S Box (Substitution Box)
o Swap
o Exclusive OR operation
Diffusion and Confusion
Feistel cipher
Examples
Cnsider a 3-bit block ciphers.How many bits are needed for the full-size Key?
-Transposition cipher:ceil(log26)=3 bits
-Substitution cipher:
There are 8!=40,320 possible substitutions
Thus there are ceil(log2(40,320))=16 bits
Thus it is a permutation of 2n values,thus needs
ceil[log2(216)]=65,536 bits
-We can observe there is a lot unused keys.
Partial-Size key ciphers
Actual ciphers cannot use full size keys,as the size is large
Block ciphers are substitution ciphers(and not transpositions).why?
-if we use transposition cipher then it will very easy for Attacker to break the code by
usng Hamming weight
-Hamming weight is nothing but no of 1's in a given code
Example=(101011) Hamming weight is 4
Consider DES,with 64 bit block cipher.
-Size of full key=ceil(log2(64!))≈ 270
-Much large compared to 56 bits which is actually used
-so we are using partial key cipher
-here we are considering the 56 bit key for DES
Components of Modern Block cipher
Most important components are
-PBOX:It is a key-less fixed transposition cipher
-SBOX: It is a key-less fixed substitution cipher
They are used to provide:
-DIFFUSION:It hides the relationship between the ciphertext and the plaintext
-CONFUSION:It hides the relationship between the ciphertext and the key
Principle of Confusion and Diffusion
The design principles of Block Cipher depends on these properties
The S-BOX is used to provide Confusion,as iti is dependent on the unkonwn Key
The P-BOX is fixed,and there is no confusion due to it
But it provides diffusion
Properly combining these is necessary.
Diffusion boxes are generally of three types
S-B OX
An S-Box(SUbstitution box) is an M*N susbtitution box where m and n are not
necessarily same.
Each output bit is a boolean function function of the inputs.
y1=f1(x1,x2, ........ ,xn)
y2=f2(x1,x2, ....... ,xn)
y3=f3(x1,x2, ........ ,xn)
.........................
ym=fm(x1,x2, ......... ,xn)
if you do in the same as above the S-BOX just perform XOR operation between
various things, permutes and shuffle bits around so it is just XOR's and bit
permutations
As a result all the DES operations would be linear which does not provide security
From this we can observe only S-BOX operations are non-linear to provide security
Eg: y1=X1X3 ⊕X2,Y2=X1X2 ⊕X3
Permutation Box(P-BOX)
permutation box (or P-box) is a method of bit-shuffling used to permute or transpose
Other Components
Circular shift
-It shifts each bit in an n-bit word K positions to the left.the leftmost k bits become the
original rightmost bits.
-Invertile Transformation
-For example,repeatedly applying circular shifts to the four-tuple(a,b,c,d) successively
gives
(d,a,b,c),(c,d,a,b),(b,c,d,a),(a,b,c,d)
Swap
-A specail type of shift operation where k=n/2
Other operations involve split and combine
An important component is exclusive - or operation
Properties of EX-OR
EX-or is a binary operator,which results in 1 when both the inputs have a different
logic.Otherwise,it computes 0
-Symbol ⊕
Closure:Result of exoring two n bit numbers is also n bits
Associativity:Allows to use more than one's ⊕in any order
- X ⊕(Y ⊕Z) = (X ⊕Y) ⊕Z
Comutatavity:X ⊕Y=Y ⊕X
Identity:The identity element is the n bit 0,represented by
(0,0,0, ..... 0) = 0n
Thus X ⊕0n = X
Inverse:Each word is the additive inverse of itself
X ⊕X = 0n
Application of EX-OR
The key is known to both the encryptor and decryptor and helps to recoer the
plaintext.
C=P ⊕ K
C ⊕ K = (P ⊕ K) ⊕ K
= P ⊕ (K ⊕ K)
= P ⊕ 0n(identity)
=P
-Here 8th bit of the plain text is XOR ed with the 8 th bit of the Key
-From Xor we got 2 bits of output and passed to different positions in the middle text
-And from there it is XOR ed with the 2nd and 4th bit of the Key and produces four
output bits
-An this four bit are passsed to 1,3,6,7 positions of the cipher text
-Now you can see if you change or disturb one bit in the plain text then 4 bits are
affected in the cipher text
-Here we can feel Diffusion(the single bit is converted into 4 bits )so hiding from the
plain text is provided
-Here we can feel Confusion(the 1,3,6,7 bit are depend upon the 8th of k1,2nd and 4th
bit of the k2)so hiding of cipher text from the Key is obtained
Practical ciphers
Large data blocks
More S-boxes
More rounds
These help to improve the diffusion and confusion in the cipher
Lucifer –Madryga in Cryptography
In the late 1960s, led by Horst Feistel and later by Walt Tuchman, IBM initiated a
function f is XORed with the input of the previous round S-boxes have 4-bit inputs
and 4-bit outputs A key bit is used to choose the actual S-box from two possible S-
boxes. (Lucifer represents this as a single T-box with 9 bits in and 8 bits out.) no
Lucifer has 16 rounds, 128-bit blocks. the longer key length and lack of published
results.
This is clearly not the case. Lucifer is the subject of several U.S. patents
Madryga
Description of Madryga
Madryga consists of two nested cycles. The outer cycle repeats eight times and consists of an
application of the inner cycle to the plaintext. The point of the random constant is to turn the
The length of this constant = the length of the key and for everyone who wishes to
communicate with one another.
Cryptanalysis of Madryga The algorithm consists only of linear operations (rotations and
XOR), which are slightly modified depending on the data. There is nothing like the strength
of DES ’ s S-boxes. The parity of all the bits of the plaintext and the ciphertext is a constant,
depending only on the key. it doesn ’ t look terribly secure.
NewDES
All operations are on entire bytes. (Actually, NewDES isn’t anything like a new
The plaintext block is divided into eight 1-byte sub-blocks: B0, B1,..., B6, B7. Then the sub-
blocks go through 17 rounds. Each round has eight steps. In each step, one of the sub-blocks
is XOR ed with some key material (there is one exception), substituted with another byte via
an f function, and then XORed with another sub-block to become that sub-block. The 120-bit
key is divided into 15 key sub-blocks: K0, K1,..., K13, K14. The process is easier to
understand visually than to describe. Figure shows the New DES encryption algorithm. The f-
function is derived from the Declaration of Independence. Scott showed that every bit of the
plaintext block affects every bit of the ciphertext block after only 7rounds.
analyzed the f function and found no obvious problems. NewDES has the same
noticed that any change of a full byte, applied to all the key and data bytes, leads to another
GOST
GOST is a block algorithm from the former Soviet Union. “GOST” is an acronym for
“GOsudarstvennyi STandard,” or GOvernment STandard, sort of similar to a FIPS, except
that it can (and does) refer to just about any kind of standard. This standard is number 28147-
89. The Government Committee for Standards of the USSR authorized the standard, whoever
they were.
Description of GOST
GOST is a 64-bit block algorithm with a 256-bit key. GOST also has some additional key
material that will be discussed later. The algorithm iterates a simple encryption algorithm for
32 rounds. To encrypt, first break the text up into a left half, L. and a right half, R.
The subkey for round i is Ki .
A round, i, of GOST is:
L i = Ri – 1
Ri = Li -1 ⊕ f(Ri - 1, Ki )
Function f is straightforward. First, the right half and the ith subkey are added modulo 232.
The result is broken into eight 4-bit chunks, and each chunk becomes the input to a different
S-box. There are eight different S-boxes in GOST; the first 4 bits go into the first S-box, the
second 4 bits go into the second S-box, and so on. Each S-box is a permutation of the
numbers 0 through 15. For example, an S-box might be:
Figure 1 is a single round of GOST. Function f is straightforward. First, the right half and the
ith subkey are added modulo 232.
7, 10, 2, 4, 15, 9, 0, 3, 6, 12, 5, 13, 1, 8, 11
In this case, if the input to the S-box is 0, the output is 7. If the input is 1, the output is 10,
and so on.
All eight S-boxes are different; these are considered additional key material. The S-boxes are
to be kept secret. The outputs of the eight S-boxes are recombined into a 32-bit word, then
the entire word undergoes an 11-bit left circular shift. Finally, the result XORed to the left
half to become the new right half, and the right half becomes the new left half. Do this 32
times and you’re done.
The subkeys are generated simply. The 256-bit key is divided into eight 32-bit blocks: k1,
k2,..., k8.
Each round uses a different subkey, as shown in Table 1. Decryption is the same as
encryption with the order of the ki s reversed. The GOST standard does not discuss how to
generate the S-boxes, only that they are somehow supplied .
This has led to speculation that some Soviet organization would supply good S-boxes to those
organizations it liked and bad S-boxes to those organizations it wished to eavesdrop on. This
may very well be true, but further conversations with a GOST chip manufacturer within
Russia offered another alternative. He generated the S-box permutations himself, using a
random-number generator.
Table 1
Subkey: 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Round: 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Subkey: 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
More recently, a set of S-boxes used in an application for the Central Bank of the Russian
Federation surfaced. These S-boxes are also used in the GOSTone-way hash function.
3-Way
3-Way is a block cipher designed by Joan Daemen. It has a 96-bit block length and
key length, and is designed to be very efficient in hardware.
3-Way is not a Feistel network, but it is an iterated block cipher.
3-Way can have n rounds; Daemen recommends 11.
Description of 3-Way
The algorithm is simple to describe. To encrypt a plaintext block, x:
For i = 0 to n – 1
x = x XOR Ki
x = theta (x)
x = pi – 1 (x)
x = gamma (x)
x = pi – 2 (x)
x = x ⊕Kn
x = theta (x)
The functions are:
— theta(x) is a linear substitution function—basically a bunch of circular shifts and XORs.
— pi–1(x) and pi–2(x) are simple permutations.
— gamma(x) is a nonlinear substitution function. This is the step that gives 3-Way its name;
it is the parallel execution of the substitution step on 3-bit blocks of the input.
Decryption is similar to encryption, except that the bits of the input have to be reversed and
the bits of the output have to be reversed. So far, there has been no successful cryptanalysis
of 3-Way.
Crab
This algorithm was developed by Burt Kaliski and Matt Robshaw of RSA Laboratories.
The idea behind Crab is to use techniques from one-way hash functions to make a fast
encryption algorithm. Hence, Crab is very similar to MD5.Crab has a very large block: 1024
bytes. Since Crab is presented more as a research contribution than a real algorithm, no
definitive key-generation routines are presented.
The authors suggest a method that could turn an 80-bit key into three requisite subkeys,
although the algorithm could easily accept variable-length keys.
The S-array of 2048 32-bit words could be generated in a similar manner, either from
the same 80- bit key or from another key.
Crab was proposed as a testbed of new ideas and not as a working algorithm.
It uses many of the same techniques as MD5. Biham has argued that a very large
block size makes an algorithm easier to cryptanalyze.
On the other hand, Crab may make efficient use of a very large key. In such a case,
“easier to cryptanalyze” might not mean much.
Rivest Cipher5 (RC5)
RC5 is a block cipher with a variety of parameters:
block size, key size, and number of rounds.
It was invented by Ron Rivest and analyzed by RSA Laboratories.
A better idea, proposed by Tuchman in [1551], operates on a block three times with two keys:
with the first key, then with the second key, and finally with the first key again. He suggested
that the sender first encrypt with the first key, then decrypt with the second key, and finally
encrypt with the first key. The receiver decrypts with the first key, then encrypts with the
second key, and finally decrypts with the first key.
C = EK1(DK2(EK1(P))) P = DK1(EK2(DK1(C))
Triple Encryption with Three Keys
If you are going to use triple encryption, I recommend three different keys. The key length is
longer, but key storage is usually not a problem. Bits are cheap.
C = EK3(DK2(EK1(P))) P = DK1(EK2(DK3(C)))
The best time-memory trade-off attack takes 22n steps and requires 2n blocks of memory; it’s
a meet-in-the-middle attack [1075]. Triple encryption, with three independent keys, is as
secure as one might naïvely expect double encryption to be.
There is a secure way of using triple encryption with two keys that prevents the previous
attack, called Triple Encryption with Minimum Key (TEMK) [858]. The trick is to derive
three keys from two: X1 and X2:
K1 = EX1(DX2(EX1(T1)))
K2 = EX1(DX2(EX1(T2)))
K3 = EX1(DX2(EX1(T3))) T1, T2, and T3 are constants, which do not have to be secret.
This is a special construction that guarantees that for any particular pair of keys, the best
attack is a known-plaintext attack. Triple-Encryption Modes It’s not enough to just specify
triple encryption; there are several ways to do it. The decision of which to use affects both
security and efficiency
This method was designed by IBM for their Commercial Data Masking Facility or CDMF to
shrink a 56-bit DES key to a 40-bit key suitable for export.
It assumes that the original DES key includes the parity bits.
(1) Zero the parity bits: bits 8, 16, 24, 32, 40, 48, 56, 64.
(2) Encrypt the output of step (1) with DES and the key 0xc408b0540ba1e0ae,
and XOR the result with the output of step (1).
(3) Take the output of step (2) and zero the following bits: 1, 2, 3, 4, 8, 16, 17, 18, 19, 20, 24,
32, 33, 34, 35, 36, 40, 48, 49, 50, 51, 52, 56, 64.
(4) Encrypt the output of step (3) with DES and the following key: 0xef2c041ce6382fe6.
This key is then used for message encryption.
Remember that this method shortens the key length, and thereby weakens the algorithm.
Whitening
Whitening is the name given to the technique of XORing some key material with the input to
a block algorithm, and XORing some other key material with the output.
This was first done in the DESX variant developed by RSA Data Security, Inc., and then
(presumably independently) in Khufu and Khafre. (Rivest named this technique; it’s a
nonstandard usage of the word.)
The idea is to prevent a cryptanalyst from obtaining a plaintext/ciphertext pair for the
underlying algorithm.
The technique forces a cryptanalyst to guess not only the algorithm key, but also one of the
whitening values.
Since there is an XOR both before and after the block algorithm, this technique is not
susceptible to a meet-in-the-middle attack.
C = K3 ⊕ EK2(P ⊕ K1)
P = K1 ⊕ DK2(C ⊕ K3)
If K1 = K3, then a brute-force attack requires 2n + m/p operations, where n is the key size, m
is the block size, and p is the number of known plaintexts.
store data, carry out on-card functions, like encryption and mutual
This article will discuss what smart cards are, the different types of smart cards, how
A smart card needs a card reader to work correctly; it cannot function in isolation.
Smart cards contain a chip consisting of a contact pad, which makes electronic
1. First, the smart card makes contact with the card reader, either directly or
indirectly.
2. The smart card reader receives the information stored on the chip.
The chip exchanges data with card readers through a serial interface either through
direct physical contact or via short-range wireless connectivity standards like RFID
or NFC.AdvantagesofSmartCards
2. Larger memory
3. Prevents fraud
4. Reliability
5. Information Security
6. Privacy
7. Ease of use
personal information. The common uses of smart cards in various industries are as
follows:
Banking
One of the most common uses of smart cards is payment cards like credit cards
and debit cards. Most of these cards are "chip and PIN" cards that require a PIN,
while others are "chip and signature" cards that require customer signature for
verification. In addition, these cards can be used as "electronic wallets" where you
can fill the chip with funds for small purchases like taxi rides, groceries, etc. Smart
cards provide the ideal solution for e-commerce transactions as they offer better
Healthcare
Rapidly increasing healthcare data poses a challenge to maintain the efficiency of
patient care - with some healthcare systems still relying heavily on paper-based
data collection and transference. Smart cards address these challenges by
Embedded smart cards provide safe and secure delivery of medical equipment like
dialysis machines, blood analyzers, and laser eye surgery equipment. They also
help reduce healthcare fraud, facilitate compliance with government initiatives like
Telecommunication
Subscriber Identity Molecules (SIM) cards used in mobile phones are reduced-size
smart cards. The SIM card utilizes a unique identifier to manage the privileges of
each subscriber to identify and bill them correctly. The security provided by SIM
Information Technology
Smart cards can be used as a security token and store certificates for secure web
make information readily available while maintaining the privacy of individuals and
Educational Institutes
Many schools and colleges also use smart cards for student attendance, tracking
This technology also helps reduce the admin burden on staff, free up teaching time,
Mobile Device Security is a combination of strategies and tools that secure mobile
devices against security threats. Although mobile security components vary based
on each company’s needs, mobile security always involves authenticating users and
Every day, businesses are targeted by cyber criminals looking for sensitive data
Cyber criminals target mobile devices because users don’t always secure their
Endpoint security:
As organizations embrace flexible and mobile workforces, they must deploy
networks that allow remote access. Endpoint security solutions protect corporations
by monitoring the files and processes on every mobile device that accesses a
identify threats early on. When they find malicious behavior, endpoint solutions
quickly alert security teams, so threats are removed before they can do any
damage.
VPN:
A virtual private network, or VPN, is an encrypted connection over the Internet from
a device to a network. The encrypted connection helps ensure that sensitive data is
percent of attacks are distinct to the organization, businesses need cloud security
that identifies previously used attacks before they are launched. Cloud security can
operate at the DNS and IP layers to defend against phishing, malware, and
ransomware earlier. By integrating security with the cloud, you can identify an attack
Email security:
Email is both the most important business communication tool and the leading
attack vector for security breaches. In fact, according to the latest Cisco Midyear
Cybersecurity Report, email is the primary tool for attackers spreading ransomware
and other malware. Proper email security includes advanced threat protection
capabilities that detect, block, and remediate threats faster; prevent data loss; and
cloud. You will need a cloud access security broker (CASB), a tool that functions as
itself are the first and most basic crypto layer. For SDA, the smart card contains
application data signed by the private key of the issuer RSA key pair. When a card
with an SDA application is inserted into a terminal, the card sends these signed
static application data, the CA index, and the issuer certificate to the terminal (POS /
ATM).
The terminal verifies the issuer certificate and digital signature by comparing it with
the actual application data on the card. In short, an RSA signature assures that the
data is original and created by the authorized issuer.
transaction. This can be improved with a DDA card with variable and transaction-
specific data and has its own unique RSA key that sends it to the terminal.
When a card with DA application is inserted into a terminal, the card carries the
signed dynamic application data, CA index, issuer certificate, and card certificate to
the terminal (POS / ATM). The terminal then verifies the issuer certificate, smart card
CDA closes the gap invalidation with DDA. With CDA, the card digitally signsall-
services that provide users’ security online. An SPS is a type of payment processing
that ensures a user’s financial and personal information is protected from fraud and
Digital payments are changing the way we do business across the world. E-
commerce technology is furthering the ability of businesses to receive and accept
More people pay with a credit card, debit card, or online and mobile apps, over
cash these days, making secure payment systems a must for all businesses.
Nakamoto,(https://coinsutra.com/satoshi-nakamoto-facts/#:~:text=His%20full%20
name%2C%20as%20reported,laid%20off%20by%20the%20government.)
Bitcoin is “a purely peer-to-peer version of electronic cash that would allow online
payments to be sent directly from one party to another without going through a
financial institution”.
manner of operation of the Bitcoin ecosystem and the extent of usage of the same
in India.
How Does Bitcoin Work?
Bitcoin achieves elimination of intermediaries with the help of its underlying
(example, a bank). Both the mechanisms, whether it be physical cash (with the
intermediary (in the later case, a bank or another financial institution). When
intermediaries are involved, there are transaction costs. How the blockchain
intermediaries bring to the table with cryptographic proof by the use of CPU
Anyone can create a Bitcoin wallet for free by downloading the Bitcoin program.
The public key is like an address or an account number via which any person can
receive Bitcoins.
A private key is like a digital signature via which a person can send Bitcoins. The
name suggests that private keys should be only held and known by the owner and
public keys can be shared with anyone for receiving Bitcoins. That is where you
would have heard in the news about Bitcoins being lost either due to a private key
Owners of Bitcoin addresses are not explicitly identified, but all transactions on the
the recently announced Budget 2022 vide Finance Bill 2022 proposes to introduce a
framework for taxation of virtual digital assets. Once, the Finance Bill is ratified into
an Act, the said framework would be made effective for Financial Year 2022-2023
onwards.
The taxation as per the Budget 2022 proposal would be taxation of gains at the rate
The Government has proposed to introduce a new section 115BBH in the Income
Tax Act, 1961 (‘the IT Act’) for taxation of income from transfer of virtual digital
assets. In accordance with the said section, where the total income includes any
income from transfer of any virtual digital assets, the said income would be
subjected to a tax rate of 30% and such rate would be enhanced by an applicable
Pohlig–Hellman Algorithm
The Pohlig–Hellman algorithm, sometimes credited as the Silver–Pohlig–Hellman algorithm
The algorithm was introduced by Roland Silver, but first published by Stephen
Pohlig and Martin Hellman . (https://risencrypto.github.io/PohligHellman/ )
The PH algorithm allows your solve the DLP in the smaller subgroups of order
The Algorithm
Let g be a generator in GF(p)
y ≡ gx mod p
y,p & g are known. The discrete log problem here is to find x
Order of GF(p)=p−1= pn11.pn22.pn33…
Let’s take the prime power factors one by one.
Note: For e.g. if p1=2, then we have to expand x in base 2 (i.e. do a binary
expansion). If x is 13, then in binary (base 2), we can write it as 1101.
x=13=1101=1.2 0+0.21+1.22+1.23
If we are solving for mod2n, then the max value of x can only be 2n−1.
The number 2n in binary representation needs n+1 bits. So the number 2n−1 will need
n bits. Hence when we expand x in base 2, we will have n co-efficients from 0 to
n−1.
Elliptic-curve
cryptography/cryptosystem
Elliptic-curve cryptography (ECC) is an approach to public-key cryptography
based on the algebraic structure of elliptic curves over finite fields.
ECC allows smaller keys compared to non-EC cryptography to provide equivalent
security.The use of elliptic curves in cryptography was suggested independently by
NealKoblitz and Victor S. Miller in 1985.
Elliptic curve cryptography algorithms entered wide use in 2004 to 2005.
In general, an elliptic curve looks like as shown above. Elliptic curves can intersect
almost 3 points when a straight line is drawn intersecting the curve. As we can see,
the elliptic curve is symmetric about the x-axis. This property plays a key role in the
algorithm.
Public key cryptography systems, like ECC, use a mathematical process to merge
two distinct keys and then use the output to encrypt and decrypt data. One is a
public key that is known to anyone, and the other is a private key that is only known
by the sender and receiver of the data.
ECC generates keys through the properties of an elliptic curve equation instead of
the traditional method of generation as the product of large prime numbers. From a
cryptographic perspective, the points along the graph can be formulated using the
following equation:
Where ‘a’ is the co-efficient of x and ‘b’ is the constant of the equation.
ECC is like most other public key encryption methods, such as the RSA algorithm
and Diffie-Hellman.
Each of these cryptography mechanisms uses the concept of a one-way function.
This means that a mathematical equation with a public and private key can be
used to easily get from point A to point B.
But, without knowing the private key and depending on the key size used, getting
from B to A is difficult, if not impossible, to achieve.
ECC was first developed by Certicom, a mobile e-business security provider, and
was then licensed by Hifn, a manufacturer of integrated circuitry and network
security products. Vendors, including 3Com, Cylink Corp., Motorola, Pitney Bowes,
Siemens, TRW Inc. (acquired by Northrop Grumman) and Verifone, supported ECC
in their products.
McEliece cryptosystem
https://en.wikipedia.org/wiki/McEliece_cryptosystem