diff options
Diffstat (limited to 'src/noise_helpers.go')
-rw-r--r-- | src/noise_helpers.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/noise_helpers.go b/src/noise_helpers.go index 1e622a5..105f78f 100644 --- a/src/noise_helpers.go +++ b/src/noise_helpers.go @@ -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) { |