An encryption scheme (or cipher) consists of a set and a corresponding set with the property that for each there is a unique such that .

i.e.

The keys and above form a key pair, sometimes denoted by . (they can be identical in the case of a symmetric key)