Skip to main content
Version: 1.5.0

crypto

Cryptographic primitives

let blake2b: (_: bytes) => bytes

Compute the cryptographic hash of the top of the stack using the Blake2b-256 cryptographic hash function.

let sha256: (_: bytes) => bytes

Compute the cryptographic hash of the top of the stack using the SHA-256 cryptographic hash function.

let sha512: (_: bytes) => bytes

Compute the cryptographic hash of the top of the stack using the SHA-512 cryptographic hash function.

let sha3: (_: bytes) => bytes

Compute the cryptographic hash of the top of the stack using the SHA3-256 cryptographic hash function.

let keccak: (_: bytes) => bytes

Compute the cryptographic hash of the top of the stack using the Keccak-256 cryptographic hash function.

let hash_key: (_: key) => key_hash

The call hash_key(k) computes the Base58Check of the public key k.

let check: (_: key) => (_: signature) => (_: bytes) => bool

The call check(k, s, b) verifies that the byte sequence b has been signed with the key k: it is true if, and only if, the signature s is a valid signature of the byte sequence created with k.