Documentation ¶
Overview ¶
Package ake provides high-level functions for the 3DH AKE.
Package ake provides high-level functions for the 3DH AKE.
Package ake provides high-level functions for the 3DH AKE.
Index ¶
- func KeyGen(id group.Group) (sk, pk []byte)
- type Client
- func (c *Client) Finalize(p *internal.Parameters, clientIdentity []byte, clientSecretKey *group.Scalar, ...) (*message.KE3, error)
- func (c *Client) SessionKey() []byte
- func (c *Client) SetValues(id group.Group, esk *group.Scalar, nonce []byte, nonceLen int) *group.Point
- func (c *Client) Start(cs group.Group) *message.KE1
- type Server
- func (s *Server) ExpectedMAC() []byte
- func (s *Server) Finalize(p *internal.Parameters, ke3 *message.KE3) bool
- func (s *Server) Response(p *internal.Parameters, serverIdentity []byte, serverSecretKey *group.Scalar, ...) (*message.KE2, error)
- func (s *Server) SerializeState() []byte
- func (s *Server) SessionKey() []byte
- func (s *Server) SetState(clientMac, sessionSecret []byte) error
- func (s *Server) SetValues(id group.Group, esk *group.Scalar, nonce []byte, nonceLen int) *group.Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client exposes the client's AKE functions and holds its state.
func (*Client) Finalize ¶
func (c *Client) Finalize(p *internal.Parameters, clientIdentity []byte, clientSecretKey *group.Scalar, serverIdentity, serverPublicKey []byte, ke1 *message.KE1, ke2 *message.KE2) (*message.KE3, error)
Finalize verifies and responds to KE3. If the handshake is successful, the session key is stored and this functions returns a KE3 message.
func (*Client) SessionKey ¶
SessionKey returns the secret shared session key if a previous call to Finalize() was successful.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server exposes the server's AKE functions and holds its state.
func (*Server) ExpectedMAC ¶
ExpectedMAC returns the expected client MAC if a previous call to Response() was successful.
func (*Server) Response ¶
func (s *Server) Response(p *internal.Parameters, serverIdentity []byte, serverSecretKey *group.Scalar, clientIdentity, clientPublicKey []byte, ke1 *message.KE1, response *cred.CredentialResponse) (*message.KE2, error)
Response produces a 3DH server response message.
func (*Server) SerializeState ¶
SerializeState will return a []byte containing internal state of the Server.
func (*Server) SessionKey ¶
SessionKey returns the secret shared session key if a previous call to Response() was successful.