LogoTurboSFV - Hash types
Overview
TurboSFV supports various hash func­tions, which are used for calcu­lat­ing check­sums for files, for exam­ple those from the SHA-3 or BLAKE3 families. Check­sums are finger­prints or digital signa­tures of bit streams: Their cal­cu­lation and the length of the hash digits depend on the used hash algo­rithm.

Checksums can be used to algorith­mically identify a file. In general, if a file changes, then the check­sum will change. So check­sums can be used to validate the in­tegrity of files and to detect data cor­rup­tion. TurboSFV as a check­sum cal­cu­lation and vali­dation software can generate hash values for files in an entire folder tree.

The security of a hash function main­ly depends on the used hash algor­ithm and the length of the hash digits. At the time of writing, CRC-32, MD5 and SHA-1 are insecure: A dif­fer­ent file with the same check­sum can be found or even gener­ated. Thus, these hash functions can't be trusted and can only be used in areas with low se­curity require­ments.

Crypto­graphic algo­rithms, such as from the SHA-3 or BLAKE3 families, must provide resis­tance to these types of attacks. Finding two dif­fer­ent files with the same hash value or to conclude data just from the hash digits shouldn't be possible. Check­sums, produced by these hash func­tions, should unique­ly repre­sent the data.

The decision, which hash func­tion to use, de­pends on the appli­cation, the amount of data and the avail­able computer power (some algo­rithms are CPU hungry). For ex­amp­le, a cryp­to­graphic hash function should be used in the aera of biometric data.

In TurboSFV, the hash functions are imple­mented as a 64-bit ver­sion (x64 CPU in­struc­tions) as well as a 32-bit ver­sion (x86 CPU in­struc­tions). Start­ing with SHA-1, special SSE based in­struc­tions (Stream­ing SIMD (Single In­struc­tion Mul­tiple Data) Ex­ten­sions) can be option­ally used, if the CPU supports them. For SHA-1, these are SHA1RNDS4, SHA1MSG1, SHA1MSG2 and SHA1NEXTE. For SHA-256 (as well as SHA-224), the in­struc­tions SHA256RNDS2, SHA256MSG1 and SHA256MSG2 provide a much better perfor­mance for calculating checksums.

Additionally, TurboSFV x64 includes a special SSE based imple­men­tation for algo­rithms from the BLAKE3 family (BLAKE3-256, BLAKE3-512, BLAKE3-1024, BLAKE3-2048), which calcu­lates hash values in a paral­lel manner.

TurboSFV supports the calcu­lation of hash values by us­ing the following hash functions. Mentioned links to some external websites provide you with further details.
Top
SHA-3 family
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
The SHA-3 hash functions are spec­ified in the FIPS 202 issued by NIST (US National Institute of Stan­dards and Tech­nology), as the new "SHA-3 stan­dard". The algo­rithm is based on KECCAK, which was the winner of the SHA-3 compe­tition, announced by NIST in 2012.

SHA-3 was speci­fied by NIST, to have an alter­native to the SHA-2 fami­ly in place in case of a suc­cessful at­tack against SHA-2. SHA-2 is based on the same technical princi­ples as SHA-1, for which suc­cess­ful at­tacks are known since 2005. SHA-3 however uses a dif­ferent method for gene­rating hash values, the "sponge con­struction".

In FIPS 202, the speci­fication of SHA-3 slightly differs from the original KECCAK algorithm, sub­mitted to the NIST SHA-3 compe­ti­tion. But the change has no negative impact on the security of the algorithm: Only the padding (fill bits for the last message block) is different, allowing addi­tional hash modes in the future.

The KECCAK algo­rithm is based on numerous opera­tions with 64-bit numbers. Thus, it's recom­mended to use the capa­bilities of a 64-bit CPU for the calcu­lation of SHA-3 hash values, which is only en­abled on 64-bit operating systems. TurboSFV x64 was designed to run in a 64-bit environ­ment.

Supported SHA-3 hash functions as specified in FIPS 202 and their out­put lengths:
SHA3-224224 bits
SHA3-256256 bits
SHA3-384384 bits
SHA3-512512 bits
Top
BLAKE3 family
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
BLAKE3 is the suc­ces­sor of BLAKE2 and combines BLAKE2 variants in one hash function. The basic structure of BLAKE3 is a bi­nary tree, allow­ing parallel compu­tation on multiple proces­sors or SIMD pro­cess­ing of data. Fur­ther­more, BLAKE3 offers extendable output to produce other output lengths than the default length, which is 256 bit. Like BLAKE2, BLAKE3 is a crypto­graphic hash func­tion and supports keyed calculation of hash values.

