memguardaes

package module
v0.0.0-...-28ec49a Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: BSD-3-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MemguardAES

MemguardAES is AES implementation for GoLang that uses Memguard library to destroy key data after encryption/decryption. Correct usage is:

mciph, err := memguardaes.Cipher(key)
if err!=nil { ... }
defer mciph.Destroy()

This version works with MeguardAES from 2019.11. License: same as in GoLang - BSD-style license.

About: memlock

Sometime Linux memlock limit is too small to run tests of this library. If you have problems with passing tests, then set up greater limits in /etc/security/limits.conf by adding/changing following lines:

*               hard     memlock         XXX
*               soft     memlock         XXX

where XXX is number of kilobytes of memlock limit. Recommended value is equal or greater than 128 (can be greater).

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

This section is empty.

Types

type BlockMG

type BlockMG interface {
	cipher.Block

	Destroy()
}

func NewCipher

func NewCipher(key []byte) (BlockMG, 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.

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
⌂ 换网址