BlockSizesource
const BlockSize = 16BlockSize is the AES block size in bytes.
| gcm | crypto/internal/fips140/v1.0.0-c2097c7c/aes/gcm |
const BlockSize = 16BlockSize is the AES block size in bytes.
func EncryptBlockInternal(c *Block, dst, src []byte)EncryptBlockInternal applies the AES encryption function to one block.
It is an internal function meant only for the gcm package.
func EncryptionKeySchedule(c *Block) []uint32EncryptionKeySchedule is used from the GCM implementation to access the precomputed AES key schedule, to pass to the assembly implementation.
func RoundToBlock(c *CTR)RoundToBlock is used by CTR_DRBG, which discards the rightmost unused bits at each request. It rounds the offset up to the next block boundary.
type Block struct {
// contains filtered or unexported fields
}A Block is an instance of AES using a particular key. It is safe for concurrent use.
type CBCDecrypter struct {
// contains filtered or unexported fields
}func NewCBCDecrypter(b *Block, iv [BlockSize]byte) *CBCDecrypterNewCBCDecrypter returns a [cipher.BlockMode] which decrypts in cipher block chaining mode, using the given Block.
type CBCEncrypter struct {
// contains filtered or unexported fields
}func NewCBCEncrypter(b *Block, iv [BlockSize]byte) *CBCEncrypterNewCBCEncrypter returns a [cipher.BlockMode] which encrypts in cipher block chaining mode, using the given Block.
type CTR struct {
// contains filtered or unexported fields
}func (c *CTR) XORKeyStream(dst, src []byte)func (c *CTR) XORKeyStreamAt(dst, src []byte, offset uint64)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.
type KeySizeError int