diff --git a/src/libsodium/include/sodium/crypto_hash.h b/src/libsodium/include/sodium/crypto_hash.h index 87f61b22..d455bd51 100644 --- a/src/libsodium/include/sodium/crypto_hash.h +++ b/src/libsodium/include/sodium/crypto_hash.h @@ -1,6 +1,13 @@ #ifndef crypto_hash_H #define crypto_hash_H +/* + * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA512, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + #include #include "crypto_hash_sha512.h" diff --git a/src/libsodium/include/sodium/crypto_hash_sha256.h b/src/libsodium/include/sodium/crypto_hash_sha256.h index 7ff85e62..449ddf22 100644 --- a/src/libsodium/include/sodium/crypto_hash_sha256.h +++ b/src/libsodium/include/sodium/crypto_hash_sha256.h @@ -1,6 +1,13 @@ #ifndef crypto_hash_sha256_H #define crypto_hash_sha256_H +/* + * WARNING: Unless you absolutely need to use SHA256 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA256, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + #include #include #include diff --git a/src/libsodium/include/sodium/crypto_hash_sha512.h b/src/libsodium/include/sodium/crypto_hash_sha512.h index 1e419f7e..e8ef2e36 100644 --- a/src/libsodium/include/sodium/crypto_hash_sha512.h +++ b/src/libsodium/include/sodium/crypto_hash_sha512.h @@ -1,6 +1,13 @@ #ifndef crypto_hash_sha512_H #define crypto_hash_sha512_H +/* + * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA512, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + #include #include #include