Professional Documents
Culture Documents
Public-key Encryption
1.One algorithm is used for encryption and decryption with a pair of keys, one for encryption
and one for decryption.
2.The sender and receiver must each have one of the matched pair of keys (not the same one)
key.
3.One of the two keys must be kept secret.
4.Knowledge of the algorithm plus one of the keys plus samples of ciphertext must be
insufficient to determine the key.
5.Speed of encryption decryption is slower
6.No problem at all for key agreement / exchange.
7.It can be used for encryption decryption (confidentiality) as well as for digital signatures
integrity and non-repudiation checks).
Step 3 :Each side keeps the X value private and makes the Y value available publicly to the
other side.
Step 4 :User A computes the key as K = (YB)XA mod q
User B computes the key as K=(YA)XB mod q
Step 5: These two calculations produce identical results:
K=(YB)^XA mod q
= (a^XB mod q) ^Xa mod q
= (a^XB) ^XA mod q by the rules of modular arithmetic
= a^XBXA mod q
= (a^XA) XB mod q
= (a ^Xa mod q) ^XB mod q
= (Ya) ^Xb mod q
This result is that the two sides have exchanged a secret value
Limitation of the algorithm:
The algorithm can fail if a hacker makes what is called man in the middle attack. This way,
even though the two parties will they are talking to each other. Practically, they are in turn,
communicating with the hacker as he places himself in them and switches back and forth the
communication.
Hash function:
A cryptographic hash function is a type of security mechanism that produces a hash value,
message digest or checksum value for a specific data object.
Cryptographic hash functions are implemented in information security to the integrity of data,
authentication control and other security mechanisms.
A cryptographic hash function is a one-way computational mathematical operation that takes
a stream of data and returns a fix sized bit string known as cryptographic hash value. A hash
value is also called as message digest, a digital fingerprint, digest or a checksum.
This value is unique, any small modification to the file will change it.
Cryptographic hash functions work by generating the checksum value of a data object. If the
data is intentionally or unintentionally modified, the checksum value is changed. Thus, a data
object integrity may be evaluated by comparing and verifying previous and current
checksums.
Hashing functions are one of the most commonly used encryption methods. A hash function
maps a variable length into fixed length hash value or message digest.
A hash is a special function that performs one-way encryption, meaning that once the
algorithm is processed, there is no feasible way to take the cipher text and retrieve the plain
text that was used
to generate it.
The hash code is a function of all bits of the message and provides an error detection
capability.
A change in any bit or bits results in a change of hash value.
A hash function accepts a variable size message M as input and produces a fixed size output,
referred to as a hash code H (m). The hash code is also referred to as a message digest or hash
value.
MD5
MD5 message digest algorithm is a widely used cryptographic hash function producing a
128 bit (16-byte) hash value, typically expressed in text format as a 32 digit hexadecimal
number.
The MDS message digest algorithm was developed by Ronald Rivest at MIT
Until the last few years, when both brute-force and cryptanalytic concerns have arisen, MDS
was the most widely used secure hash algorithm.
Algorithm:
The algorithm takes as input a message of arbitrary length and produces as output a 128-bit
message digest. The input is processed in 512-bit blocks, The processing consists of the
following steps:
Step 1 : Append padding bits:
(i)The message is padded so that its length in bits is congruent to 448 modulo 512 (length =
448 mod 512). That is, the length of the padded message is 64 bits less than an integer
multiple of 512 bits.
(ii)Padding is always added, even if the message is already of the desired length.
For example, if the message is 448 bits long, it is padded by 512 bits to a length of 960 bits.
(iii)Thus, the number of padding bits is in the range of 1 to 512. The padding consists of a
single 1-bit followed by the necessary number of 0-bits.
Step 2: Append length:
(i)A 64-bit representation of the length in bits of the original message (before the padding) is
appended to the result of step 1 (leastsignificant byte first).
(ii)If the original length is greater than 264, then only the low-order 64 bits of the length are
used. Thus, field contains the length of the original message, modulo 264. The outcome of
the first two steps yields a message that is an integer multiple of 512 bits in length.
(iii)In expanded message is represented as the sequence of 512 bit blocks Yo, Y, Y.Y., so that
the total length of the expanded message is L x 512 bits. Equivalently, the result is a multiple
of 16 32-bit words. Let M[0 1]...N - denote the words of the resulting message, with N an
integer multiple of 16. Thus, N Lx 16.
Step 3: Initialize MD buffer :
(i)A 128-bit buffer is used to hold intermediate and final results of the hash function. The
buffer can be represented as four 32-bit registers (A, B, C, D).
(ii)These registers are initialized to the following 32-bit integers(hexadecimal values):
A=67452301
B = EFCDAB89
C=98BADCFE
D=10325476
(iii)These values are stored in little-endian format, which is the least significant byte of a
word in the low-address byte position. As 32-bit nos the initialization values (in hexadecimal)
appears as follows:
Word A: 01 23 45 67 Word B: 89 AB CD EF Word C: FE DC BA 98 Word D: 76543210
Step 4: Process message in 512-bit (16-word) blocks :
(i)The heart of the algorithm is a compression algorithm that consists of four "rounds" of
processing, this module is labeled HMDS.
The four rounds have the similar structure, but each uses a different primitive logical
function, referred to as F, G, H, and I in the specification.
Each round takes as input the current 512-bit block being processed(Yq) and the 28-bit buffer
value ABCD and updates the contents of the buffer
Each round also makes use of one-fourth of a 64-element table T[]1 64 ... , constructed from
the sine function. The ith clement of T,denoted T[i], has the value equal to the integer part of
232 x abs i
(sin()), where I is in radians.
Step 5: Output:
After all L 512-bit blocks have been processed, the output from the Lth stage is the 160-bit
message digest.
CV0= IV
CVq +1 = SUM32(CV, RF1[Yq, RFh[Yq, RFg, [Y, RF,[Yq,CVq]]]])
MD=CVl
Where,
IV - initial value of the ABCD buffer, defined in step 3
Yq-the oath 512-bit block of the message
L- the number of blocks in the message (including padding and length fields)
CV chaining variable processed with the qth block of the message
RFx- round function using primitive logic function x
MD-final message digest value
SUM32- addition modulo 232 performed separately on each word of the pair of inputs.
The message digest produce as output is A,B,C,D.
That is output begins with the low order byte of A, and end with the highonder byte of D.
The MDS algorithm is simple to implement, and provides a fingerprint or message digest of a
message of arbitrary length
The difficulty or coming up with two messages with the same message digest is on the order
of 2^64 operations
MD-S consists of 64 of these operations, grouped in four rounds of 16 operations. F is a
nonlinear function: one function is used in each round. Mi denotes a 32-bit block of the
message input, and Ki
denotes a 32-bit constant different for cache operations denotes a left bit rotation by s places :
s varies for each operation denotes addition modulo 2^32.
Kerberos
1. Kerberos is a computer network authentication protocol, which allows nodes
communicating over a non-secure network to prove their identity to one another in a secure
manner. Its designers aimed primarily at a client server model, and it provides mutual
authentication-both the user and the server verify each other's identity.
2. Kerberos protocol messages are protected against eavesdropping and replay attacks,
Kerberos builds on symmetric key cryptography and requires a trusted third party, and
optionally may use public key cryptography by utilizing asymmetric key cryptography during
certain phases of authentication.
3. In a Kerberos System, there is a designated site on the network, called the Kerberos
server, which performs centralized key management and administrative functions
4. The server maintains a database containing the secret keys of all users, generates
session keys whenever two users wish to communicate securely, and authenticates the
identity of a user who requests certain network services.
5. The Kerberos protocol uses strong cryptography so that a client can prove its identity
to a server (and vice versa) across an insecure network connection. After a client and server
has used Kerberos to prove their identity, they can also encrypt all of their communications to
assure privacy and data integrity as they go about their business.
6. Kerberos is freely available from MIT, under copyright permissions very similar those
used for the BSD operating system and the X window System.
7. In summary, Kerberos is a solution to our network security problems. It provides the
tools of authentication and strong cryptography over the network to help us secure our
information systems across our entire enterprise.
8. The process is as follows. As we read through this process, keep in mind that
Kerberos uses conventional (symmetric) encryption rather than publickey (asymmetric)
encryption. In other words, the same key is used at both ends of cach exchange :
The client wants to access a service on server A. The client sends the KDC a request for
access to the service on Server A. (In some cases, the client has already undergone an
authentication process and received a separate session key for encrypting communication
with the ticket granting service on the KDC).
The KDC performs the following steps:
(i)The KDC generates a session key that will be used to encrypt communication between the
client and server A.
(ii)The KDC creates a session ticket. The session ticket includes a copy of the session key
generated in step 2(a). The ticket also contains timestamp information and information about
the client that is requesting access, such as client security settings.
The KDC encrypts the session ticket using Server A's long term key.
The KDC bundles the KDC bundles the encrypted session ticket, a copy of the session key,
and other response parameters for the client and encrypts the whole package using the client's
key. The response is then sent to the client.
(iii)The client receives the response from the KDC and decrypts it. The client obtains the
session key necessary for communicating with server A. Also included in the package is the
season ticket, which is
encrypted with the server's long term key. The client cannot read the session ticket, but it
knows it must send the ticket to the server in order to be authenticated. The client creates an
authenticator (astring of authentication parameters) and encrypts it with the session key
PKIX architecture
Public-key infrastructure is defined as the set of hardware, software, people, policies and
procedures needed to create, manage, store, distribute and revoke digital certificates based on
asymmetric cryptography
These elements are as follows:
• End entity: A generic term used to denote end users, devices (for eg, servers, routers),
or any other entity that can be identified in the subject field of a public key certificate. End
entities typically consume and/or support PKI-related services.
• Certification authority (CA): The issuer of certificates and (usually) certificate
revocation lists (CRLS). It may also support a variety of administrative functions, although
these are often delegated to one or more Registration Authorities.
• Registration authority (RA): An optional component that can assume a number of
administrative functions from the CA. The RA is often associated with the end entity
registration process but can assist in a number of other areas as well.
• CRL issuer : An optional component that a CA can delegate to publish CRLs.
• Repository: A generic term used to denote any method for storing certificates and
CRLs so that they can be retrieved by end entities.