# Cryptography

## Hash

A hash *function* maps an `bytes`

value of arbitrary length to a fixed-length `bytes`

value, such that it is not possible to compute the input from a hashed value.

Builtins

## Signature

An *asymetric* signature pattern allows the *off-chain* signing of some data with the the secret key, and check *on-chain* the identity of the signer with its public key.

Types

Builtins

## Timelock

A *timelocked* value is encrypted strongly enough so that it will take more than a certain amount of time to crack it with a powerful computer, but weakly enough so that given some more time, this computer will manage to crack it. That is to say that, beyond a certain amount of time, a timelocked value may be considered public.

Learn more with this contract example.

Builtins

## Sapling

Sapling allows *anonymity* when transacting with fungible tokens.

Sapling requires a set of additional keys, similar to the public and private keys of your Tezos blockchain wallet. There is the viewing key and sending key. The viewing key is similar to the public key, where it allows you to see private transactions sent in and out.

more...

## Elliptic curves

Elliptic curves provide a fast and efficient asymetric encryption pattern.

Builtins