iccp

package
v0.0.0-...-d83f28c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: BSD-3-Clause Imports: 14 Imported by: 1

Documentation

Overview

Package iccp is a generated protocol buffer package.

It is generated from these files:

iccp.proto

It has these top-level messages:

ACPackedMessage

iccp == IC(4f) C(rypto) P(rotocol)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHeader

func BuildHeader(in []byte) (bHdr []byte, iHdr uint32, err error)

func BuildNonceAC

func BuildNonceAC(inonce uint32, bob, mynick, myhdr []byte) (nonce []byte, noncebyte *[24]byte, err error)

func BuildNonceKX

func BuildNonceKX(inonce uint32, bob, mynick, peernick, myhdr []byte) (nonce []byte, noncebyte *[24]byte, err error)

func Byte2Nonce

func Byte2Nonce(nonceBuf []byte) uint32

func CheckHeader

func CheckHeader(inSlice []byte, in uint32) (rcvHdr []byte, err error)

func CreateACContextWithInputEntropy

func CreateACContextWithInputEntropy(channel []byte, inputEntropy []byte) (context *ickp.SecretKey, err error)

func CreateACMessageNACL

func CreateACMessageNACL(context *ickp.SecretKey, rnd, msg, myNick []byte) (out []byte, err error)

func CreateKXMessageNACL

func CreateKXMessageNACL(context *ickp.SecretKey, rnd []byte, peerPubkey, myPrivkey *[32]byte, channel, myNick, peerNick []byte) (out []byte, err error)

func CreatePKMessageNACL

func CreatePKMessageNACL(pubkey []byte) (out []byte, err error)

func IsChannelOrPriv

func IsChannelOrPriv(channel, myNick, peerNick []byte) []byte

func IsValidChannelName

func IsValidChannelName(input []byte) (ok bool, err error)

func Nonce2Byte

func Nonce2Byte(nonce uint32) []byte

func OpenACMessageNACL

func OpenACMessageNACL(context *ickp.SecretKey, rnd, cmsg, peerNick, myNick []byte) (out []byte, err error)

func OpenKXMessageNACL

func OpenKXMessageNACL(peerPubkey, myPrivkey *[32]byte, cmsg, channel, myNick, peerNick []byte) (context *ickp.SecretKey, SecRnd []byte, err error)

func OpenPKMessageNACL

func OpenPKMessageNACL(ircmsg []byte) (out []byte, err error)

func PredictLenAESGCM

func PredictLenAESGCM(input []byte) (outlen int)

func PredictLenNACL

func PredictLenNACL(inputLen []byte) (outlen int)

Types

type ACPackedMessage

type ACPackedMessage struct {
	Header     uint32 `protobuf:"fixed32,1,opt,name=header" json:"header,omitempty"`
	Nonce      uint32 `protobuf:"varint,2,opt,name=nonce" json:"nonce,omitempty"`
	Ciphertext []byte `protobuf:"bytes,3,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	Options    uint32 `protobuf:"varint,4,opt,name=options" json:"options,omitempty"`
	Sigwho     []byte `protobuf:"bytes,5,opt,name=sigwho,proto3" json:"sigwho,omitempty"`
	Sig        []byte `protobuf:"bytes,6,opt,name=sig,proto3" json:"sig,omitempty"`
}

Default Values as described in: https://developers.google.com/protocol-buffers/docs/proto3#default numeric -> 0 string -> "" bytes -> [] (empty bytes array)

func (*ACPackedMessage) Descriptor

func (*ACPackedMessage) Descriptor() ([]byte, []int)

func (*ACPackedMessage) GetCiphertext

func (m *ACPackedMessage) GetCiphertext() []byte

func (*ACPackedMessage) GetHeader

func (m *ACPackedMessage) GetHeader() uint32

func (*ACPackedMessage) GetNonce

func (m *ACPackedMessage) GetNonce() uint32

func (*ACPackedMessage) GetOptions

func (m *ACPackedMessage) GetOptions() uint32

func (*ACPackedMessage) GetSig

func (m *ACPackedMessage) GetSig() []byte

func (*ACPackedMessage) GetSigwho

func (m *ACPackedMessage) GetSigwho() []byte

func (*ACPackedMessage) ProtoMessage

func (*ACPackedMessage) ProtoMessage()

func (*ACPackedMessage) Reset

func (m *ACPackedMessage) Reset()

func (*ACPackedMessage) String

func (m *ACPackedMessage) String() string

Jump to

Keyboard shortcuts

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