New Scalar Functions SHA256 and SHA512
Details
| Detail name | Value |
|---|---|
| Changelog Number | 7732 |
| Type | New Feature |
| Status | Resolved |
| Fix Versions | Exasol 6.2.0 |
| Resolution Date | 2019-05-07 |
Background
Exasol version 6.1 and below implement the following scalar hashing functions:
- HASH_MD5
- HASH_SHA1
- HASH_TIGER
While MD5 and SHA1 are both known to be cryptographically unsafe due to known successful attack against them, Tiger algorithm is one of the longest serving hash functions for which there is no known practical attack. However, it has been seriously wounded (i.e. by impractical but theoretically significant attacks). With this we are left with SHA256 and SHA512 as de facto industry standards as there are no known successful significant attacks against these algorithms.
Feature description
New scalar functions for SHA256 and SHA512 have been introduced. The new scalar functions are:
- HASH_SHA256
- HASH_SHA512
Those functions have the same behavior as the already existing hashing functions, except the differences in the algorithms it self.
The results of the hashing function are:
- HASH_SHA256 -> CHAR(64)
- HASH_SHA512 -> CHAR(128)
Examples for HASH_SHA256 and HASH_SHA512:
SELECT HASH_SHA256('abc');
----------------------------------------
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
SELECT HASH_SHA512('abc');
----------------------------------------
ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
Benefits
The industry standard hashing algorithms for SHA256 and SHA512 can be used for cryptographically critical applications.
Restrictions
In general the hashing functions for SHA256 and SHA512 follow the the same constraints as the already available hashing functions for MD5, SHA1 and TIGER.
There are no general restrictions for the new hashing functions, but they are more compute intense.