aes

package
v1.21.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

パッケージaesは、U.S.連邦情報処理標準出版物197で定義されているAES暗号(以前はRijndaelとして知られていた)を実装しています。

このパッケージのAES操作は、定数時間アルゴリズムを使用して実装されていません。 ただし、AESのハードウェアサポートが有効なシステムで実行される場合は例外です。 これらの操作は、AES-NI拡張を使用しているamd64システムや Message-Security-Assist拡張を使用しているs390xシステムなどが該当します。 このようなシステムでは、NewCipherの結果がcipher.NewGCMに渡される場合、 GCMで使用されるGHASH操作も定数時間です。

Index

Constants

View Source
const BlockSize = 16

AESのブロックサイズ(バイト単位)。

Variables

This section is empty.

Functions

func NewCipher

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

NewCipherは新しいcipher.Blockを作成して返します。 key引数はAESキーである必要があります。 AES-128、AES-192、またはAES-256を選択するために、 16バイト、24バイト、または32バイトのいずれかを指定します。

Types

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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