siv

package module
v0.0.0-...-0b757b3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: BSD-3-Clause Imports: 9 Imported by: 5

README

AES-GCM-SIV

Go Reference

Nonce misuse-resistant AEAD

Installation

go get github.com/ericlagergren/siv@latest

Performance

TBD

Security

Disclosure

This project uses full disclosure. If you find a security bug in an implementation, please e-mail me or create a GitHub issue.

Disclaimer

You should only use cryptography libraries that have been reviewed by cryptographers or cryptography engineers. While I am a cryptography engineer, I'm not your cryptography engineer, and I have not had this project reviewed by any other cryptographers.

Documentation

Overview

Package siv implements AES-GCM-SIV per RFC 8452.

Index

Constants

View Source
const (
	// NonceSize is the size in bytes of an AES-GCM-SIV nonce.
	NonceSize = 12
	// TagSize is the size in bytes of an AES-GCM-SIV
	// authentication tag.
	TagSize = 16
	// MaxPlaintextSize is the size in bytes of the largest
	// allowed plaintext.
	MaxPlaintextSize = 1 << 36
	// MaxAdditionalDataSize is the size in bytes of the largest
	// allowed additional authenticated data.
	MaxAdditionalDataSize = 1 << 36
)

Variables

This section is empty.

Functions

func NewGCM

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

NewGCM creates an instance of AES-GCM-SIV.

The key must be either 16 bytes for 128-bit AES-GCM-SIV or 32 bytes for 256-bit AES-GCM-SIV. All other lengths are an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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