19 Commits

Author SHA1 Message Date
Jonathan Rudenberg
f9b5bb75e2 Use HTTPS for Noise website
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2017-12-28 18:14:00 -05:00
David Wong
fc3a9f3b3c Removed the XR pattern and added the initiator check in WriteMessage and ReadMessage according to spec (#22)
* removed the XR pattern and added the initiator check in WriteMessage and ReadMessage according to spec

* removed extra space I shouldn't have added

* fixed vectors

* re-generated via vectorgen
2017-09-27 19:37:07 -04:00
David Stainton
39e9953cb9 Add the Rekey feature as described in spec
Signed-off-by: David Stainton <dstainton415@gmail.com>
2017-07-11 17:07:19 +00:00
David Stainton
b519438a73 gofmt
Signed-off-by: David Stainton <dstainton415@gmail.com>
2017-07-11 17:07:04 +00:00
Jason A. Donenfeld
6a0d1cad82 psk mode: update for redesign
The PSK mode has been redesigned in the latest revision of Noise, which
WireGuard is using. This patch updates the library to use this new
construction. It adds a outputs parameter to HKDF, a
PresharedKeyPlacement config parameter, as well as a PSK token. This has
been tested against the latest WireGuard git master, and the two are
compatible.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-05-15 13:21:07 +02:00
Jonathan Rudenberg
7e06e15681 Ensure that the handshake state doesn’t get lost if decryption fails
This allows decoding potentially malicious messages under certain
circumstances.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-14 21:27:05 -04:00
Jonathan Rudenberg
9d48b3b0f8 Add PeerStatic method to HandshakeState
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-13 19:53:24 -04:00
Jonathan Rudenberg
b16acbb322 Add method to get channel binding
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-13 15:28:03 -04:00
Jonathan Rudenberg
9d237a2bfc Fix docs typos
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-12 22:45:32 -04:00
Jonathan Rudenberg
ca5f81ebf0 Improve Config docs
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-12 22:44:26 -04:00
Jonathan Rudenberg
8035b36042 Add docs
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-12 22:20:06 -04:00
Jonathan Rudenberg
d4248be25d Add method to get Cipher from CipherState
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-12 21:32:38 -04:00
Jonathan Rudenberg
9a626dbd0b Unexport SymmetricState
This struct is only used internally.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2016-07-12 21:25:40 -04:00
Jonathan Rudenberg
82839267d3 Copy PeerEphemeral to avoid buffer corruption 2015-11-16 22:07:11 -05:00
Jonathan Rudenberg
b11a33c4ae Add handshake Config struct
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2015-11-16 13:09:47 -05:00
Jonathan Rudenberg
d760bc3534 MixPresharedKey and new vectors 2015-11-16 11:37:33 -05:00
Jonathan Rudenberg
0e9c47ad19 Implement NoisePSK revision 2 2015-11-15 17:18:33 -05:00
Jonathan Rudenberg
f7b9b28336 Add checks from revision 18 2015-11-15 12:56:24 -05:00
Jonathan Rudenberg
14af5e1fc8 Initial implementation 2015-11-15 12:50:34 -05:00