SlideShare a Scribd company logo
MD5
1
Hash functions MD5 and RIPEMD 160
Instructor: TS Trương Tuấn Anh.
HV: Chu Xuân Tình - 1870583
2
• Introduction
• MD5 Algorithm Structure
• RIPEMD 160
• Summary
Hash functions MD5 and RIPEMD
3
Introduction:
Ø 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
Ø Application:
ü Integrity checking: User compare the checksum of the
downloaded file
ü Used to store a one-way hash of a password.
Hash functions MD5
Hash functions MD5
4
Hash functions MD5
5
MD5 Message Digest Algorithm
6
L ¥ 512bits = N ¥ 32bits
Message
Message length
(K mod 2 64)
• • • • • •
512bits 512bits 512bits 512bits
Y0 Y1 Yq YL–1
128
512
HMD5IV
CV1 CVq CVL–1
128
512
128
512
128
512
128-bit
digest
Figure 12.1 Message Digest Generation Using MD5
100...0
Padding
(1 to 512bits)
K bits
HMD5 HMD5 HMD5
MD5 Message Digest Algorithm
7
qStep 1: append padding bits
Ø The message is padded so that its length in bits
is congruent to 448 mod 512 (length ≡ 448 mod
512)
Ø Padding is always added (1 to 512 bits)
Ø The padding pattern is 100...0
MD5 Message Digest Algorithm
8
q Step 2: append length
Ø A 64-bit length in bits of the original message is
appended
Ø If the original length is greater than 2^64, the length is
modulo 2^64 ( 2 pow 64)
- The expanded message is L×512 bits: Y0, Y1, ..., YL-1
- A total of L×16 32-bit words: M[0...N-1], N = L×16 (32*
16=512)
MD5 Message Digest Algorithm
9
q Step 3: initialize MD buffer
Ø A 128-bit buffer is used to hold intermediate and final results of
the hash function
Ø The buffer is represented as 4 32-bit registers (A, B, C, D)
initialized to the following integers (hexadecimal values):
A = 67452301
B = EFCDAB89
C = 98BADCFE
D = 10325476
Ø The values are stored in little-ending order, i.e., the least
significant byte of a word in the low-address byte position:
word A = 01 23 45 67
word B = 89 AB CD EF
word C = FE DC BA 98
word D = 76 54 32 10
MD5 Message Digest Algorithm
10
q Step 4: process message in 512-bit (16-word) blocks
Ø A compression function MD5 consists of 4 “rounds” of
processing
ü In put 512-bit block Yq and 128-bit buffer value CVq represented
by ABCD
üOutput 128-bit chaining variable CVq+1
Ø For each round operation
ü Input –Yq and ABCD
ü Output – updated ABCD
ü Each round makes use of 1/4 of a 64-element table T[1...64] –
T[i] is the integer part of 2^32 × abs[sin(i)], where i is in radian
ü Provides a “randomized” set of 32-bit patterns and thus
eliminate the regularities in the input data
Ø The output of the last round is added to the input of the first
round (CVq) to produce CVq+1
MD5 Message Digest Algorithm
11
MD5 Message Digest Algorithm
12
q Step 5: output
Ø The output from the L-th stage is the 128-bit message digest
Ø Summary of the MD5:
# var int digest (MD):= h0 append h1 append h2 append h3
# Convert the buffers to little-endian.
MD5 Message Digest Algorithm
13
q MD5 Compression Function
Ø Each round consists of 16 steps operating on the buffer ABCD
with each step of the form:
a ← b + ((a + g(b, c, d) + X[k] + T[I]) <<< s)
Where:
a,b,c,d = the four words of the buffer
g = one of the primitive functions F, G, H, I
<<<s = circular left shift (rotation) of the X[k] 32-bit
argument by s bits
X[k] = M[q×16 + k] = the k-th 32-bit word in
(Word 32-bit thứ k của khối dữ liệu 512 bits.k=1..15 )
T[i] = the q-th 512-bit block of the message (Table T)
+ = addition modulo 2^32 (pow)
MD5 Message Digest Algorithm
14
MD5 Compression Function
MD5 – Step 4
15
MD5 – Step 4
16
MD5 Message Digest Algorithm
17
q MD5 Compression Function
Ø Primitive functions F,G,H,I:
ü Input – 3 32-bit words
ü Output – a 32-bit word
ü Each function performs a set of bitwise logical operations
MD5 Message Digest Algorithm
18
q MD5 Compression Function
Ø Permutations on the 32-bit words X[0..15] vary from round to
round:
Ø Note that for each step, only one of the four bytes of the ABCD
buffer is updated
Ø Four different circular left shift amounts are used each round and
different from round to round:
round 1: 7, 12, 17, 22
round 2: 5, 9, 14, 20
round 3: 4, 11, 16, 23
round 4: 6, 10, 15, 21
=> Difficult to generate collisions (two blocks produce the same
output)
RIPEMD-160
qDevelopment
ü RIPEMD-160 was developed under the European RACE
Integrity Primitives Evaluation (RIPE) project
ü Originally developed a 128-bit version of RIPEM
ü H. Dobbertin found attacks on two rounds of RIPEMD and
later on MD4 and MD5
ü Upgraded RIPEMD: RIPEMD-160
qRIPEMD-160 Logic
ü Input – a message of arbitrary length, processed in 512-
bit block
ü Output – 160-bit message digest
19
RIPEMD-160
vRIPEMD-160 Logic
q Step 1: append padding bits
Ø The message is padded so that its length is congruent to
448 mod 512 (length ≡ 448 mod 512)
Ø Padding is always added (1 to 512 bits)
Ø The padding pattern is 100...0
q Step 2: append length
Ø A 64-bit length in bits of the original message is appended
Ø If the original length is greater than 2^64, the length is
modulo 2^64
q Step 3: initialize MD buffer
Ø A 160-bit buffer is used to hold intermediate and final
results of the hash function
20
RIPEMD-160 (cont..)
vRIPEMD-160 Logic
q Step 3: initialize MD buffer
ü The buffer is represented as 5 32-bit registers (A, B, C, D, E)
initialized to the following integers (hexadecimal values):
A = 67452301
B = EFCDAB89
C = 98BADCFE
D = 10325476
E = C3D2E1F0
ü The values are stored in little-ending order, i.e., the least
significant byte of a word in the low-address byte position:
word A = 01 23 45 67
word B = 89 AB CD EF
word C = FE DC BA 98
word D = 76 54 32 10
word E = F0 E1 D2 C3 21
RIPEMD-160 (cont..)
q Step 4: process message in 512-bit (16-word) blocks
Ø A module with 10 rounds of processing of 16 steps each
Ø The 10 rounds are arranged in 2 parallel lines of 5 rounds
each
ü Input – 512-bit block Yq, 160-bit buffer value CVq (ABCDE or
A’B’C’D’E’)
ü Output – 160-bit chaining variable CVq+1 (updated ABCDE)
ü Makes use of additive constant Kj
22
RIPEMD-160 (cont..)
§ Step 4: process message in 512-bit (16-word) blocks
23
RIPEMD-160 (cont..)
q Step 4: cont…
Ø The output of the last round is added to the input of the first
round (CVq) to produce CVq+1 in the following fashion:
ü CVq+1(0) = CVq(1) + C + D’
ü CVq+1(1) = CVq(2) + D + E’
ü CVq+1(2) = CVq(3) + E + A’
ü CVq+1(3) = CVq(4) + A + B’
ü CVq+1(4) = CVq(0) + B + C’
q Step 5: output
Ø The output from the L-th stage is the 160-bit message digest
24
RIPEMD-160 (cont..)
qStep 5: RIPEMD-160 Compression Function
Ø Each round consists of 16 steps operating with each round:
• A := CVq(0); B := CVq(1); C := CVq(2); D := CVq(3); E := CVq(4);
A’ := CVq(0); B’ := CVq(1); C’ := CVq(2); D’ := CVq(3); E’ := CVq(4);
• For j := 0 to 79 do
{
T := rols(j)(A + (j,B,C,D) + X[R[j]] + K(j)) + E;
A := E; E := D; D : = rol10(C); C := B; B := T;
T := rols’(j)(A’ + f(79-j, B’, C’, D’) + X[R’[j]] + K’(j)) + E’;
A’ := E’; E’ := D’; D’ := rol10(C’); C’ := B’; B’ := T’;
}
• CVq+1(0) := CVq(1) + C+ D’; CVq+1(1) = CVq(2) + D + E’;
CVq+1(2) = CVq(3)+E+A’; CVq+1(3) = CVq(4)+A+B’; CVq+1(4) = CVq(0)+B+C’;
25
RIPEMD-160 (cont..)
qStep 5: RIPEMD-160 Compression Function
26
RIPEMD-160 (cont..)
qStep 5: RIPEMD-160 Compression Function
Ø Where
ü A,B,C,D,E = the five words of the buffer for the left line
ü A’,B’,C’,D’,E’ = the five words of the buffer for the right line
ü j = step number, 0 ≤ j ≤ 79
ü f(j,B,C,D) = primitive logical function for step j of left line
and step 79-j of right line
ü rols(j) = circular left shift (rotation) of the 32-bit argument
by s(j) bits
ü Xr(j) = a 32-bit word derived from the 512-bit input block
determined by r(j)
ü K(j) = an additive constant used in step j
ü + = addition modulo 2^32
27
RIPEMD-160 (cont..)
qStep 5: RIPEMD-160 Compression Function
Ø Primitive functions f(j,B,C,D):
ü Input – 3 32-bit words
ü Output – a 32-bit word
ü Each function performs a set of bitwise logical operations
28
RIPEMD-160
q RIPEMD-160 Compression Function
Ø Circular left shift s(j):
Ø Derivation of the 32-bit word Xr(j) from the 512-bit input block
ü The first 16 values of Xr(j) holds the value of the current 512-bit
block
ü The remaining values are permuted using ρ(i) and π(i):
29
RIPEMD-160
qComparison with MD5 and SHA-1
30
Referents
• [1] Kenneth H.Rosen, Cryptography Theory
and Practice Third Edition.
• [2] Wiki & Internet.
31
32
Thanks for your attention!

