diff --git a/src/environment/v1/hash.mli b/src/environment/v1/hash.mli index a2cf5e105..c6d314e90 100644 --- a/src/environment/v1/hash.mli +++ b/src/environment/v1/hash.mli @@ -103,7 +103,7 @@ module type PrefixedName = sig val b58check_prefix : string end -(** Builds a new Hash type using Sha256. *) +(** Builds a new Hash type using Blake2B. *) module Make_minimal_Blake2B (Name : Name) : MINIMAL_HASH module Make_Blake2B diff --git a/src/proto/alpha/docs/language.md b/src/proto/alpha/docs/language.md index 2cc580fc6..2ddbbb9f8 100644 --- a/src/proto/alpha/docs/language.md +++ b/src/proto/alpha/docs/language.md @@ -1180,7 +1180,7 @@ for under/overflows. * `H`: Compute a cryptographic hash of the value contents using the - Sha256 cryptographic algorithm. + Blake2B cryptographic hash function. :: 'a : 'S -> string : 'S @@ -1448,7 +1448,7 @@ All domain specific constants are Micheline strings with specific formats: - `contract`s are the raw strings returned by JSON RPCs or the command line interface and cannot be forged by hand so their format is of no interest here. - - `key`s are `Sha256` hashes of `ed25519` public keys encoded in + - `key`s are `Blake2B` hashes of `ed25519` public keys encoded in `base58` format with the following custom alphabet: `"eXMNE9qvHPQDdcFx5J86rT7VRm2atAypGhgLfbS3CKjnksB4"`. - `signature`s are `ed25519` signatures as a series of hex-encoded bytes. diff --git a/src/utils/hash.ml b/src/utils/hash.ml index f7533996d..008ae57a3 100644 --- a/src/utils/hash.ml +++ b/src/utils/hash.ml @@ -310,7 +310,7 @@ module Make_Blake2B (R : sig ~binary: (conv to_bytes of_bytes_exn (Fixed.bytes size)) ~json: - (describe ~title: (K.title ^ " (Base58Check-encoded Sha256)") @@ + (describe ~title: (K.title ^ " (Base58Check-encoded Blake2B hash)") @@ conv to_b58check (Data_encoding.Json.wrap_error of_b58check_exn) string) let param ?(name=K.name) ?(desc=K.title) t = @@ -628,7 +628,7 @@ module Net_id = struct splitted ~binary: (Fixed.string size) ~json: - (describe ~title: (title ^ " (Base58Check-encoded Sha256)") @@ + (describe ~title: (title ^ " (Base58Check-encoded Blake2B hash)") @@ conv to_b58check (Data_encoding.Json.wrap_error of_b58check_exn) string) let param ?(name=name) ?(desc=title) t = diff --git a/src/utils/hash.mli b/src/utils/hash.mli index a5437d2a9..91969c835 100644 --- a/src/utils/hash.mli +++ b/src/utils/hash.mli @@ -145,7 +145,7 @@ module type PrefixedName = sig val b58check_prefix : string end -(** Builds a new Hash type using Sha256. *) +(** Builds a new Hash type using Blake2B. *) module Make_minimal_Blake2B (Name : Name) : INTERNAL_MINIMAL_HASH module Make_Blake2B (Register : sig