Involved Source Filesaes_gcm.goblock.gocipher.gocipher_asm.go Package aes implements AES encryption (formerly Rijndael), as defined in
U.S. Federal Information Processing Standards Publication 197.
The AES operations in this package are not implemented using constant-time algorithms.
An exception is when running on systems with enabled hardware support for AES
that makes these operations constant-time. Examples include amd64 systems using AES-NI
extensions and s390x systems using Message-Security-Assist extensions.
On such systems, when the result of NewCipher is passed to cipher.NewGCM,
the GHASH operation used by GCM is also constant-time.modes.goasm_amd64.sgcm_amd64.s

Package-Level Type Names (total 9, in which 1 is exported)

aesCipherGCM implements crypto/cipher.gcmAble so that crypto/cipher.NewGCM
will use the optimised implementation in aes_gcm.go when possible.
Instances of this type only exist when hasGCMAsm returns true. Likewise,
the gcmAble implementation is in aes_gcm.go.aesCipherAsmaesCipherAsmaesCipherAsm.aesCipheraesCipheraesCipherAsm.aesCipher.dec[]uint32aesCipherAsm.aesCipher.enc[]uint32(*aesCipherGCM) BlockSize() int(*aesCipherGCM) Decrypt(dst, src []byte)(*aesCipherGCM) Encrypt(dst, src []byte) NewGCM returns the AES cipher wrapped in Galois Counter Mode. This is only
called by crypto/cipher.NewGCM via the gcmAble interface.
*aesCipherGCM : crypto/cipher.Block
*aesCipherGCM : gcmAble
*aesCipherGCM : crypto/cipher.gcmAble

cbcDecAble is implemented by cipher.Blocks that can provide an optimized
implementation of CBC decryption through the cipher.BlockMode interface.
See crypto/cipher/cbc.go.( cbcDecAble) NewCBCDecrypter(iv []byte) cipher.BlockMode
crypto/cipher.cbcDecAble(interface)
cbcDecAble : crypto/cipher.cbcDecAble

cbcEncAble is implemented by cipher.Blocks that can provide an optimized
implementation of CBC encryption through the cipher.BlockMode interface.
See crypto/cipher/cbc.go.( cbcEncAble) NewCBCEncrypter(iv []byte) cipher.BlockMode
crypto/cipher.cbcEncAble(interface)
cbcEncAble : crypto/cipher.cbcEncAble

ctrAble is implemented by cipher.Blocks that can provide an optimized
implementation of CTR through the cipher.Stream interface.
See crypto/cipher/ctr.go.( ctrAble) NewCTR(iv []byte) cipher.Stream
crypto/cipher.ctrAble(interface)
ctrAble : crypto/cipher.ctrAble

gcmAble is implemented by cipher.Blocks that can provide an optimized
implementation of GCM through the AEAD interface.
See crypto/cipher/gcm.go.( gcmAble) NewGCM(nonceSize, tagSize int) (cipher.AEAD, error)
*aesCipherGCM
crypto/cipher.gcmAble(interface)
gcmAble : crypto/cipher.gcmAble

ks is the key schedule, the length of which depends on the size of
the AES key. nonceSize contains the expected size of the nonce, in bytes. productTable contains pre-computed multiples of the binary-field
element used in GHASH. tagSize contains the size of the tag, in bytes.(*gcmAsm) NonceSize() int Open authenticates and decrypts ciphertext. See the cipher.AEAD interface
for details.(*gcmAsm) Overhead() int Seal encrypts and authenticates plaintext. See the cipher.AEAD interface for
details.
*gcmAsm : crypto/cipher.AEAD

Package-Level Functions (total 18, in which 1 is exported)

NewCipher creates and returns a new cipher.Block.
The key argument should be the AES key,
either 16, 24, or 32 bytes to select
AES-128, AES-192, or AES-256.

newCipherGeneric creates and returns a new cipher.Block
implemented in pure Go.

Rotate

sliceForAppend takes a slice and a requested number of bytes. It returns a
slice with the contents of the given slice followed by that many bytes and a
second slice that aliases into it and contains only the extra bytes. If the
original slice has sufficient capacity then no allocation is performed.

Apply sbox0 to each byte in w.

Package-Level Variables (total 14, none are exported)

AES is based on the mathematical behavior of binary polynomials
(polynomials over GF(2)) modulo the irreducible polynomial x⁸ + x⁴ + x³ + x + 1.
Addition of these binary polynomials corresponds to binary xor.
Reducing mod poly corresponds to binary xor with poly every
time a 0x100 bit appears.

The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.