tlslite.utils.aesgcm module

class tlslite.utils.aesgcm.AESGCM(key, implementation, rawAesEncrypt)

Bases: object

AES-GCM implementation. Note: this implementation does not attempt to be side-channel resistant. It’s also rather slow.

__init__(key, implementation, rawAesEncrypt)

Initialize self. See help(type(self)) for accurate signature.

open(nonce, ciphertext, data)

Decrypts and authenticates ciphertext using nonce and data. If the tag is valid, the plaintext is returned. If the tag is invalid, returns None.

seal(nonce, plaintext, data)

Encrypts and authenticates plaintext using nonce and data. Returns the ciphertext, consisting of the encrypted plaintext and tag concatenated.