Chapter 14 - 03 - Discuss Various Hash Functions and Cryptography Tools - 02_ocred.pdf

Full Transcript

Certified Cybersecurity Technician Exam 212-82 Cryptography HMAC The hash-based message authentication code (HMAC) is a type of message authentication code (MAC) that makes use of a cryptographic key in combination with a cryptographic hash function EEEEEN This algorithm includes an embedded hash fu...

Certified Cybersecurity Technician Exam 212-82 Cryptography HMAC The hash-based message authentication code (HMAC) is a type of message authentication code (MAC) that makes use of a cryptographic key in combination with a cryptographic hash function EEEEEN This algorithm includes an embedded hash function such as SHA-1 or MD5 The strength of HMAC depends on the embedded hash function, key size, and the size of the hash output As the HMAC executes the underlying hash function twice, it protects the data from various length extension attacks HMAC Hash-based message authentication code (HMAC) is a type of message authentication code (MAC) that uses a cryptographic key along with a cryptographic hash function. It is widely used to verify the integrity of data and authentication of a message. This algorithm includes an embedded hash function such as SHA-1 or MDS5. The strength embedded hash function, key slize, and size of the hash output. of HMAC depends on the HMAC includes two stages for computing the hash. The input key is processed to produce two keys, namely the inner key and the outer key. The first stage of the algorithm inputs the inner key and message to produce an internal hash. The second stage of the algorithm inputs the output from the first stage and outer key and produces the final HMAC code. As HMAC executes the underlying hash function twice, it offers protection against various length extension attacks. The size of the key and the output depends on the embedded function, e.g., 128 or 160 bits in the case of MD5 or SHA-1, respectively. Module 14 Page 1676 hash Certified Cybersecurity Technician Copyright © by EG-Council All Rights Reserved. Reproduction is Strictly Prohibited. Certified Cybersecurity Technician Exam 212-82 Cryptography Modes of Authenticated Encryption QO | Modes of authenticated encryption ensure the integrity and confidentiality of transmitted messages and rectifies the problem of chosen ciphertext attacks Authenticated Encryption with IMlessage Authentication Code (IMIAC) » : i The message authentication code (MAC) is a value obtained by hashing a plaintext Authenticated Encryption with Associated Data (AEAD) v message using a shared secret key = Encrypt-then-MAC (EtM) = Encrypt-and-MAC (E&M) == —— : » AEAD is another approach used to ensure the » This approach adds additional data to the ciphertext at certain places to thwart chosen integrity and authenticity of a message ciphertext attacks * MAC-then-encrypt (MtE) % _ Copyright © by E ¢ L. All Rights Reserved. ReproductionIs Strictly Prohibited Modes of Authenticated Encryption Authenticated encryption (AE) modes of operation provide integrity and confidentiality for a transmitted message. In any cipher mode of operation, encryption/decryption is possible only with the shared secret key, preventing man-in-the-middle (MITM) attacks. However, the attacker can perform a chosen ciphertext attack to crack the encryption schema. The AE schema rectifies the problem of chosen cipher attacks. In AE modes, the ciphertext is combined with a message authentication code (MAC). Therefore, choosing a part in the ciphertext is not possible, and the AE scheme rejects improper ciphertexts while decrypting. Authenticated encryption with Message Authentication Code (MAC) A MAC is a value obtained by hashing a plaintext message using a shared secret key. It provides integrity for the message, and the receiver can verify the message using the hash value attached to it. The following are the three different ways of using a MAC while encrypting a message. = Encrypt-then-MAC (EtM) In this approach, the plaintext is first encrypted using a secret key. For the obtained ciphertext, a hash value called message authentication code (MAC) MAC is attached to the ciphertext and transmitted. This approach security for the transmitted message than other AE approaches. * is generated. The provides higher Encrypt-and-MAC (E&M) In the E&M approach, a MAC is first generated for the plaintext, following which the plaintext is encrypted using a secret key. Finally, both the ciphertext and MAC are combined and transmitted. Module 14 Page 1677 Certified Cybersecurity Technician Copyright © by EG-Council All Rights Reserved. Reproduction is Strictly Prohibited. Certified Cybersecurity Technician Exam 212-82 Cryptography = MAC-then-encrypt (MtE) In the MtE approach, a MAC is first generated for the plaintext using the hash function, and the MAC is combined with the plaintext. The combination of the plaintext and MAC is encrypted with encrypted MAC. a secret key to produce ciphertext. The ciphertext contains the Authenticated Encryption with Associated Data (AEAD) AEAD is another approach used to ensure the integrity and authenticity of a message that contains both encrypted and unencrypted data. This approach adds additional data to the ciphertext at certain places to thwart chosen ciphertext attacks. The message header is kept unencrypted so that the receiver can verify the source of the message, and the payload is encrypted to ensure confidentiality. Module 14 Page 1678 Certified Cybersecurity Technician Copyright © by EG-Council All Rights Reserved. Reproduction is Strictly Prohibited. Certified Cybersecurity Technician Cryptography Exam 212-82 IMDS5 and MD6 2 MDS - File Tool: Calculators Calculator MDS Calculator - Hash - MD6 Hash Generator X — Help |C \Users\Admin' Deaktcp'md Scaic(1 0 0.0) ma | T (G MDS Digest [543a8108cdecab 05186771 Tec 5ot https://www.browserling.com v w ] All Hash Generator Compare To | https://www.browserling.com ‘ [[] Upper case B [£] MashAtyFiles e — hitps.//www. bullzip.com nuhMy Fil es Fde |= Edt S - View Optons 0 - lfl - Q N * Fiename D5 SHAY cren £13076-6123-1-SMpat |437T10¢et9 11129457 0eafe3ba0bES! 6211145957441cc0BABAD5203NaN000e195 cicdDed (%] 190627-habc-wins-a... |HeeabTds102000c1256400cR26M0d 140dTeeTadadi0ela MR0BISICCILe2 M1 27448063 & futureintemet-11-0C0... [a7cecci2e3919374ef30250603dBT 22200062533443 30680950007 TcEENTc... 6oa5Tdan o Heriztayout g ] UOTE_01,02 2016 PS.... ] imgpsh_mobile_save.... | mitprodata-demo.db) o stprovi 1 1pe-tep-pi... Wik, q...':.:.w? <... cdd}1101372517606324027228300049 |603049637730970760d307b2177024... |aTbabbbdtc2a88tba 0eedadi0cel7... |s455¢6seaT99a7Ibad 1abdebbb%adls |S5064201cTdTeTeASSUO6MIA40TIe https://convert-tool.com SO0 3 A sy T4 4500 TI0A3228150 JeIbSTRa0LS00AI2ILAIIA 1401 240cefS.., |~ md5 hash generator https://onlinehashtools.com 67E0beS] $1ecf6203b9a5b8b8C102b12d90catde 1l T4... 3691750¢ 2bdSH212T30ebeldcTa20e204335 10060841, 6cH0B v https://www.slavasoft.com hetps.//www.nirsoft.net Hash Calculators MDS5 and MD6 hash calculators that use different hash algorithms to convert plaintext into its equivalent hash value are discussed below. = MDS5 Calculator Source: https://www.bullzip.com MDS Calculator is a simple application that calculates the MD5 hash of a given file. It can be used with large files (e.g., several gigabytes in size). It features a progress counter and a text field from which the final MD5 hash can be easily copied to the clipboard. MDS Calculator can be used to check the integrity of a file. It allows you to calculate the MDS5 hash value of the selected file. Right-click the file and choose "MDS5 Calculator;" the program will calculate the MD5 hash. The MD5 Digest field contains the calculated value. To compare this MD5 paste the other value into the Compare appears between digest with another, one can To field. Obviously, the two values if they are equal; otherwise, the less than greater than (“>") sign will tell you that the values are different. Module 14 Page 1679 an equal to sign (“=") (“ 10 file(s) Figure 14.15: Screenshot of HashMyFiles Module 14 Page 1680 Certified Cybersecurity Technician Copyright © by EG-Gouncil All Rights Reserved. Reproduction is Strictly Prohibited. Certified Cybersecurity Technician Exam 212-82 Cryptography Some additional MD5 and MD6 hash calculators are as follows: = MD6 Hash Generator (https.//www.browserling.com) = All Hash Generator (https://www.browserling.com) = MD6 Hash Generator (https.//convert-tool.com) = md5 hash generator (https://onlinehashtools.com) = HashCalc (https://www.slavasoft.com) Module 14 Page 1681 Certified Cybersecurity Technician Copyright © by EG-Council All Rights Reserved. Reproduction is Strictly Prohibited.

Use Quizgecko on...
Browser
Browser