More Related Content

PPT
Elliptical curve cryptography
PPTX
Symmetric encryption
PPT
DES (Data Encryption Standard) pressentation
PPT
Digital Signature Standard
PPTX
Hash Function
PPTX
Elgamal_digital_signature_scheme.pptx
PPT
block ciphers
PPTX
Message digest 5
Elliptical curve cryptography
Symmetric encryption
DES (Data Encryption Standard) pressentation
Digital Signature Standard
Hash Function
Elgamal_digital_signature_scheme.pptx
block ciphers
Message digest 5

What's hot (20)

PPT
Network Security and Cryptography
PPTX
RSA Algorithm
PPT
Blowfish Cryptosystem
PPT
cryptography and network security chap 3
PDF
symmetric key encryption algorithms
PPTX
Public Key Cryptosystem
PPTX
PPTX
Key management and distribution
PPTX
5. message authentication and hash function
PPTX
Diffie Hellman Key Exchange
PPT
Message Authentication Code & HMAC
PPTX
Elliptic Curve Cryptography
PDF
Elliptic curve cryptography
PPT
PPT
Midpoint circle algo
PPTX
I mage encryption using rc5
PPTX
Encryption and Decryption
PPTX
Blow fish final ppt
PDF
Cs8792 cns - unit iv
PPT
Polyalphabetic Substitution Cipher
Network Security and Cryptography
RSA Algorithm
Blowfish Cryptosystem
cryptography and network security chap 3
symmetric key encryption algorithms
Public Key Cryptosystem
Key management and distribution
5. message authentication and hash function
Diffie Hellman Key Exchange
Message Authentication Code & HMAC
Elliptic Curve Cryptography
Elliptic curve cryptography
Midpoint circle algo
I mage encryption using rc5
Encryption and Decryption
Blow fish final ppt
Cs8792 cns - unit iv
Polyalphabetic Substitution Cipher
Ad

