In
cryptography
Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
, a cryptosystem is a suite of
cryptographic algorithm
In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can deci ...
s needed to implement a particular security service, such as confidentiality (
encryption
In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decip ...
).
Typically, a cryptosystem consists of three algorithms: one for
key generation
Key generation is the process of generating keys in cryptography. A key is used to encrypt and decrypt whatever data is being encrypted/decrypted.
A device or program used to generate keys is called a key generator or keygen.
Generation in crypt ...
, one for encryption, and one for decryption. The term ''
cipher
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. An alternative, less common term is ''encipherment''. To encipher or encode i ...
'' (sometimes ''cypher'') is often used to refer to a pair of algorithms, one for encryption and one for decryption. Therefore, the term ''cryptosystem'' is most often used when the key generation algorithm is important. For this reason, the term ''cryptosystem'' is commonly used to refer to
public key
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic al ...
techniques; however both "cipher" and "cryptosystem" are used for
symmetric key
Symmetric-key algorithms are algorithms for cryptography that use the same cryptographic keys for both the encryption of plaintext and the decryption of ciphertext. The keys may be identical, or there may be a simple transformation to go between t ...
techniques.
Formal definition
Mathematically, a cryptosystem or encryption scheme can be defined as a
tuple
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
with the following properties.
#
is a set called the "plaintext space". Its elements are called plaintexts.
#
is a set called the "ciphertext space". Its elements are called ciphertexts.
#
is a set called the "key space". Its elements are called keys.
#
is a set of functions
. Its elements are called "encryption functions".
#
is a set of functions
. Its elements are called "decryption functions".
For each
, there is
such that
for all
.
Note; typically this definition is modified in order to distinguish an encryption scheme as being either a
symmetric-key or
public-key
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
type of cryptosystem.
Examples
A classical example of a cryptosystem is the
Caesar cipher. A more contemporary example is the
RSA cryptosystem.
References
Cryptography
{{crypto-stub