Documentation
¶
Overview ¶
The GCM package provides an implementation of the Galois/Counter Mode of operation for symmetric block ciphers. It provides authenticated encryption, meaning that it both encrypts content and generates an authentication tag similar to an HMAC operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GaloisCounterMode ¶
type GaloisCounterMode interface { // BlockSize returns the mode's block size. BlockSize() int // Encrypts plaintext along with some additional authenticated data, returning // the encrypted output along with an authentication tag. Encrypt(src io.Reader, aad []byte) (enc, tag []byte) // Decrypts data encoded by Encrypt(). Input also requires the additional // authenticated data passed to Encrypt() and the authentication tag returned // by that function. Internally the tag is verified before any attempt is made // do actually decrypt the input ciphertext. Decrypt(ciphertext, aad, tag []byte) ([]byte, error) }
This cryptography mode encompasses both encryption and authentication of data. Due to its differing inputs and outputs, it doesn't conform to the cipher.Cipher interface, instead providing separate Encrypt() and Decrypt() methods.
Click to show internal directories.
Click to hide internal directories.