Package tlslite :: Package utils :: Module aesgcm :: Class AESGCM
[hide private]
[frames] | no frames]

type AESGCM

source code


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

Instance Methods [hide private]
 
__init__(self, key, implementation, rawAesEncrypt) source code
 
_auth(self, ciphertext, ad, tagMask) source code
 
_mul(self, y)
Returns y*H, where H is the GCM key.
source code
 
_rawAesCtrEncrypt(self, counter, inp)
Encrypts (or decrypts) plaintext with AES-CTR.
source code
 
_update(self, y, data) source code
 
open(self, nonce, ciphertext, data)
Decrypts and authenticates ciphertext using nonce and data.
source code
 
seal(self, nonce, plaintext, data)
Encrypts and authenticates plaintext using nonce and data.
source code
Static Methods [hide private]
 
_gcmAdd(x, y) source code
 
_gcmShift(x) source code
 
_inc32(counter) source code
 
_reverseBits(i) source code
Class Variables [hide private]
  _gcmReductionTable = [0, 7200, 14400, 9312, 28800, 27808, 1862...
Method Details [hide private]

__init__(self, key, implementation, rawAesEncrypt)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

_rawAesCtrEncrypt(self, counter, inp)

source code 

Encrypts (or decrypts) plaintext with AES-CTR. counter is modified.

open(self, nonce, ciphertext, data)

source code 

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(self, nonce, plaintext, data)

source code 

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


Class Variable Details [hide private]

_gcmReductionTable

Value:
[0,
 7200,
 14400,
 9312,
 28800,
 27808,
 18624,
 21728,
...