Section 25 - Hashing Flashcards
What is hashing?
Hashing is a one-way cryptographic function which takes an input and produces a unique message digest as its output.
*** because this is a one way function, there’s no way to determine the original message based on the hash it’s outputted. The resulting message digest acts like a digital fingerprint for the original file.
A unique thing about a hash digest is that they are always the same…?
Length
Regardless of how long your input is
What is the most commonly hash algorithm?
MD5
How does MD5 work?
It creates a 128-bit hash value that is unique to the input file.
What is a hash collision?
Because the hash value outputted is only 128 bits long, it can create only a limited number of unique values. This can lead to two files having the same exact resulting hash digest.
*** Due to this problem, a newer algorithm SHA was created.
What does SHA stand for?
Secure Hash Algorithm
How does SHA differ from MD5?
It has a higher bit digest which significantly reduces the number of hash collisions.
How many versions of SHA are there?
3
SHA-1 = 160-bit digest
SHA-2 = has a digest between 224-512 (this has a family of hash functions SHA-224, SHA-256, SHA-348, SHA-512)
SHA-3 - uses 120 rounds of computations
What is RIPEMD?
A hashing function known as RACE Integrity Primitive Evaluation Message Digest
This comes in 160, 256 and 320-bit versions.
What is HMAC?
A hashing function known as Hash-based message Authentication Code
This actually uses the other hashing algorithms to do the work. So it’s often called something like, HMAC-MD5, HMAC-SHA1, etc.
To prevent collisions from being used to spoof the integrity of a file or message, many professionals have turned to…?
Digital Signatures
What is a digital signature?
A digital signature is created by hashing a file and then taking that resulting hash digest and encrypting it with a private key.
** So, if you were to send an email with a digital signature, you run that email message through a hashing algorithm of your choice and with the resulting hash you would encrypt it with your private key. When the email is received, that person will decrypt the digital signature using their public key which is give them the hash. The hash is then run through the hash algorithm which will compare their message digest with my digital signature. If they match, then you know the email was not modified.
For digital signatures to be utilized, you should use what…?
DSA (Digital Security Algorithm)
RSA (Rivest-Shamir-Adelman)
ECC version of DSA/SHA
DSS (Digital Security Standard) (the government uses this)
Most commercial entities rely upon the RSA standard because…?
It’s faster and can be used for digital signatures, encryption and key distribution
Digital signatures have expanded beyond email. ___ ___ of our files relies upon the digital signature for a program or a file.
Code signing
*** For example, if you create a mobile app that you wanted to put in an app store you would have to digitally sign it thus “code signing.”