Cryptography

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Subjects

HMAC

https://en.wikipedia.org/wiki/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

https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#MessageDigest

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.

MD5

MD5

SHA-1

SHA-1