Similar to MD5 - Hash Functions & RIPEMD160 (20)

PPT
introduction to MD5 Massage Digest Algorithm.ppt
PPT
An Introduction to Hashing: A basic understanding
PPT
crypto secure-hash-algorithm-versions.ppt
PDF
Lenguaje de Programación en C Presentacion
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash& mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPTX
Reed solomon Encoder and Decoder
PDF
cp467_12_lecture14_image compression1.pdf
PPT
Signyourd digital signature certificate provider
PPTX
Digital Logic Design Lecture on Counters and
PPTX
pseudocodes for interview preparation 2.pptx
PDF
Codes and Isogenies
PPTX
lec20111111111111111111111111111111111111.pptx
introduction to MD5 Massage Digest Algorithm.ppt
An Introduction to Hashing: A basic understanding
crypto secure-hash-algorithm-versions.ppt
Lenguaje de Programación en C Presentacion
Hash mac algorithms
Hash mac algorithms
Hash& mac algorithms
Hash mac algorithms
Hash mac algorithms
Hash mac algorithms
Hash mac algorithms
Reed solomon Encoder and Decoder
cp467_12_lecture14_image compression1.pdf
Signyourd digital signature certificate provider
Digital Logic Design Lecture on Counters and
pseudocodes for interview preparation 2.pptx
Codes and Isogenies
lec20111111111111111111111111111111111111.pptx
Ad

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Sports Quiz easy sports quiz sports quiz
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Renaissance Architecture: A Journey from Faith to Humanism
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
O7-L3 Supply Chain Operations - ICLT Program
Sports Quiz easy sports quiz sports quiz
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
Microbial diseases, their pathogenesis and prophylaxis
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Supply Chain Operations Speaking Notes -ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf

