ascon80pq

package
v0.0.0-...-35e9a2a Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package ascon80pq implements the system described at https://ascon.iaik.tugraz.at. This lightweight AuthenticatedEncryptionAssociatedData cipher uses a 20 byte key and 16 byte nonce, producing ciphertext of the same length as the plaintext plus a 16 byte authentication tag.

Index

Constants

This section is empty.

Variables

View Source
var BadVerify = errors.New("ASCON decrypt verify failed! Do not use any partial results.")

Functions

func Decrypt

func Decrypt(plaintext io.Writer, ciphertext io.Reader, ad, key []byte) error

Function Decrypt reads nonce and ciphertext from the input stream, decrypts using key and ad, and writes plaintext to the output stream. If verification at the end fails, error will be non-nil and caller should ignore the plaintext, including wiping any partial results already sent to disk. (It would be better to do that here, but is infeasible in one pass. For sample use, see command paxz. See also imperialviolet.org 2014/06/27.)

func Encrypt

func Encrypt(ciphertext io.Writer, plaintext io.Reader, ad, nonce, key []byte)

Function Encrypt reads plaintext from the input stream, encrypts using key, and writes ciphertext || tag to the output stream. ad may be empty. The nonce must not be reused!

Types

This section is empty.

Jump to

Keyboard shortcuts

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