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 ¶
const ( AontHashSize = 64 AontKeySize = 32 )
Variables ¶
This section is empty.
Functions ¶
func AontDecode ¶
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.