MD5 - Hash Functions & RIPEMD160

  • 1. MD5 1 Hash functions MD5 and RIPEMD 160 Instructor: TS Trương Tuấn Anh. HV: Chu Xuân Tình - 1870583
  • 2. 2 • Introduction • MD5 Algorithm Structure • RIPEMD 160 • Summary Hash functions MD5 and RIPEMD
  • 3. 3 Introduction: Ø 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 Ø Application: ü Integrity checking: User compare the checksum of the downloaded file ü Used to store a one-way hash of a password. Hash functions MD5
  • 6. MD5 Message Digest Algorithm 6 L ¥ 512bits = N ¥ 32bits Message Message length (K mod 2 64) • • • • • • 512bits 512bits 512bits 512bits Y0 Y1 Yq YL–1 128 512 HMD5IV CV1 CVq CVL–1 128 512 128 512 128 512 128-bit digest Figure 12.1 Message Digest Generation Using MD5 100...0 Padding (1 to 512bits) K bits HMD5 HMD5 HMD5
  • 7. MD5 Message Digest Algorithm 7 qStep 1: append padding bits Ø The message is padded so that its length in bits is congruent to 448 mod 512 (length ≡ 448 mod 512) Ø Padding is always added (1 to 512 bits) Ø The padding pattern is 100...0
  • 8. MD5 Message Digest Algorithm 8 q Step 2: append length Ø A 64-bit length in bits of the original message is appended Ø If the original length is greater than 2^64, the length is modulo 2^64 ( 2 pow 64) - The expanded message is L×512 bits: Y0, Y1, ..., YL-1 - A total of L×16 32-bit words: M[0...N-1], N = L×16 (32* 16=512)
  • 9. MD5 Message Digest Algorithm 9 q Step 3: initialize MD buffer Ø A 128-bit buffer is used to hold intermediate and final results of the hash function Ø The buffer is represented as 4 32-bit registers (A, B, C, D) initialized to the following integers (hexadecimal values): A = 67452301 B = EFCDAB89 C = 98BADCFE D = 10325476 Ø The values are stored in little-ending order, i.e., the least significant byte of a word in the low-address byte position: word A = 01 23 45 67 word B = 89 AB CD EF word C = FE DC BA 98 word D = 76 54 32 10
  • 10. MD5 Message Digest Algorithm 10 q Step 4: process message in 512-bit (16-word) blocks Ø A compression function MD5 consists of 4 “rounds” of processing ü In put 512-bit block Yq and 128-bit buffer value CVq represented by ABCD üOutput 128-bit chaining variable CVq+1 Ø For each round operation ü Input –Yq and ABCD ü Output – updated ABCD ü Each round makes use of 1/4 of a 64-element table T[1...64] – T[i] is the integer part of 2^32 × abs[sin(i)], where i is in radian ü Provides a “randomized” set of 32-bit patterns and thus eliminate the regularities in the input data Ø The output of the last round is added to the input of the first round (CVq) to produce CVq+1
  • 11. MD5 Message Digest Algorithm 11
  • 12. MD5 Message Digest Algorithm 12 q Step 5: output Ø The output from the L-th stage is the 128-bit message digest Ø Summary of the MD5: # var int digest (MD):= h0 append h1 append h2 append h3 # Convert the buffers to little-endian.
  • 13. MD5 Message Digest Algorithm 13 q MD5 Compression Function Ø Each round consists of 16 steps operating on the buffer ABCD with each step of the form: a ← b + ((a + g(b, c, d) + X[k] + T[I]) <<< s) Where: a,b,c,d = the four words of the buffer g = one of the primitive functions F, G, H, I <<<s = circular left shift (rotation) of the X[k] 32-bit argument by s bits X[k] = M[q×16 + k] = the k-th 32-bit word in (Word 32-bit thứ k của khối dữ liệu 512 bits.k=1..15 ) T[i] = the q-th 512-bit block of the message (Table T) + = addition modulo 2^32 (pow)
  • 14. MD5 Message Digest Algorithm 14 MD5 Compression Function
  • 15. MD5 – Step 4 15
  • 16. MD5 – Step 4 16
  • 17. MD5 Message Digest Algorithm 17 q MD5 Compression Function Ø Primitive functions F,G,H,I: ü Input – 3 32-bit words ü Output – a 32-bit word ü Each function performs a set of bitwise logical operations
  • 18. MD5 Message Digest Algorithm 18 q MD5 Compression Function Ø Permutations on the 32-bit words X[0..15] vary from round to round: Ø Note that for each step, only one of the four bytes of the ABCD buffer is updated Ø Four different circular left shift amounts are used each round and different from round to round: round 1: 7, 12, 17, 22 round 2: 5, 9, 14, 20 round 3: 4, 11, 16, 23 round 4: 6, 10, 15, 21 => Difficult to generate collisions (two blocks produce the same output)
  • 19. RIPEMD-160 qDevelopment ü RIPEMD-160 was developed under the European RACE Integrity Primitives Evaluation (RIPE) project ü Originally developed a 128-bit version of RIPEM ü H. Dobbertin found attacks on two rounds of RIPEMD and later on MD4 and MD5 ü Upgraded RIPEMD: RIPEMD-160 qRIPEMD-160 Logic ü Input – a message of arbitrary length, processed in 512- bit block ü Output – 160-bit message digest 19
  • 20. RIPEMD-160 vRIPEMD-160 Logic q Step 1: append padding bits Ø The message is padded so that its length is congruent to 448 mod 512 (length ≡ 448 mod 512) Ø Padding is always added (1 to 512 bits) Ø The padding pattern is 100...0 q Step 2: append length Ø A 64-bit length in bits of the original message is appended Ø If the original length is greater than 2^64, the length is modulo 2^64 q Step 3: initialize MD buffer Ø A 160-bit buffer is used to hold intermediate and final results of the hash function 20
  • 21. RIPEMD-160 (cont..) vRIPEMD-160 Logic q Step 3: initialize MD buffer ü The buffer is represented as 5 32-bit registers (A, B, C, D, E) initialized to the following integers (hexadecimal values): A = 67452301 B = EFCDAB89 C = 98BADCFE D = 10325476 E = C3D2E1F0 ü The values are stored in little-ending order, i.e., the least significant byte of a word in the low-address byte position: word A = 01 23 45 67 word B = 89 AB CD EF word C = FE DC BA 98 word D = 76 54 32 10 word E = F0 E1 D2 C3 21
  • 22. RIPEMD-160 (cont..) q Step 4: process message in 512-bit (16-word) blocks Ø A module with 10 rounds of processing of 16 steps each Ø The 10 rounds are arranged in 2 parallel lines of 5 rounds each ü Input – 512-bit block Yq, 160-bit buffer value CVq (ABCDE or A’B’C’D’E’) ü Output – 160-bit chaining variable CVq+1 (updated ABCDE) ü Makes use of additive constant Kj 22
  • 23. RIPEMD-160 (cont..) § Step 4: process message in 512-bit (16-word) blocks 23
  • 24. RIPEMD-160 (cont..) q Step 4: cont… Ø The output of the last round is added to the input of the first round (CVq) to produce CVq+1 in the following fashion: ü CVq+1(0) = CVq(1) + C + D’ ü CVq+1(1) = CVq(2) + D + E’ ü CVq+1(2) = CVq(3) + E + A’ ü CVq+1(3) = CVq(4) + A + B’ ü CVq+1(4) = CVq(0) + B + C’ q Step 5: output Ø The output from the L-th stage is the 160-bit message digest 24
  • 25. RIPEMD-160 (cont..) qStep 5: RIPEMD-160 Compression Function Ø Each round consists of 16 steps operating with each round: • A := CVq(0); B := CVq(1); C := CVq(2); D := CVq(3); E := CVq(4); A’ := CVq(0); B’ := CVq(1); C’ := CVq(2); D’ := CVq(3); E’ := CVq(4); • For j := 0 to 79 do { T := rols(j)(A + (j,B,C,D) + X[R[j]] + K(j)) + E; A := E; E := D; D : = rol10(C); C := B; B := T; T := rols’(j)(A’ + f(79-j, B’, C’, D’) + X[R’[j]] + K’(j)) + E’; A’ := E’; E’ := D’; D’ := rol10(C’); C’ := B’; B’ := T’; } • CVq+1(0) := CVq(1) + C+ D’; CVq+1(1) = CVq(2) + D + E’; CVq+1(2) = CVq(3)+E+A’; CVq+1(3) = CVq(4)+A+B’; CVq+1(4) = CVq(0)+B+C’; 25
  • 26. RIPEMD-160 (cont..) qStep 5: RIPEMD-160 Compression Function 26
  • 27. RIPEMD-160 (cont..) qStep 5: RIPEMD-160 Compression Function Ø Where ü A,B,C,D,E = the five words of the buffer for the left line ü A’,B’,C’,D’,E’ = the five words of the buffer for the right line ü j = step number, 0 ≤ j ≤ 79 ü f(j,B,C,D) = primitive logical function for step j of left line and step 79-j of right line ü rols(j) = circular left shift (rotation) of the 32-bit argument by s(j) bits ü Xr(j) = a 32-bit word derived from the 512-bit input block determined by r(j) ü K(j) = an additive constant used in step j ü + = addition modulo 2^32 27
  • 28. RIPEMD-160 (cont..) qStep 5: RIPEMD-160 Compression Function Ø Primitive functions f(j,B,C,D): ü Input – 3 32-bit words ü Output – a 32-bit word ü Each function performs a set of bitwise logical operations 28
  • 29. RIPEMD-160 q RIPEMD-160 Compression Function Ø Circular left shift s(j): Ø Derivation of the 32-bit word Xr(j) from the 512-bit input block ü The first 16 values of Xr(j) holds the value of the current 512-bit block ü The remaining values are permuted using ρ(i) and π(i): 29
  • 31. Referents • [1] Kenneth H.Rosen, Cryptography Theory and Practice Third Edition. • [2] Wiki & Internet. 31
  • 32. 32 Thanks for your attention!