message

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package message provides message structures for the OPAQUE protocol.

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 KE1

type KE1 struct {
	*message.CredentialRequest
	NonceU []byte `json:"n"`
	EpkU   []byte `json:"e"`
}

KE1 is the first message of the login flow, created by the client and sent to the server.

func (*KE1) Serialize

func (m *KE1) Serialize() []byte

Serialize returns the byte encoding of KE1.

type KE2

type KE2 struct {
	*message.CredentialResponse
	NonceS []byte `json:"n"`
	EpkS   []byte `json:"e"`
	Mac    []byte `json:"m"`
}

KE2 is the second message of the login flow, created by the server and sent to the client.

func (*KE2) Serialize

func (m *KE2) Serialize() []byte

Serialize returns the byte encoding of KE2.

type KE3

type KE3 struct {
	Mac []byte `json:"m"`
}

KE3 is the third and last message of the login flow, created by the client and sent to the server.

func (KE3) Serialize

func (k KE3) Serialize() []byte

Serialize returns the byte encoding of KE3.

type RegistrationRecord

type RegistrationRecord struct {
	PublicKey  []byte `json:"pku"`
	MaskingKey []byte `json:"msk"`
	Envelope   []byte `json:"env"`
}

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

type RegistrationRequest struct {
	Data []byte `json:"data"`
}

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 {
	Data []byte `json:"data"`
	Pks  []byte `json:"pks"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL