summaryrefslogtreecommitdiffhomepage
path: root/src/peer.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-05-30 22:36:49 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-05-30 22:36:49 +0200
commit1eebdf88a320824b8f155caa1d5c725c38d51de8 (patch)
treec405eff6416526a6627afa84291fa27660148f1a /src/peer.go
parent6bd0b2fbe220a23c2370ebda01f7968d3bea0118 (diff)
Beginning work on UAPI and routing table
Diffstat (limited to 'src/peer.go')
-rw-r--r--src/peer.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/peer.go b/src/peer.go
new file mode 100644
index 0000000..7c000da
--- /dev/null
+++ b/src/peer.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "sync"
+)
+
+type KeyPair struct {
+ recieveKey NoiseSymmetricKey
+ recieveNonce NoiseNonce
+ sendKey NoiseSymmetricKey
+ sendNonce NoiseNonce
+}
+
+type Peer struct {
+ mutex sync.RWMutex
+ publicKey NoisePublicKey
+ presharedKey NoiseSymmetricKey
+}