Standard hash algorithm names? #246
Labels
Ecma specification
Work on the core specification
PURL type definition
Non-core definitions that describe and standardize PURL types
Everybody knows about the MD5 SHA-1 SHA-256 SHA-512 algorithms, and these are almost universally written as md5 sha1 sha256 sha512. Unfortunately, the PURL spec says the key for the checksum qualifier is "lowercase_algorithm" and then lowercases "SHA-1" and "SHA-256" into "sha1" and "sha256" for the example. For these algorithms, the description and example are probably okay. That implies that the rest of the SHA-2 family, SHA-224 SHA-384 SHA-512, becomes sha224 sha384 sha512.
However, it's unclear what the key should be for other algorithms like SHA3-256. It's probably sha3-256? sha3256 definitely doesn't seem right.
I've also noticed that some algorithms that shouldn't be ambiguous are made ambiguous by library implementations. For example, Python uses the ID
shake_256
for the SHAKE256 algorithm and the IDripemd160
for the RIPEMD-160 algorithm.It would be helpful to have a list of standard hash algorithms with their correct keys.
The text was updated successfully, but these errors were encountered: