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

Class 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)
x.__init__(...) initializes x; see help(type(x)) for signature
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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

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,
...