summaryrefslogtreecommitdiffhomepage
path: root/src/keypair.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-26 13:14:02 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-26 13:14:02 +0200
commit9d806d3853c926df75e83966d2c4f832708a1b08 (patch)
tree97dd50a56751d5cb48b60353697aa9ccad9a3e14 /src/keypair.go
parentcf3a5130d3aa53fc56c7c3194ee326d5a1d21970 (diff)
Begin work on outbound packet flow
Diffstat (limited to 'src/keypair.go')
-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
}