AesCtr

package module
v0.0.0-...-3cf02b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2017 License: BSD-3-Clause Imports: 5 Imported by: 1

README

AesCtr

GoDoc

  • use the festest golang aes ctr implement with golang 1.9
performance on my computer (mac)
  • go1.9.2 aes ctr (BenchmarkAESCTR1K_goAesCtr)
1000000	      2336 ns/op	 436.15 MB/s
  • CL 51670 (BenchmarkAESCTR1K_thisAesCtr)
3000000	       467 ns/op	2178.83 MB/s
LICENSE

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

how i get this package

Documentation

Overview

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.

Index

Constants

View Source
const BlockSize = 16

The AES block size in bytes.

Variables

This section is empty.

Functions

func NewCipher

func NewCipher(key []byte) (cipher.Block, error)

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.

Types

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Directories

Path Synopsis
internal
cipherhw
Package cipherhw exposes common functions for detecting whether hardware support for certain ciphers and authenticators is present.
Package cipherhw exposes common functions for detecting whether hardware support for certain ciphers and authenticators is present.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL