Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeVonNeumann = 0 ModeKaminsky = 1 )
Variables ¶
View Source
var MaxChunkSize = 1024
Functions ¶
func Kaminsky ¶
func Kaminsky(reader io.ByteReader, wait bool, blockSize int64) (*io.PipeReader, context.Context, context.CancelFunc)
The Von Neumann Debiasing algorithm works on pairs of bits, and produces output as follows: - If the input is "00" or "11", the input is discarded (no output). - If the input is "10", output a "1". - If the input is "01", output a "0".
Kaminsky addition: - collect discarded bytes - use discarded bytes as input for SHA512 - use the SHA512 hash as key for encrypting the output data with AES
func ShannonEntropy ¶ added in v0.2.0
func VonNeumann ¶
func VonNeumann(reader io.ByteReader, wait bool) (*io.PipeReader, context.Context, context.CancelFunc)
The Von Neumann Debiasing algorithm works on pairs of bits, and produces output as follows: - If the input is "00" or "11", the input is discarded (no output). - If the input is "10", output a "1". - If the input is "01", output a "0".
Types ¶
Click to show internal directories.
Click to hide internal directories.