pylibressl.cipher.noauth

Module Contents

Classes

BaseCipherNoauth

Base symmetric cipher class (without AE).

AES256_CTR

AES 256-bit cipher in CTR (counter) mode.

AES256_CBC

AES 256-bit cipher in CBC (cipher block chaining) mode.

GOST89_CTR

GOST R 28147-89 256-bit cipher in CTR (counter) mode.

class pylibressl.cipher.noauth.BaseCipherNoauth(key, iv)

Bases: pylibressl.cipher.cipher.BaseCipher

Base symmetric cipher class (without AE).

_init_cipher_ctx(self, is_encrypt)

Initialise cipher context.

Should return cipher context cdata. It should be ready to do EVP_CipherUpdate.

encrypt(self, data)

Encrypt a message.

Parameters

data – data to encrypt as a byte string

Returns

encrypted message

decrypt(self, data)

Decrypt a message.

Parameters

data – data to encrypt as a byte string

Returns

decrypted message

class pylibressl.cipher.noauth.AES256_CTR(key, iv)

Bases: BaseCipherNoauth

AES 256-bit cipher in CTR (counter) mode.

_CIPHER_ID
_MODE
class pylibressl.cipher.noauth.AES256_CBC(key, iv)

Bases: BaseCipherNoauth

AES 256-bit cipher in CBC (cipher block chaining) mode.

_CIPHER_ID
_MODE
class pylibressl.cipher.noauth.GOST89_CTR(key, iv)

Bases: BaseCipherNoauth

GOST R 28147-89 256-bit cipher in CTR (counter) mode.

_CIPHER_ID
_MODE