Documentation ¶
Overview ¶
Package message provides message structures for the OPAQUE protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialRequest ¶ added in v0.8.2
CredentialRequest represents credential request message.
func NewCredentialRequest ¶ added in v0.9.0
func NewCredentialRequest(ciphersuite oprf.Identifier, message *group.Element) *CredentialRequest
NewCredentialRequest returns a populated CredentialRequest.
func (*CredentialRequest) Serialize ¶ added in v0.8.2
func (c *CredentialRequest) Serialize() []byte
Serialize returns the byte encoding of CredentialRequest.
type CredentialResponse ¶ added in v0.8.2
type CredentialResponse struct { EvaluatedMessage *group.Element `json:"evaluatedMessage"` MaskingNonce []byte `json:"maskingNonce"` MaskedResponse []byte `json:"maskedResponse"` }
CredentialResponse represents credential response message.
func NewCredentialResponse ¶ added in v0.9.0
func NewCredentialResponse( message *group.Element, nonce, response []byte, ) *CredentialResponse
NewCredentialResponse returns a populated CredentialResponse.
func (*CredentialResponse) Serialize ¶ added in v0.8.2
func (c *CredentialResponse) Serialize() []byte
Serialize returns the byte encoding of CredentialResponse.
type KE1 ¶
type KE1 struct { *CredentialRequest EpkU *group.Element `json:"clientEphemeralPublicKey"` NonceU []byte `json:"clientNonce"` }
KE1 is the first message of the login flow, created by the client and sent to the server.
type KE2 ¶
type KE2 struct { *CredentialResponse EpkS *group.Element `json:"serverEphemeralPublicKey"` NonceS []byte `json:"serverNonce"` Mac []byte `json:"serverMac"` }
KE2 is the second message of the login flow, created by the server and sent to the client.
type KE3 ¶
type KE3 struct {
Mac []byte `json:"clientMac"`
}
KE3 is the third and last message of the login flow, created by the client and sent to the server.
type RegistrationRecord ¶
type RegistrationRecord struct { PublicKey *group.Element `json:"clientPublicKey"` MaskingKey []byte `json:"maskingKey"` Envelope []byte `json:"envelope"` }
RegistrationRecord represents the client record sent as the last registration message by the client to the server.
func (*RegistrationRecord) Serialize ¶
func (r *RegistrationRecord) Serialize() []byte
Serialize returns the byte encoding of RegistrationRecord.
type RegistrationRequest ¶
RegistrationRequest is the first message of the registration flow, created by the client and sent to the server.
func (*RegistrationRequest) Serialize ¶
func (r *RegistrationRequest) Serialize() []byte
Serialize returns the byte encoding of RegistrationRequest.
type RegistrationResponse ¶
type RegistrationResponse struct { EvaluatedMessage *group.Element `json:"evaluatedMessage"` Pks *group.Element `json:"serverPublicKey"` }
RegistrationResponse is the second message of the registration flow, created by the server and sent to the client.
func (*RegistrationResponse) Serialize ¶
func (r *RegistrationResponse) Serialize() []byte
Serialize returns the byte encoding of RegistrationResponse.