aont

package
v0.0.0-...-7757972 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Overview

All-Or-Nothing-Transform, based on OAEP.

This package implements OAEP (Optimal Asymmetric Encryption Padding) (http://cseweb.ucsd.edu/~mihir/papers/oaep.html) used there as All-Or-Nothing-Transformation (http://theory.lcs.mit.edu/~cis/pubs/rivest/fusion.ps). We do not fix OAEP parts length, instead we add hash-based checksum like in SAEP+ (http://crypto.stanford.edu/~dabo/abstracts/saep.html).

AONT takes 128-bit random r, data M to be encoded and produce the package PKG:

PKG = P1 || P2
 P1 = Salsa20(key=r, nonce=0x00, M || BLAKE2b(r || M) )
 P2 = BLAKE2b(P1) XOR r

Index

Constants

View Source
const (
	AontHashSize = 64
	AontKeySize  = 32
)

Variables

This section is empty.

Functions

func AontDecode

func AontDecode(in []byte) ([]byte, error)

Decode the data from AONT package. Data size will be smaller than the original one for 48 bytes.

func AontEncode

func AontEncode(key *[AontKeySize]byte, in []byte) ([]byte, error)

Encode the data, produce AONT package. Data size will be larger than the original one for 48 bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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