Odds and ends
This commit is contained in:
parent
e94185681f
commit
2326d6a4d7
16 changed files with 139 additions and 164 deletions
|
|
@ -71,14 +71,13 @@ func isZero(val []byte) bool {
|
|||
return acc == 1
|
||||
}
|
||||
|
||||
/* This function is not used as pervasively as it should because this is mostly impossible in Go at the moment */
|
||||
func setZero(arr []byte) {
|
||||
for i := range arr {
|
||||
arr[i] = 0
|
||||
}
|
||||
}
|
||||
|
||||
/* curve25519 wrappers */
|
||||
|
||||
func newPrivateKey() (sk NoisePrivateKey, err error) {
|
||||
// clamping: https://cr.yp.to/ecdh.html
|
||||
_, err = rand.Read(sk[:])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue