0% found this document useful (0 votes)
251 views3 pages

Docx

The document discusses approaches to message authentication including message encryption, message authentication codes, and hash functions. It describes how message authentication codes work by cryptographically combining a message with a secret key. It also briefly explains three schemes for message authentication that involve hashing a message and either symmetric or public-key encryption of the hash value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
251 views3 pages

Docx

The document discusses approaches to message authentication including message encryption, message authentication codes, and hash functions. It describes how message authentication codes work by cryptographically combining a message with a secret key. It also briefly explains three schemes for message authentication that involve hashing a message and either symmetric or public-key encryption of the hash value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. List three approaches to message authentication.

 Message encryption
 Message authentication code
 Hash function

2. What is a message authentication code?


An authentication that is cryptographic function of both the data to be authenticated and a secret key.

3. Briefly describe the three schemes illustrated the figure

(a) A hash code is computed from the source message, encrypted using symmetric encryption and a secret
key, and appended to the message. At the receiver, the same hash code is computed. The incoming code is
decrypted using the same key and compared with the computed hash code.

(b) This is the same procedure as in (a) except that public-key encryption is used; the sender encrypts the
hash code with the sender's private key, and the receiver decrypts the hash code with the sender's public
key.

(c) A secret value is appended to a message and then a hash code is calculated using the message plus
secret value as input. Then the message (without the secret value) and the hash code are transmitted. The
receiver appends the same secret value to the message and computes the hash value over the message plus
secret value. This is then compared to the received hash code.

Q.4 What properties must a hash function have to be useful for message authentication?
In cryptography, a keyed-hash message authentication code (HMAC) is a specific type of message
authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. It may
be used to simultaneously verify both the data integrity and the authentication of a message, as with any
MAC. Any cryptographic hash function, such as MD5 or SHA-1, may be used in the calculation of an
HMAC; the resulting MAC algorithm is termed HMAC-MD5 or HMAC-SHA1 accordingly.

Q.5 In the context of a hash function, what is a compression function?

The compression function is the fundamental module, or basic building block, of a hash function. The hash
function consists of iterated application of the compression function

Q.6 What are the principal ingredients of a public-key cryptosystem?


Plaintext: This is the readable message or data that is fed into the algorithm as input.

 Encryption algorithm: The encryption algorithm performs various transformations on the plaintext.
 Public and private keys: This is a pair of keys that have been selected so that if one is used for
encryption, the other is used for decryption. The exact transformations performed by the algorithm
depend on the public or private key that is provided as input.

Asymmetric algorithms rely on one key for encryption and a different but related key for decryption. These
algorithms have the following important characteristic:

 It is computationally infeasible to determine the decryption key given only knowledge of the
cryptographic algorithm and the encryption key.
 Either of the two related keys can be used for encryption, with the other used for decryption.

Q.7 List and briefly define three uses of a public-key cryptosystem.


Encryption/decryption: The sender encrypts a message with the recipient's public key. Digital
signature: The sender "signs" a message with its private key. Signing is achieved by a cryptographic
algorithm applied to the message or to a small block of data that is a function of the message. Key
exchange: Two sides cooperate to exchange a session key. Several different approaches are possible,
involving the private key(s) of one or both parties.

Q.8 What is the difference between a private and a secret key?


The key used in conventional encryption is typically referred to as a Secret Key. The two keys used for
public-key encryption are referred to as the public key and private key.

Q.9 What is a digital signature?


A digital signature is an authentication mechanism that enables the creator of a message to attach a code
that acts as a signature. Taking the hash of the message and encrypting the message with the creator’s
private key form the signature. The signature guarantees the sources and integrity of the message.
Students should perform the steps in this task individually.
1. State the value of the padding field in SHA-512 if the length of the message is
a) 1919 bits
1. Calculate the size of the data in the last block: 1919mod1024=8951919mod1024=895
2. Add the size of length field(128 bit) to the last block size(895 bit), 128+895=1023128+895=1023
3. See that we have to add 1 bit as padding to the last block to became 1024 bit
The answer will be:

 size of padding field = 1 bit


 data of padding field = 1
data of length field = 1919 as an unsigned 128-bit big
endian integer 0x0000000000000000000000000000077F

b) 1920 bits
 size of padding field = 1 bit
 data of padding field = 1
data of length field = 1920 as an unsigned 128-bit big
endian integer 0x0000000F0000000000000000000007AF

c) 1921 bits

 size of padding field = 1 bit


 data of padding field = 1
data of length field = 1921 as an unsigned 128-bit big
endian integer 0x00000000000000000000000000000FAF

4. Show the result of encrypting M = 4 using the public key (e; n) = (3; 77) in the RSA cryptosystem.

M=4 Public key (e,n)=(3,77) E=3, n=77

Cipher text C = M mod n

C= 43mod 77 = 64 mod 77 = 64.

4. What is the plaintext for the following ciphertext, which was encrypted using a simple substitution
cipher: CJBT COZ NPON ZJV FTTK TWRTUYTFGT NJ DTN O XJL. Y COZ ZJV CPJVIK DTN O XJL
MYUCN.

Full Alphabet mapping: O = A, L = B, G = C, K = D, T = E, M = F, D = G, P =H, Y = I, X = J, E = K, I =


L, B = M, F = N, J = O, R = P, H = Q, U = R, C = S, N= T, V = U, S = V, Q = W, W = X, Z = Y, A = Z.

You might also like