Documentation ¶
Index ¶
- Variables
- func DeriveSharedABSecrets(...) (s1, s2 [32]byte, h1, h2 []byte)
- func DeriveThirdSharedABSecret(...) ([32]byte, []byte)
- func Read2(conn *websocket.Conn, networkKey [32]byte) (msg2, serverEphemeralPK []byte, success bool)
- func Read4(conn *websocket.Conn, ...) (msg4, finalKey []byte, success bool)
- func Shake(conn *websocket.Conn, localPublicIdentity, remoteIdentity [32]byte, ...) bool
- func SignatureA(networkKey, serverLongTermPublicIdentity, sharedSecretHash [32]byte, ...) []byte
- func Write1(conn *websocket.Conn, clientEphemeralPublicKey, networkKey [32]byte) ([]byte, bool)
- func Write3(conn *websocket.Conn, ...) ([]byte, bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Meta . Meta struct { LocalLongTermEd25519PrivateKey [64]byte LocalLongTermEd25519PublicKey [32]byte RemoteLongTermEd25519PublicKey [32]byte LocalEphemeralCurve25519PrivateKey [32]byte LocalEphemeralCurve25519PublicKey [32]byte RemoteEphemeralCurve25519PublicKey [32]byte NetworkKey [32]byte Message1Sent []byte Message2Received []byte Message3Sent []byte Message4Received []byte Secretab [32]byte SecretaB [32]byte SecretAb [32]byte SecretabHash []byte SecretaBHash []byte SecretAbHash []byte SignatureA []byte SignatureB []byte FinalSharedSecret []byte } )
Functions ¶
func DeriveSharedABSecrets ¶
func DeriveSharedABSecrets( clientEphemeralCurve25519PrivateKey, serverEphemeralCurve25519PublicKey, serverLongTermPublicIdentitytoCurve [32]byte) (s1, s2 [32]byte, h1, h2 []byte)
DeriveSharedABSecrets client calculates secrets ab and aB
func DeriveThirdSharedABSecret ¶
func DeriveThirdSharedABSecret( clientLongTermSecretEd25519KeytoCurve, serverEphemeralCurve25519PublicKey [32]byte) ([32]byte, []byte)
DeriveThirdSharedABSecret client calculates final secret Ab
func Read2 ¶
func Read2(conn *websocket.Conn, networkKey [32]byte) (msg2, serverEphemeralPK []byte, success bool)
Read2 client receive (server hello): client receives connection in response to client-hello, client verifies server-hmac, receives msg2
func Read4 ¶
func Read4( conn *websocket.Conn, networkKey, secretab, secretaB, secretAb, clientLongTermPublicIdentity, serverLongTermPublicIdentity [32]byte, signatureA []byte) (msg4, finalKey []byte, success bool)
Read4 client receive (server accept): client receives response to client-authenticate, receives msg4 naclbox, unbox
func Shake ¶
func Shake( conn *websocket.Conn, localPublicIdentity, remoteIdentity [32]byte, localPrivateKey [64]byte) bool
Shake client handshake
func SignatureA ¶
func SignatureA( networkKey, serverLongTermPublicIdentity, sharedSecretHash [32]byte, clientEd25519PrivateKey [64]byte) []byte
SignatureA client signs target network key, and public id, and hash of shared secret
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.