First set of code review patches

This commit is contained in:
Mathias Hall-Andersen
2017-08-04 16:15:53 +02:00
parent 22c83f4b8d
commit 8c34c4cbb3
15 changed files with 315 additions and 182 deletions
+8
View File
@@ -47,6 +47,14 @@ func KDF3(key []byte, input []byte) (t0 [blake2s.Size]byte, t1 [blake2s.Size]byt
return
}
func isZero(val []byte) bool {
var acc byte
for _, b := range val {
acc |= b
}
return acc == 0
}
/* curve25519 wrappers */
func newPrivateKey() (sk NoisePrivateKey, err error) {