summaryrefslogtreecommitdiff
path: root/csrand
AgeCommit message (Collapse)Author
2014-08-17Massive cleanup/code reorg.Yawning Angel
* Changed obfs4proxy to be more like obfsproxy in terms of design, including being an easy framework for developing new TCP/IP style pluggable transports. * Added support for also acting as an obfs2/obfs3 client or bridge as a transition measure (and because the code itself is trivial). * Massively cleaned up the obfs4 and related code to be easier to read, and more idiomatic Go-like in style. * To ease deployment, obfs4proxy will now autogenerate the node-id, curve25519 keypair, and drbg seed if none are specified, and save them to a JSON file in the pt_state directory (Fixes Tor bug #12605).
2014-06-19Use Vose's Alias Method to sample the weighted distribution.Yawning Angel
The weight generation code also was cleaned up (and now can support generating distributions that look like what ScrambleSuit does as a compile time change). Per: http://www.keithschwarz.com/darts-dice-coins/
2014-05-28Change the weighted distribution algorithm be uniform.Yawning Angel
The old way was biasted towards the earlier values. Thanks to asn for pointing this out and suggesting an alternative. As an additional tweak, do not reuse the drbg seed when calculating the IAT distribution, but instead run the seed through SHA256 first, for extra tinfoil goodness.
2014-05-26Use io.ReadFull in places where it is appropriate.Yawning Angel
2014-05-24Don't use math/big when generating random numbers.Yawning Angel
2014-05-24Move utils.go to csrand/csrand.go, and clean up the interface.Yawning Angel
All of the obfs4 code except unit tests now uses the csrand wrapper routines.