The BLAKE3 imple­mentation in TurboSFV follows the BLAKE3 speci­fication version 20200221.164500. TurboSFV pro­duces BLAKE3 checksums with the default length of 256 bits plus the extended output lengths (XOF's) 512, 1024 and 2048 bits. An XOF with 1024 bits for example means, that the first 512 bits are the same as for the length 512 bit, plus addi­tional 512 bits, gen­erated by an­other com­pres­sion of the root node in the binary tree. As of TurboSFV v9.20, parallel calculation of BLAKE3 check­sums is also supported.

TurboSFV x64 v10.50 comes with a special SSE (Stream­ing SIMD Exten­sions) based implemen­tation for the calcu­lation of BLAKE3 hash values, which provides a parallel compu­tation in lanes. Further­more, multiple CPUs can be used for a even better perfor­mance. As a pre­condi­tion, the used CPU must support SSE in­struc­tions up to and including in­struc­tion set SSE4.1.

Supported BLAKE3 hash functions and their output lengths:
BLAKE3-256256 bits
BLAKE3-512512 bits
BLAKE3-10241024 bits
BLAKE3-20482048 bits
Top
BLAKE2 family
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
The hash algo­rithms from the BLAKE2 family are based on BLAKE, which was one of the finalists in the SHA-3 compe­tition by NIST. BLAKE2 is the successor of BLAKE, optimized for speed and with less memory us­age. BLAKE2 is specified in RFC 7693 and claims to be secure.

The algorithms im­ple­mented in TurboSFV are BLAKE2S, BLAKE2SP, BLAKE2B and BLAKE2BP. BLAKE2S operates with 32-bit inte­gers and is mainly designed for 32-bit CPUs. BLAKE2SP runs eight in­stances of BLAKE2S in paral­lel mode. Both produces digests up to 256 bits. BLAKE2B on the other hand works with 64-bit numbers and is optimized for 64-bit platforms. BLAKE2BP is designed to run in parallel mode and works with four in­stances of BLAKE2B. BLAKE2B and BLAKE2BP deliver hash digits up to 512 bits.

The algorithms sup­port stan­dard­ized keyed hashing as well as salt, which are inter­esting fea­tures in the light of future extensions of TurboSFV.

For BLAKE2, TurboSFV offers digest lengths from 256 bits up to 512 bits, in particular BLAKE2S-256, BLAKE2SP-256, BLAKE2B-256, BLAKE2B-384, BLAKE2B-512, BLAKE2BP-256, BLAKE2BP-384 and BLAKE2BP-512. Note that the listed algo­rithms pro­duce different hash values.

Supported BLAKE2 hash functions and their output lengths:
BLAKE2S-256256 bits
BLAKE2SP-256256 bits
BLAKE2B-256256 bits
BLAKE2B-384384 bits
BLAKE2B-512512 bits
BLAKE2BP-256256 bits
BLAKE2BP-384384 bits
BLAKE2BP-512512 bits
Top
SHA-2 family
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
The SHA-2 family includes the secure hash algorithms SHA-224, SHA-256, SHA-384, SHA-512 plus the two t-bit hash functions SHA-512/224 and SHA-512/256.

The t-bit hash func­tions SHA-512/224 and SHA-512/256 are based on SHA-512, but they start with different initial vectors and come with smaller hash values.

For example, SHA-512/256 is used in appli­ca­tions, where on one hand a key length of 256 bit is needed, on the other hand the higher security of SHA-512 instead of SHA-256. Addi­tionally, on x64 platforms, SHA-512 can have a better per­for­mance - if properly coded.

For the algor­ithms SHA-256 and SHA-224, the calcu­lation mode can be option­ally switched to special SSE (Stream­ing SIMD Exten­sions) based in­struc­tions (SHA256RNDS2, SHA256MSG1, SHA256MSG2), instead of using the default x86 (32-bit) and x64 (64-bit) CPU in­struc­tions - if sup­ported by the CPU. TurboSFV checks the CPU against the needed fea­tures, before using them. By calcu­lating with SSE based in­struc­tions, the compu­tation can be up to seven times faster.

Supported SHA-2 hash functions and their output lengths:
SHA-224224 bits
SHA-256256 bits
SHA-384384 bits
SHA-512512 bits
SHA-512/224224 bits
SHA-512/256256 bits
Top
xxHash
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
xxHash is an open source project with the goal to develop a fast hash algo­rithm. The algo­rithm is not de­signed to be used in crypto­graphic areas and is also not collision resis­tant.

TurboSFV supports the variants XXH32 and XXH64: XXH32 works with 32-bit numbers and is optimized for 32-bit environments, while XXH64 oper­ates with 64-bit numbers and is thus optimized for 64-bit CPUs. XXH32 produces digits with 32 bits, while XXH64 delivers a 64-bit hash value. Option­ally, both can take a seed value as an additional input (similar to salt), but this is not sup­port­ed by TurboSFV.

In the current state of development, XXH32 and XXH64 seem to be stable now and thus the checksums pro­duced by them - but there is no guarantee for it.

The implemen­ta­tion in TurboSFV is in line with the documen­tation v0.1.1 (10/10/18). TurboSFV doesn't use any of the li­braries provided by the open source project.

Supported xxHash hash functions and their output lengths:
XXH3232 bits
XXH6464 bits
Top
SHA-1 - Secure hash algorithm
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
SHA-1 was pub­lished in 1995 by NIST, to provide a cryp­to­graphic hash function to be used by federal depart­ments in appli­ca­tions and as a stan­dard in proto­cols, avail­able also for private and com­mer­cial users. Since 2005, suc­cess­ful attacks on SHA-1 are known and SHA-2 was later an­nounced as the suc­ces­sor.

The basic imple­men­tation in TurboSFV works with x86 (32-bit) and x64 (64-bit) CPU in­struc­tions. Optionally, the cal­cu­lation process can be switched to special SHA-1 SSE (Stream­ing SIMD Exten­sions) in­struc­tions, which are avail­able in Intel proces­sors since 2016 and in AMD proces­sors since 2017. These SSE in­struc­tions (SHA1RNDS4, SHA1MSG1, SHA1MSG2, SHA1NEXTE) allow a compu­tation in a parallel manner, thus the overall cal­cu­lation can be up to four times faster. TurboSFV checks the CPU against the needed fea­tures before using them.

Top
MD5 - Message-digest 5 hash function
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
Top
CRC-32 - Cyclic redundancy check
TurboSFV
LE: SignPE: SignCE: SignXE: Sign
Top
 
 Table of con­tentsNext page
 
 
UKDE



Privacy Policy