Cryptosystems.

class sage.crypto.cryptosystem.Cryptosystem(plaintext_space, ciphertext_space, key_space, block_length=1, period=None)

A cryptosystem is a pair of maps

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

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 \mathrm{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.

__eq__(right)
__init__(plaintext_space, ciphertext_space, key_space, block_length=1, period=None)
block_length()
cipher_codomain()
cipher_domain()
ciphertext_space()
key_space()
period()
plaintext_space()
class sage.crypto.cryptosystem.PublicKeyCryptosystem(plaintext_space, ciphertext_space, key_space, block_length=1, period=None)
class sage.crypto.cryptosystem.SymmetricKeyCryptosystem(plaintext_space, ciphertext_space, key_space, block_length=1, period=None)

Previous topic

Cryptography

Next topic

Ciphers.

This Page