aesgcm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(key []byte, packed []byte) (plaintext, extra []byte, err error)

produce the plaintext and extra data from the packet created by Seal

The key must be the same as the one used for encryption. Produce an error if the message cannot be authenticated.

func Seal

func Seal(key, plaintext, extra []byte) (msg []byte, err error)

produce a packet

signature: "aGCM"
noncelen: uint8(12)
extralen: uint8
nonce: radomly generated
extra:
sealed: plaintext authenticated and encrypted with key
        extra is also authenticated

Note that the design of crypto/cipher.AEAD makes it difficult at best
to create a streaming interface. We are stuck with a message-oriented
protocol unless we want to reimplement the GCM.  This may or may not
be a bad thing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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