Classical Ciphers

class sage.crypto.classical_cipher.AffineCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Affine cipher class. This is the class that does the actual work of encryption and decryption. Users should not directly instantiate or create objects of this class. Instead, functionalities of this class should be accessed via AffineCryptosystem as the latter provides a convenient user interface.

class sage.crypto.classical_cipher.HillCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Hill cipher class

inverse()[source]
class sage.crypto.classical_cipher.ShiftCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Shift cipher class. This is the class that does the actual work of encryption and decryption. Users should not directly instantiate or create objects of this class. Instead, functionalities of this class should be accessed via ShiftCryptosystem as the latter provides a convenient user interface.

class sage.crypto.classical_cipher.SubstitutionCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Substitution cipher class

inverse()[source]
class sage.crypto.classical_cipher.TranspositionCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Transition cipher class

inverse()[source]
class sage.crypto.classical_cipher.VigenereCipher(parent, key)[source]

Bases: SymmetricKeyCipher

Vigenere cipher class

inverse()[source]