Begin work on outbound packet flow

This commit is contained in:
Mathias Hall-Andersen
2017-06-26 13:14:02 +02:00
parent cf3a5130d3
commit 9d806d3853
9 changed files with 319 additions and 99 deletions

View File

@@ -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
}