diff --git a/cspell.json b/cspell.json index 1f43b220602..512d9d29a07 100644 --- a/cspell.json +++ b/cspell.json @@ -255,6 +255,7 @@ "repr", "reqwest", "rfind", + "ripemd", "RMVD", "rngs", "rustc", diff --git a/docs/docs/noir/standard_library/cryptographic_primitives/hashes.mdx b/docs/docs/noir/standard_library/cryptographic_primitives/hashes.mdx index f1f15a6c9b0..e02a37b807b 100644 --- a/docs/docs/noir/standard_library/cryptographic_primitives/hashes.mdx +++ b/docs/docs/noir/standard_library/cryptographic_primitives/hashes.mdx @@ -9,10 +9,28 @@ sidebar_position: 0 import BlackBoxInfo from '@site/src/components/Notes/_blackbox'; +Many of the common hash methods have been moved outside of the Noir standard library and exist as independent libraries. +You can find the complete list of libraries in the [Hashes section](https://github.com/noir-lang/awesome-noir?tab=readme-ov-file#hashes) +of the awesome-noir repo, including: + +- keccak256 +- MiMC +- Poseidon +- RIPEMD160 +- sha256 +- sha512 + + ## sha256 compression Performs a sha256 compression on an input and initial state, returning the resulting state. +:::warning + +This is a different function than sha256. See [this library](https://github.com/noir-lang/sha256) for sha256 hashing. + +::: + #include_code sha256_compression noir_stdlib/src/hash/mod.nr rust diff --git a/docs/versioned_docs/version-v1.0.0-beta.6/noir/standard_library/cryptographic_primitives/hashes.mdx b/docs/versioned_docs/version-v1.0.0-beta.6/noir/standard_library/cryptographic_primitives/hashes.mdx index 5c14b480c01..4f81704d713 100644 --- a/docs/versioned_docs/version-v1.0.0-beta.6/noir/standard_library/cryptographic_primitives/hashes.mdx +++ b/docs/versioned_docs/version-v1.0.0-beta.6/noir/standard_library/cryptographic_primitives/hashes.mdx @@ -9,10 +9,28 @@ sidebar_position: 0 import BlackBoxInfo from '@site/src/components/Notes/_blackbox'; +Many of the common hash methods have been moved outside of the Noir standard library and exist as independent libraries. +You can find the complete list of libraries in the [Hashes section](https://github.com/noir-lang/awesome-noir?tab=readme-ov-file#hashes) +of the awesome-noir repo, including: + +- keccak256 +- MiMC +- Poseidon +- RIPEMD160 +- sha256 +- sha512 + + ## sha256 compression Performs a sha256 compression on an input and initial state, returning the resulting state. +:::warning + +This is a different function than sha256. See [this library](https://github.com/noir-lang/sha256) for sha256 hashing. + +::: + ```rust title="sha256_compression" showLineNumbers pub fn sha256_compression(input: [u32; 16], state: [u32; 8]) -> [u32; 8] {} ``` diff --git a/docs/versioned_docs/version-v1.0.0-beta.7/noir/standard_library/cryptographic_primitives/hashes.mdx b/docs/versioned_docs/version-v1.0.0-beta.7/noir/standard_library/cryptographic_primitives/hashes.mdx index 7d177d0f370..0dc87e16d69 100644 --- a/docs/versioned_docs/version-v1.0.0-beta.7/noir/standard_library/cryptographic_primitives/hashes.mdx +++ b/docs/versioned_docs/version-v1.0.0-beta.7/noir/standard_library/cryptographic_primitives/hashes.mdx @@ -9,10 +9,28 @@ sidebar_position: 0 import BlackBoxInfo from '@site/src/components/Notes/_blackbox'; +Many of the common hash methods have been moved outside of the Noir standard library and exist as independent libraries. +You can find the complete list of libraries in the [Hashes section](https://github.com/noir-lang/awesome-noir?tab=readme-ov-file#hashes) +of the awesome-noir repo, including: + +- keccak256 +- MiMC +- Poseidon +- RIPEMD160 +- sha256 +- sha512 + + ## sha256 compression Performs a sha256 compression on an input and initial state, returning the resulting state. +:::warning + +This is a different function than sha256. See [this library](https://github.com/noir-lang/sha256) for sha256 hashing. + +::: + ```rust title="sha256_compression" showLineNumbers pub fn sha256_compression(input: [u32; 16], state: [u32; 8]) -> [u32; 8] {} ``` diff --git a/docs/versioned_docs/version-v1.0.0-beta.8/noir/standard_library/cryptographic_primitives/hashes.mdx b/docs/versioned_docs/version-v1.0.0-beta.8/noir/standard_library/cryptographic_primitives/hashes.mdx index e0e5b30d21c..a5d38158af6 100644 --- a/docs/versioned_docs/version-v1.0.0-beta.8/noir/standard_library/cryptographic_primitives/hashes.mdx +++ b/docs/versioned_docs/version-v1.0.0-beta.8/noir/standard_library/cryptographic_primitives/hashes.mdx @@ -9,10 +9,27 @@ sidebar_position: 0 import BlackBoxInfo from '@site/src/components/Notes/_blackbox'; +Many of the common hash methods have been moved outside of the Noir standard library and exist as independent libraries. +You can find the complete list of libraries in the [Hashes section](https://github.com/noir-lang/awesome-noir?tab=readme-ov-file#hashes) +of the awesome-noir repo, including: + +- keccak256 +- MiMC +- Poseidon +- RIPEMD160 +- sha256 +- sha512 + ## sha256 compression Performs a sha256 compression on an input and initial state, returning the resulting state. +:::warning + +This is a different function than sha256. See [this library](https://github.com/noir-lang/sha256) for sha256 hashing. + +::: + ```rust title="sha256_compression" showLineNumbers pub fn sha256_compression(input: [u32; 16], state: [u32; 8]) -> [u32; 8] {} ```