17.1 Cryptosystems

Module: sage.crypto.cryptosystem

Cryptosystems.

Class: Cryptosystem

class Cryptosystem
A cryptosystem is a pair of maps

$\displaystyle E : {\mathcal K} \rightarrow {\rm Hom}({\mathcal M},{\mathcal C})
$

$\displaystyle D : {\mathcal K} \rightarrow {\rm Hom}({\mathcal C},{\mathcal M})
$

where $ {\mathcal K}$ is the keyspace, $ {\mathcal M}$ is the plaintext or message space, and $ {\mathcal C}$ is the ciphertext space. In many instances $ {\mathcal M} = {\mathcal C}$ and the images will lie in $ {\rm Aut}({\mathcal M})$ . An element of the image of $ E$ is called a cipher.

We may assume that $ E$ and $ D$ are injective, hence identify a key $ K$ in $ {\mathcal K}$ with its image $ E_K := E(K)$ in $ \Hom ({\mathcal M},{\mathcal C})$ .

The cryptosystem has the property that for every encryption key $ K_1$ there is a decryption key $ K_2$ such that $ D_{K_2} \circ E_{K_1}$ . A cryptosystem with the property that $ K := K_2 = K_1$ , is called a symmetric cryptosystem. Otherwise, if the key $ K_2 \ne K_1$ , nor is $ K_2$ easily derived from $ K_1$ , we call the cryptosystem asymmetric of public key. In that case, $ K_1$ is called the public key and $ K_2$ is called the private key.

Cryptosystem( self, plaintext_space, ciphertext_space, key_space, [block_length=1], [period=None])

Functions: block_length,$ \,$ cipher_codomain,$ \,$ cipher_domain,$ \,$ ciphertext_space,$ \,$ key_space,$ \,$ period,$ \,$ plaintext_space

Special Functions: __eq__,$ \,$ __init__

Class: PublicKeyCryptosystem

class PublicKeyCryptosystem

Class: SymmetricKeyCryptosystem

class SymmetricKeyCryptosystem

See About this document... for information on suggesting changes.