bBlock // start counter as 64-bit limbs // start counter as 64-bit limbs // for XORKeyStream only(*CTR) XORKeyStream(dst, src []byte) XORKeyStreamAt behaves like XORKeyStream but keeps no state, and instead
seeks into the keystream by the given bytes offset from the start (ignoring
any XORKetStream calls). This allows for random access into the keystream, up
to 16 EiB from the start.
*CTR : crypto/cipher.Stream
func NewCTR(b *Block, iv []byte) *CTR
func newCTR(b *Block, iv []byte) CTR
func RoundToBlock(c *CTR)
blockExpanded is the block type used for all architectures except s390x,
which feeds the raw key directly to its instructions.dec[60]uint32 Round keys, where only the first (rounds + 1) × (128 ÷ 32) words are used.roundsint roundKeysSize returns the number of uint32 of c.end or c.dec that are used.
func decryptBlockGeneric(c *blockExpanded, dst, src []byte)
func encryptBlockGeneric(c *blockExpanded, dst, src []byte)
func expandKeyGeneric(c *blockExpanded, key []byte)
func newBlockExpanded(c *blockExpanded, key []byte)
Package-Level Functions (total 38, in which 7 are exported)
EncryptBlockInternal applies the AES encryption function to one block.
It is an internal function meant only for the gcm package.
EncryptionKeySchedule is used from the GCM implementation to access the
precomputed AES key schedule, to pass to the assembly implementation.
New creates and returns a new [cipher.Block] implementation.
The key argument should be the AES key, either 16, 24, or 32 bytes to select
AES-128, AES-192, or AES-256.
NewCBCDecrypter returns a [cipher.BlockMode] which decrypts in cipher block
chaining mode, using the given Block.
NewCBCEncrypter returns a [cipher.BlockMode] which encrypts in cipher block
chaining mode, using the given Block.
checkGenericIsExpected is called by the variable-time implementation to make
sure it is not used when hardware support is available. It shouldn't happen,
but this way it's more evidently correct.
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.7.6. (GOOS=linux GOARCH=amd64)