PowerPoint Presentation€¦ · SHA(Secure Hashing Algorithm) • Secure Hashing Algorithms, also known as SHA, are a family of cryptographic functions designed to keep data secured.

Post on 06-Aug-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

HMAC(Hash-based message authentication codes)

In cryptography, an HMAC is a specific type of message authentication code 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

CMAC

In cryptography, CMAC (Cipher-

based Message Authentication Code)

is a block cipher-based message

authentication code algorithm. It

may be used to provide assurance of

the authenticity and, hence, the

integrity of binary data

SHA(Secure Hashing Algorithm)

• Secure Hashing Algorithms, also known as SHA, are a family of cryptographic functions designed to keep data secured.

• It works by transforming the data using a hash function:

• an algorithm that consists of bitwise operations, modular additions, and compression functions.

• The hash function then produces a fixed size string that looks nothing like the original.

• These algorithms are designed to be one-way functions, meaning that once they’re transformed into their respective hash values, it’s virtually impossible to transform them back into the original data

SHA-512

SHA-512 Compression Function

• heart of the algorithm

• processing message in 1024-bit blocks

• consists of 80 rounds

– updating a 512-bit buffer

– using a 64-bit value Wt derived from the current message block

– and a round constant based on cube root of first 80 prime numbers

SHA-512

• Step 1: Append padding bits

• Step 2: Append length

• Step 3: Initialize hash buffer

• Step 4: Process the message in 1024-bit (128-word) blocks, which forms the heart of the algorithm

• Step 5: Output the final state value as the resulting hash

11/8/2009 Dr. Monther Aldwairi 28

Function Elements • Ch(e,f,g) = (e AND f) XOR (NOT e AND g)

• Maj(a,b,c) = (a AND b) XOR (a AND c) XOR (b AND c)

• ∑(a) = ROTR(a,28) XOR ROTR(a,34) XOR ROTR(a,39)

• ∑(e) = ROTR(e,14) XOR ROTR(e,18) XOR ROTR(e,41)

• + = addition modulo 2^64

– Kt = a 64-bit additive constant

– Wt = a 64-bit word derived from the current 512-bit input block.

11/8/2009 Dr. Monther Aldwairi 32

MD5(MESSAGE DIGEST ALGORITHM)

• MD5 algorithm was developed by Professor Ronald L. Rivest in 1991.

• “MD5 message-digest algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input …

• The MD5 algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.”

Implementation Steps • Step1 Append padding bits The input message is "padded" (extended) so that its length

(in bits) equals to 448 mod 512. Padding is always performed, even if the length of the message is already 448 mod 512.

• Step2. Append length A 64-bit representation of the length of the message is

appended to the result of step1.

• Step3. Initialize MD buffer A four-word buffer (A, B, C, D) is used to compute the

message digest. Each of A, B, C, D is a 32-bit register.

• Step4. Process message in 16-word blocks Four functions will be defined such that each function takes

an input of three 32-bit words and produces a 32-bit word output.

Step5 : Produces the outcput :

Requirements for a Digital Signature

top related