messaging

package
v0.0.0-...-fd2e170 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

github.com/steowens/crypton - Core classes for crypton identity and message system.

Copyright (C) 2023 Stephen Owens

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

github.com/steowens/crypton - Core classes for crypton identity and message system.

Copyright (C) 2023 Stephen Owens

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	State       ConnectionState
	WithParty   crypton.Registration
	KagResponse *KeyAgreementResponse
}

type ConnectionDecision

type ConnectionDecision int64
const (
	Accepted ConnectionDecision = iota
	Rejected
	Blocked
)

type ConnectionRequest

type ConnectionRequest struct {
	ConnectTo crypton.PublicProfile
	Requester crypton.Registration
	Signature string
}

func (*ConnectionRequest) Hashable

func (req *ConnectionRequest) Hashable() (hashable string)

type ConnectionResponse

type ConnectionResponse struct {
	Request   ConnectionRequest
	Decision  ConnectionDecision
	Time      int64
	Signature string
}

func (*ConnectionResponse) Hashable

func (resp *ConnectionResponse) Hashable() (hashable string)

func (*ConnectionResponse) Sign

func (resp *ConnectionResponse) Sign(key *crypton.SigningKey) (err error)

type ConnectionState

type ConnectionState int64
const (
	PendingSharedSecret ConnectionState = iota
	Ready
)

type KeyAgreementRequest

type KeyAgreementRequest struct {
	RequesterKaKey string
	Requester      crypton.Registration
	Signature      string
}

func (*KeyAgreementRequest) Hashable

func (kagReq *KeyAgreementRequest) Hashable() string

func (*KeyAgreementRequest) Sign

func (kagReq *KeyAgreementRequest) Sign(key *crypton.SigningKey) (err error)

type KeyAgreementResponse

type KeyAgreementResponse struct {
	Request        KeyAgreementRequest
	ResponderKaKey string
	Signature      string
}

func (*KeyAgreementResponse) Hashable

func (kagResp *KeyAgreementResponse) Hashable() string

func (*KeyAgreementResponse) Sign

func (kagResp *KeyAgreementResponse) Sign(key *crypton.SigningKey) (err error)

type SignedConnectionResponse

type SignedConnectionResponse struct {
	Response  *ConnectionResponse
	Signature string
}

Jump to

Keyboard shortcuts

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