Glossary
This glossary gives you short explanations of important terms related to hash functions, cryptography, and the algorithms covered on HashGenerator.de.
I explain many terms in more detail in articles of their own. In that case, you'll find a link to the matching article in the definition.
AND
AND is a bitwise logical operation.
A result bit is 1 only if both input bits are 1:
0 AND 0 = 0
0 AND 1 = 0
1 AND 0 = 0
1 AND 1 = 1
AND is used, among other places, within the logical functions of SHA-2.
Argon2
Argon2 is a family of memory-intensive schemes for password hashing and key derivation.
Argon2 won the Password Hashing Competition in 2015. For password storage, the Argon2id variant in particular is used.
Authenticity
In the context of information security, authenticity describes the verifiable origin of data or messages.
A cryptographic hash function alone doesn't establish authenticity. Message authentication codes or digital signatures, for example, can be used for that.
Avalanche Effect
The avalanche effect describes the desired behavior that even a small change to the input leads to large changes in the output of a cryptographic function.
In an idealized view of a hash function, changing a single input bit is expected to change roughly half of the output bits.
→ Learn more: What Is the Avalanche Effect?
bcrypt
bcrypt is a scheme designed specifically for password hashing.
It uses a salt and has a configurable cost factor that can be used to deliberately make the calculation more expensive.
Bit
A bit is the smallest unit of information in a digital system and can take the values 0 or 1.
The length of hash values and the security strength of cryptographic schemes are often stated in bits. SHA-256, for example, produces a hash value of 256 bits.
Bit Rotation
In a bit rotation, the bits of a word are shifted cyclically to the left or right.
Bits that are shifted out on one side reappear on the opposite side. Unlike with an ordinary bit shift, no bits are lost.
SHA-2 uses right rotations (ROTR) in particular.
Brute Force
Brute force refers to the systematic trying of possible candidates.
In a preimage attack, for example, you can try hashing possible inputs and comparing their hash values with a given target hash.
How practical such an attack is depends not only on the hash function used, but in particular on the size and structure of the possible input space.
Byte
A byte consists of eight bits.
A SHA-256 hash of 256 bits therefore has a length of 32 bytes. A SHA-512 hash of 512 bits corresponds to 64 bytes.
Capacity
The capacity is the part of the internal state of a sponge construction that is not XORed directly with the message blocks. It largely determines the security properties of the construction.
For SHA3-256, the capacity is 512 bits, twice the digest length.
→ Learn more: How Does SHA-3 Work?
Ch Function
Ch stands for Choose and is one of the logical functions of the SHA-2 compression function.
It is defined as:
Ch(x, y, z) = (x AND y) XOR ((NOT x) AND z)
Looked at bit by bit, x determines whether the corresponding bit is selected from y or from z.
Checksum
A checksum is a check value that can be used, for example, to detect unintentional changes or transmission errors in data.
Cryptographic hash values can also be used for integrity checks. Not every checksum, however, has cryptographic security properties.
A simple error-detection value and a cryptographic hash function therefore don't necessarily pursue the same security goals.
Collision
A collision occurs when two different inputs produce the same hash value.
Since hash functions map a larger space of possible inputs onto a finite set of possible hash values, such collisions must fundamentally exist.
What matters for cryptographic hash functions is therefore not whether collisions exist, but how difficult it is to find them deliberately.
→ Learn more: What Is a Hash Collision?
Collision Resistance
Collision resistance is a security property of cryptographic hash functions.
A hash function is meant to be collision-resistant if it is practically impossible to find two different inputs that produce the same hash value.
For an idealized hash function with n bits of output, the generic effort for a collision search, due to the birthday effect, is on the order of 2^(n/2).
→ Learn more: What Is Collision Resistance?
Compression Function
The compression function is a central component of SHA-256 and SHA-512.
It processes the current internal hash state together with data derived from a message block. The result is then combined with the previous state.
For messages with multiple blocks, the resulting state is carried forward when the next block is processed.
→ Learn more: How Does SHA-256 Work?
Compression Round
SHA-256 and SHA-512 execute their compression function in multiple rounds.
SHA-256 uses 64 rounds with 32-bit words, SHA-512 uses 80 rounds with 64-bit words.
In each round, among other things, a word of the message schedule, a round constant, and the current internal working state are processed.
→ Learn more: How Does SHA-256 Work?
Cryptographic Hash Function
A cryptographic hash function is a hash function that is meant to satisfy certain security properties for cryptographic applications.
These include in particular preimage resistance, second-preimage resistance, and collision resistance.
Not every function that produces a hash value is therefore automatically suitable for cryptographic applications.
→ Learn more: What Is a Hash Function?
Digest
Digest or message digest is another term for the output of a cryptographic hash function.
In everyday usage, the terms hash or hash value are also frequently used for it.
Digital Signature
A digital signature is a cryptographic scheme that can be used, among other things, to verify the origin and integrity of digital data.
Cryptographic hash functions are often used in digital signature schemes. The digital signature itself, however, is not simply a hash value.
Domain Separation
Domain separation means appending additional bits to a message so that functions which use the same underlying construction produce different results for the same input. For SHA3-256, the suffix 01 is appended to the message; for SHAKE128 and SHAKE256, the suffix 1111.
→ Learn more: How Does SHA-3 Work?
Encoding
In encoding, data is converted into another representation according to defined rules.
In contrast to hashing, encoding is fundamentally reversible. One example is Base64: encoded data can be decoded again.
Encoding by itself provides no confidentiality and is not encryption.
Encryption
Encryption converts data into ciphertext using a cryptographic scheme and a key.
With the matching key, the data can be decrypted again.
That fundamentally distinguishes encryption from hashing: a hash value is not meant to be a reversible representation of the original data.
Extendable-Output Function (XOF)
An extendable-output function (XOF) is a function whose output length is not fixed in advance but can be chosen as needed. FIPS 202 defines two XOFs: SHAKE128 and SHAKE256.
→ Learn more: What Is SHA-3?
Feed-forward
In feed-forward, the result of the compression rounds is combined with the previous hash state.
In SHA-256 and SHA-512, after a block has been processed, the eight working variables are added to the previous hash state modulo the respective word size.
The resulting state serves either as the starting point for the next message block or, after the last block, forms the basis of the final hash value.
Hash
Hash is often used as a short form for hash value and denotes the output of a hash function.
Depending on the context, people also colloquially speak of "hashing" data or of a "hash algorithm."
Hash Function
A hash function maps input data onto a hash value of a defined length.
Cryptographic hash functions additionally have certain security properties. These include in particular preimage resistance, second-preimage resistance, and collision resistance.
→ Learn more: What Is a Hash Function?
Hash Value
The hash value is the output of a hash function.
Its length depends on the algorithm used and not directly on the size of the input. SHA-256, for example, produces a hash value of 256 bits, SHA-512 one of 512 bits.
Hexadecimal Representation
The hexadecimal system uses 16 digits (0–9 and a–f) to represent numbers.
One hexadecimal character represents four bits. The usual hexadecimal representation of a 256-bit hash value therefore requires 64 characters:
256 / 4 = 64
For a SHA-512 hash of 512 bits, 128 hexadecimal characters are required accordingly.
HMAC
HMAC stands for Hash-based Message Authentication Code.
HMAC combines a cryptographic hash function with a secret key and can be used to verify the integrity and authenticity of a message.
HMAC is therefore something different from simply hashing a message.
Initial Hash Value
The initial hash value is the defined starting state of a hash function before the first message block is processed.
SHA-256 and SHA-512 each use eight starting values defined by the standard. They are part of the respective algorithm and are not generated from the input.
→ Learn more: How Does SHA-256 Work?
Integrity
In the context of information security, integrity means that data has not been changed without being noticed.
Hash values can help detect changes. A simple hash comparison alone, however, doesn't prove the authenticity of the data if the reference hash used doesn't come from a trustworthy source.
Keccak
Keccak is the algorithm that NIST selected in 2012 as the winner of the SHA-3 competition. SHA-3 is based on Keccak.
The name "Keccak-256", however, does not automatically denote the same function as SHA3-256.
→ Learn more: What Is SHA-3?
Maj Function
Maj stands for Majority and is a logical function of the SHA-2 compression function.
It is defined as:
Maj(x, y, z) =
(x AND y) XOR
(x AND z) XOR
(y AND z)
For each bit position, the result corresponds to the value that occurs in the majority among x, y, and z.
MD5
MD5 is a hash function developed by Ronald Rivest with an output of 128 bits.
Because of known practical collision attacks, MD5 is no longer suitable for applications that require collision resistance.
Message Block
Many cryptographic hash functions process messages block by block.
SHA-256 works with 512-bit message blocks, while SHA-512 uses 1024-bit blocks.
A message that is larger than one block after padding is accordingly processed in multiple blocks.
Message Digest
Message digest is another term for the hash value produced by a cryptographic hash function.
See also: Digest and Hash Value.
Message Schedule
In the message schedule, the words obtained from a message block are extended for the subsequent compression rounds.
In SHA-256, 16 original 32-bit words become a total of 64 schedule words.
SHA-512 extends 16 original 64-bit words to a total of 80 schedule words.
Modular Arithmetic
In modular arithmetic, numbers are considered within a limited range of values.
SHA-256 performs certain additions modulo 2^32, SHA-512 modulo 2^64.
In an addition modulo 2^32, effectively only the lower 32 bits of the result are carried forward.
NOT
NOT inverts the individual bits of a value:
NOT 0 = 1
NOT 1 = 0
In SHA-2, NOT is used, for example, within the Ch function.
Padding
Padding extends a message according to precisely defined rules before it is processed by a hash function.
In SHA-256 and SHA-512, a 1 bit, a defined number of 0 bits, and a representation of the original message length are added to the message, among other things.
This allows the message to be processed in complete blocks afterward.
→ Learn more: How Does SHA-256 Work?
Password Hashing
Password hashing refers to schemes for storing password verifiers without having to store the password itself in plain text.
For passwords, suitable password-hashing schemes with a salt and an appropriate cost factor should be used.
Fast general-purpose cryptographic hash functions such as SHA-256 or SHA-512 alone are not intended as a password-hashing scheme.
Preimage Resistance
Preimage resistance is a security property of cryptographic hash functions.
Given a hash value, it should be practically impossible to find an input that produces exactly this hash value.
For an idealized n-bit hash function, the generic effort is on the order of 2^n.
→ Learn more: What Is Preimage Resistance?
Rainbow Table
A rainbow table is a precomputed data structure that can speed up the search for inputs to known hash values for certain input spaces.
Individual salts in password hashing make such precomputed attacks considerably harder, because precomputed tables can't easily be reused for many different salts.
Rate
The rate is the part of the internal state of a sponge construction through which input blocks are absorbed and output is taken. For SHA3-256, the rate is 1088 bits, or 136 bytes.
→ Learn more: How Does SHA-3 Work?
ROTR
ROTR stands for Rotate Right.
All bits of a word are rotated to the right by a certain number of positions. The bits that fall off on the right are re-inserted on the left.
SHA-256 and SHA-512 use ROTR within their σ and Σ functions, among other places.
See also: Bit Rotation and SHR.
→ Learn more: How Does SHA-256 Work?
Round Constant
Round constants are fixed, defined constants that are used during the compression rounds.
SHA-256 uses 64 32-bit round constants. SHA-512 uses 80 64-bit round constants.
The constants are part of the respective algorithm specification and don't depend on the input.
→ Learn more: How Does SHA-256 Work?
Salt
A salt is an additional value that is processed together with the password in password hashing.
Salts are meant to be chosen individually for each password and ensure, among other things, that identical passwords don't automatically lead to identical stored password hashes.
A salt doesn't have to be secret.
scrypt
scrypt is a password-hashing and key-derivation scheme that, in addition to computation time, deliberately uses a configurable memory requirement.
This is meant to make heavily parallelized attacks in particular more expensive.
Second-Preimage Resistance
Second-preimage resistance is a security property of cryptographic hash functions.
Given an already specified input, it should be practically impossible to find a different input that produces the same hash value.
It therefore differs from both preimage resistance and collision resistance.
→ Learn more: What Is Second-Preimage Resistance?
Security Strength
Security strength describes the expected computational effort required to break a particular security property.
The length of a hash value is not automatically identical to its collision resistance.
For an idealized n-bit hash function, the generic effort for a preimage is on the order of 2^n, whereas for a collision, due to the birthday effect, it is on the order of 2^(n/2).
→ Learn more: How Secure Are 128, 256, and 512 Bits?
SHA-1
SHA-1 is a cryptographic hash function with an output of 160 bits.
Because of practical collision attacks, SHA-1 is no longer suitable for applications that require collision resistance.
SHA-2
SHA-2 refers to a family of cryptographic hash functions.
It includes SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256.
The family is specified in NIST's Secure Hash Standard.
→ Learn more: What Is SHA-2?
SHA-224
SHA-224 belongs to the SHA-2 family and produces a hash value of 224 bits.
The algorithm uses the same 32-bit structure as SHA-256, but has its own initial hash values and delivers an output limited to 224 bits.
→ Learn more: What Is SHA-224?
SHA-256
SHA-256 belongs to the SHA-2 family and produces a hash value of 256 bits.
The algorithm processes 512-bit message blocks, works internally with 32-bit words, and uses 64 compression rounds.
→ Learn more: What Is SHA-256?
SHA-3
SHA-3 is a family of cryptographic hash functions standardized in NIST FIPS 202.
It includes SHA3-224, SHA3-256, SHA3-384, and SHA3-512.
SHA-3 is based on a different construction than SHA-2. FIPS 202 also defines the extendable-output functions SHAKE128 and SHAKE256.
→ Learn more: What Is SHA-3?
SHA-384
SHA-384 belongs to the SHA-2 family and produces a hash value of 384 bits.
Like SHA-512, the algorithm uses a 64-bit structure with 1024-bit message blocks and 80 compression rounds, but has its own initial hash values and delivers an output limited to 384 bits.
→ Learn more: What Is SHA-384?
SHA-512
SHA-512 belongs to the SHA-2 family and produces a hash value of 512 bits.
The algorithm processes 1024-bit message blocks, works internally with 64-bit words, and uses 80 compression rounds.
→ Learn more: What Is SHA-512?
SHA-512/224
SHA-512/224 belongs to the SHA-2 family and uses the SHA-512-based 64-bit structure, but produces a hash value of 224 bits.
The algorithm has its own initial hash values and is not simply an ordinary SHA-512 hash truncated to 224 bits afterward.
→ Learn more: What Are SHA-512/224 and SHA-512/256?
SHA-512/256
SHA-512/256 belongs to the SHA-2 family and uses the SHA-512-based 64-bit structure with an output of 256 bits.
Despite the same output length, SHA-512/256 is not the same as SHA-256.
SHA-512/256 uses, among other things, 64-bit words, 1024-bit message blocks, and its own initial hash values.
→ Learn more: What Are SHA-512/224 and SHA-512/256?
SHR
SHR stands for Shift Right.
Bits are shifted to the right. The positions that become free on the left are filled with zeros, while bits shifted out on the right are lost.
That distinguishes SHR from ROTR, where bits rotated out are re-inserted on the opposite side.
Sponge Construction
A sponge construction is a design principle in which data is first absorbed into an internal state (absorbing phase) and output is then squeezed from that state (squeezing phase). SHA-3 uses this principle together with the Keccak permutation.
→ Learn more: What Is SHA-3?
UTF-8
UTF-8 is a character encoding for Unicode.
For hash functions, what matters is that ultimately a sequence of bits or bytes is processed. A text therefore has to be converted into bytes according to a defined character encoding.
In UTF-8, different characters can require different numbers of bytes.
The character encoding used is therefore relevant if the same hash value is to be calculated reproducibly from a text.
Working Variables
Working variables are the variables that are modified during the compression rounds of a hash function.
In SHA-256 and SHA-512, eight working variables are usually denoted a through h.
After the compression rounds, their values are combined with the previous hash state in the feed-forward step.
→ Learn more: SHA-256 Step by Step
XOR
XOR stands for Exclusive OR and is a bitwise logical operation.
For two individual bits, the following applies:
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0
XOR is used in many places in cryptographic algorithms, including in the functions of SHA-2.