xaes256gcm

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: ISC Imports: 4 Imported by: 0

README

import "filippo.io/xaes256gcm"

Package xaes256gcm implements the XAES-256-GCM extended-nonce AEAD, an efficient combination of a NIST SP 800-108r1 KDF and AES-256-GCM.

Documentation

Overview

Package xaes256gcm implements the XAES-256-GCM extended-nonce AEAD, an efficient combination of a NIST SP 800-108r1 KDF and AES-256-GCM.

Index

Constants

View Source
const KeySize = 32

KeySize is the size of XAES-256-GCM keys.

View Source
const NonceSize = 24

NonceSize is the size of nonces that must be passed to Seal and Open, if the AEAD was created with NewWithManualNonces.

View Source
const Overhead = 40

Overhead is the difference between the lengths of a plaintext and its ciphertext, if the AEAD was created with [New]. It includes the length of the randomly-generated and automatically-managed nonce.

View Source
const OverheadWithManualNonces = 16

OverheadWithManualNonces is the difference between the lengths of a plaintext and its ciphertext, if the AEAD was created with NewWithManualNonces.

Variables

This section is empty.

Functions

func NewWithManualNonces

func NewWithManualNonces(key []byte) (cipher.AEAD, error)

NewWithManualNonces returns a new XAES-256-GCM instance that expects 24-byte nonces to be passed to Open and Seal. nonces can be safely generated with crypto/rand.Read. key must be exactly 32 bytes long.

Most applications should use [New] instead, which automatically generates random nonces and prepends them to the ciphertext. (Note that New is not implemented yet.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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