tweetnacl-go: version 1.00.0
TweetNaCl - GO port
tweetnacl-go is a port of Dan Bernstein's TweetNaCl "crypto library in a 100 tweets" code to the Go language. It is implemented as a wrapper around the original code to preserve the design and timing characteristics of the original implementation.
The Go wrapper has been kept as 'thin' as possible to avoid compromising the careful design and coding of the original TweetNaCl implementation. However, cryptography being what it is, the wrapper may have (entirely inadvertently) introduced non-obvious vulnerabilities (for instance How to zero a buffer). So ....
USE ENTIRELY AT YOUR OWN RISK !
- There is an existing port of TweetNaCl to Go (go-tweetnacl) which reimplements the C code in Go.
- The cgo FFI doesn't handle zero length byte arrays particularly elegantly (see discussion at Passing zero length Go byte array to a C function). The conversion to a (*C.uchar) pointer has been abstracted into a convenience function makePtr, which includes a commented out version that returns nil for a zero length array if you prefer not to use the esoteric 'unsafe' version.
- Fork go-tweetnacl and merge code
- TweetNaCl: A crypto library in 100 tweets
- Cryptography in NaCl
- TweetNaCl: How cr.yp.to’s developers got carried away by the carry bit
- NaCl: Cryptography for the Internet
- On NaCl: Undefined Behaviour
- Safe, Efficient, and Portable Rotate in C/C++
- How to zero a buffer
- Zeroing buffers is insufficient
- How to zero a buffer: Erratum
- On the Impending Crypto Monoculture
- Passing zero length Go byte array to a C function