}
hle := make([]byte, gcmBlockSize)
- g.cipher.Encrypt(hle, hle)
+ aes.EncryptBlockInternal(&g.cipher, hle, hle)
// Reverse the bytes in each 8 byte chunk
// Load little endian, store big endian
var counter, tagMask [gcmBlockSize]byte
deriveCounter(&counter, nonce, &g.productTable)
- g.cipher.Encrypt(tagMask[:], counter[:])
+ aes.EncryptBlockInternal(&g.cipher, tagMask[:], counter[:])
gcmInc32(&counter)
counterCrypt(&g.cipher, out, plaintext, &counter)
var counter, tagMask [gcmBlockSize]byte
deriveCounter(&counter, nonce, &g.productTable)
- g.cipher.Encrypt(tagMask[:], counter[:])
+ aes.EncryptBlockInternal(&g.cipher, tagMask[:], counter[:])
gcmInc32(&counter)
var expectedTag [gcmTagSize]byte
return
}
// Note that hashKey is also used in the KMA codepath to hash large nonces.
- g.cipher.Encrypt(g.hashKey[:], g.hashKey[:])
+ aes.EncryptBlockInternal(&g.cipher, g.hashKey[:], g.hashKey[:])
}
// ghashAsm uses the GHASH algorithm to hash data with the given key. The initial
}
if len(src) > 0 {
var x [16]byte
- g.cipher.Encrypt(x[:], cnt[:])
+ aes.EncryptBlockInternal(&g.cipher, x[:], cnt[:])
for i := range src {
dst[i] = src[i] ^ x[i]
}