Documentation ¶
Index ¶
- func ClientProof(A, B, S []byte) []byte
- func CompleteHandshake(A, a, I, p, s, B []byte) ([]byte, error)
- func Handshake(A, v []byte) ([]byte, []byte, []byte, error)
- func Hash(x ...[]byte) []byte
- func InitiateHandshake() ([]byte, []byte, error)
- func NewClient(I, p []byte) ([]byte, []byte, error)
- func ServerProof(A, ClientProof, K []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientProof ¶
ClientProof -
Params:
A ([]byte) - the client's session public key B ([]byte) - the server's public key for this session S ([]byte) - the session's pseudo-session key
Return:
[]byte - the client's proof of knowing K error
func CompleteHandshake ¶
CompleteHandshake -
Params:
A ([]byte) - the client's session public key a ([]byte) - the client's session private key I ([]byte) - the client's identifier p ([]byte) - the client's secret passphrase s ([]byte) - the client's salt looked up by the server B ([]byte) - the server's public key for this session
Return:
[]byte - the client's computed session key error
func Handshake ¶
Handshake -
Params:
A ([]byte) - a client's generated public key v ([]byte) - a client's stored verifer
Return:
[]byte - the generated public key "B", to be sent to the client []byte - the computed pre-session key "S", to be kept secret []byte - the computed session key "K", to be kept secret error NOTE: Only the returned "B" value should be sent to the client. "S" and "K" are very secret.
func Hash ¶
Hash -
Joins and hashes (SHA-256) an arbitrary number of byte slices.
NOTE: Exported because it is used in post key negotiation proof.
func InitiateHandshake ¶
InitiateHandshake -
Params:
None
Return:
[]byte - the client's public key "A" to be sent to the server []byte - the client's private key "a" to complete the handshake error
func NewClient ¶
NewClient -
Params:
I ([]byte) - a client's identifier p ([]byte) - a client's passphrase
Return:
[]byte - a client's salt []byte - a client's verifer error
func ServerProof ¶
ServerProof -
Params:
A ([]byte) - the client's session public key ClientProof ([]byte) - the client's proof as computed with ClientProof() K ([]byte) - the computed session secret
Return:
[]byte - the client's proof of knowing K error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.