Documentation ¶
Overview ¶
Chaffing-and-Winnowing.
This package implements Chaffing-and-Winnowing technology (http://people.csail.mit.edu/rivest/chaffing-980701.txt).
It outputs two Poly1305 MACs for each bit of input data: one valid, and other is not. MACs sequence is following:
MAC of 1st byte, 1st bit, 0 possible value MAC of 1st byte, 1st bit, 1 possible value MAC of 1st byte, 2nd bit, 0 possible value MAC of 1st byte, 2nd bit, 1 possible value ...
If bit value is 0, then first MAC is taken over "1" and the second one is over "0". If bit value is 1, then first is taken over "0" and second is over "1".
Poly1305 uses 256-bit one-time key. We generate it using XSalsa20 for for the whole byte at once (16 MACs).
MACKey1, MACKey2, ... = XSalsa20(authKey, nonce, 0x00...) nonce = prefix || 0x00... || big endian byte number
Index ¶
Constants ¶
View Source
const (
EnlargeFactor = 16 * poly1305.TagSize
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.