Cryptography
Subjects
Overview
Encryption is the process of taking data (cleartext) and a key and producing data (ciphertext) meaningless to a third-party who does not know the key. Decryption is the inverse process - that of taking ciphertext and a key and producing cleartext.
HMAC
HMAC (hash-based message authentication code) is a message authentication code that involves a cryptographic has function and a secret cryptographic key. It may used to simultaneously verify both the data integrity and the authentication of a message. Any cryptographic has function, such as MD5 or SHA-1, may be used in calculation of the HMAC.
A HMAC can be generated on command-line with OpenSSL.
Message Digest, Cryptographic Hash Function
A cryptographically secure message digest takes arbitrary-sized input (a byte array), and generates a fixed-size output, called a digest or hash. Message digests are used to produce unique and reliable identifiers of data. They are sometimes called "checksums" or the "digital fingerprints" of the data. Changes to just one bit of the message should produce a different digest value.
A digest has two properties:
- It should be computationally infeasible to find to messages that hash to the same value.
- The digest should not reveal anything about the input that was used to generate it.