diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-26 13:14:02 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-26 13:14:02 +0200 |
commit | 9d806d3853c926df75e83966d2c4f832708a1b08 (patch) | |
tree | 97dd50a56751d5cb48b60353697aa9ccad9a3e14 /src/keypair.go | |
parent | cf3a5130d3aa53fc56c7c3194ee326d5a1d21970 (diff) |
Begin work on outbound packet flow
Diffstat (limited to 'src/keypair.go')
-rw-r--r-- | src/keypair.go | 13 |
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 } |