# crypto · Rell standard library · Chromia Docs (concept)

> Cryptographic functions. Functions eth_ecrecover Compute an Ethererum public key from a signature and a hash. eth_privkey_to_address Compute a 20-byte Ethe

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/

PACKAGE

# crypto

Cryptographic functions.

## Functions

[eth\_ecrecover](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/eth_ecrecover/)
:   Compute an Ethererum public key from a signature and a hash.

[eth\_privkey\_to\_address](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/eth_privkey_to_address/)
:   Compute a 20-byte Ethereum address from a 32-byte private key.

[eth\_pubkey\_to\_address](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/eth_pubkey_to_address/)
:   Compute a 20-byte Ethereum address from a public key.

[eth\_sign](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/eth_sign/)
:   Compute an Ethereum signature.

[get\_signature](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/get_signature/)
:   Sign a 32-byte array with a 32-byte private key using the ECDSA (secp256k1) algorithm.

[keccak256](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/keccak256/)
:   Compute the Keccak256 digest (hash) of the given byte array.

[privkey\_to\_pubkey](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/privkey_to_pubkey/)
:   Compute a public key from a 32-byte private key.

[pubkey\_encode](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/pubkey_encode/)
:   Convert between public key formats.

[pubkey\_to\_xy](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/pubkey_to_xy/)
:   Extract the x and y coordinates from an EC point public key. The extracted point is a tuple

[sha256](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/sha256/)
:   Compute the SHA-256 digest (hash) of the given byte array.

[verify\_signature](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/verify_signature/)
:   Verify a signature against a message and public key.

[xy\_to\_pubkey](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/crypto/xy_to_pubkey/)
:   Construct a public key from EC point x and y coordinates. The given x and y coordinates must

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/crypto/index.html)Generated API reference, mirrored from the live docs
