Is there an option to calculate SHA3-256 hashes in .NET Core? The goal is to recreate the isChecksumAddress
util function in web3.js
SHA-3 (and its variants SHA3-224, SHA3-256, SHA3-384, SHA3-512), is considered more secure than SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512) for the same hash length. For example, SHA3-256 provides more cryptographic strength than SHA-256 for the same hash length (256 bits).
SHA3-256 belongs to the SHA-3 family of cryptographic hashes, as specified in FIPS 202. The hash function produces the 256 bit digest of a message: >>> from Crypto.Hash import SHA3_256 >>> >>> h_obj = SHA3_256.
SHA3-256 – hash is 256 bits long. SHA3-384 – hash is 384 bits long. SHA3-512 – hash is 512 bits long.
Nope. It's just a different construction. SHA3-512 is sponge while SHA-512 is Merkle-Damgard.
No, there is no way of doing that now with pure dotnet core.
It's been on the watch list since it was announced. Since we don't implement cryptographic algorithms within .NET we're waiting on support from the underlying platforms (Windows CNG, Apple Security.framework, and OpenSSL).
See this issue.
But you might have a better luck with BouncyCastle. It has an implementation here but I don't know if it is out yet (in nuget).
FIPS-202 SHA3-256 (and all other SHA3 variants, e.g. SHA3-512, SHA3-SHAKE256) are implemented here, in pure .NET, with no dependencies on external APIs like BouncyCastle.
GitHub
https://github.com/series0ne/CORE/tree/master/Core/Security/Cryptography
Nuget
https://www.nuget.org/packages/SeriesOne.Core/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With