summaryrefslogtreecommitdiff
path: root/src/keypair.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/keypair.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/keypair.go b/src/keypair.go
index e434c74..e7961a8 100644
--- a/src/keypair.go
+++ b/src/keypair.go
@@ -2,11 +2,20 @@ package main
import (
"crypto/cipher"
+ "sync"
)
type KeyPair struct {
recv cipher.AEAD
- recvNonce NoiseNonce
+ recvNonce uint64
send cipher.AEAD
- sendNonce NoiseNonce
+ sendNonce uint64
+}
+
+type KeyPairs struct {
+ mutex sync.RWMutex
+ current *KeyPair
+ previous *KeyPair
+ next *KeyPair
+ newKeyPair chan bool
}