docs/book/src/blockchain-development/hashing_and_cryptography.md
The Sway standard library provides easy access to a selection of cryptographic hash functions (sha256 and EVM-compatible keccak256), and EVM-compatible secp256k1-based signature recovery operations.
{{#include ../../../../examples/hashing/src/main.sw}}
Fuel supports 3 asymmetric cryptographic signature schemes; Secp256k1, Secp256r1, and Ed25519.
Given a Signature and a sign Message, you can recover a PublicKey.
{{#include ../../../../examples/signatures/src/main.sw:public_key_recovery}}
Given a Signature and signed Message, you can recover a Fuel Address.
{{#include ../../../../examples/signatures/src/main.sw:address_recovery}}
Recovery of EVM addresses is also supported.
{{#include ../../../../examples/signatures/src/main.sw:evm_address_recovery}}
Given a Signature, PublicKey, and Message, you can verify that the message was signed using the public key.
{{#include ../../../../examples/signatures/src/main.sw:signature_verification}}
Given a Signature, Address, and Message, you can verify that the message was signed by the address.
{{#include ../../../../examples/signatures/src/main.sw:address_verification}}
Recovery of EVM addresses verification is also supported.
{{#include ../../../../examples/signatures/src/main.sw:evm_address_verification}}