contactDiscoveryCrypto

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TAG_LENGTH_BYTES = 16

Variables

This section is empty.

Functions

func GetDiscoveryResponseData

func GetDiscoveryResponseData(response DiscoveryResponse, remoteAttestations map[string]*contactsDiscovery.RemoteAttestation) ([]byte, error)

Types

type AESEncryptedResult

type AESEncryptedResult struct {
	// contains filtered or unexported fields
}

type DiscoveryRequest

type DiscoveryRequest struct {
	AddressCount int                       `json:"addressCount"`
	Commitment   []byte                    `json:"commitment"`
	Data         []byte                    `json:"data"`
	Envelopes    map[string]*QueryEnvelope `json:"envelopes"`
	Iv           []byte                    `json:"iv"`
	Mac          []byte                    `json:"mac"`
}

func CreateDiscoveryRequest

func CreateDiscoveryRequest(addressBook []string, remoteAttestations map[string]*contactsDiscovery.RemoteAttestation) (*DiscoveryRequest, error)

type DiscoveryResponse

type DiscoveryResponse struct {
	Data      []byte `json:"data"`
	Iv        []byte `json:"iv"`
	Mac       []byte `json:"mac"`
	RequestId []byte `json:"requestId"`
}

type QueryEnvelope

type QueryEnvelope struct {
	Data      []byte `json:"data"`
	Iv        []byte `json:"iv"`
	Mac       []byte `json:"mac"`
	RequestId []byte `json:"requestId"`
}

type RemoteAttestation

type RemoteAttestation struct {
	RequestId []byte
	Keys      RemoteAttestationKeys
	Cookies   []string
}

type RemoteAttestationKeys

type RemoteAttestationKeys struct {
	ClientKey []byte
	ServerKey []byte
}

Jump to

Keyboard shortcuts

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