2022-02-14 11:08:18 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2019-07-17 22:25:42 +00:00
|
|
|
// source: protocol_message.proto
|
2018-09-24 18:07:34 +00:00
|
|
|
|
2019-07-17 22:25:42 +00:00
|
|
|
package encryption
|
2018-09-24 18:07:34 +00:00
|
|
|
|
2018-11-06 08:05:32 +00:00
|
|
|
import (
|
|
|
|
fmt "fmt"
|
2020-01-02 09:10:19 +00:00
|
|
|
proto "github.com/golang/protobuf/proto"
|
2020-01-13 19:17:30 +00:00
|
|
|
math "math"
|
2018-11-06 08:05:32 +00:00
|
|
|
)
|
2018-09-24 18:07:34 +00:00
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2019-07-17 22:25:42 +00:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2018-09-24 18:07:34 +00:00
|
|
|
|
|
|
|
type SignedPreKey struct {
|
|
|
|
SignedPreKey []byte `protobuf:"bytes,1,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"`
|
|
|
|
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
|
2019-05-23 07:54:28 +00:00
|
|
|
ProtocolVersion uint32 `protobuf:"varint,3,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignedPreKey) Reset() { *m = SignedPreKey{} }
|
|
|
|
func (m *SignedPreKey) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignedPreKey) ProtoMessage() {}
|
|
|
|
func (*SignedPreKey) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{0}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *SignedPreKey) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_SignedPreKey.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_SignedPreKey.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignedPreKey.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_SignedPreKey.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignedPreKey.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SignedPreKey proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SignedPreKey) GetSignedPreKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SignedPreKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignedPreKey) GetVersion() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-05-23 07:54:28 +00:00
|
|
|
func (m *SignedPreKey) GetProtocolVersion() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ProtocolVersion
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
// X3DH prekey bundle
|
|
|
|
type Bundle struct {
|
|
|
|
// Identity key
|
|
|
|
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
|
|
|
|
// Installation id
|
|
|
|
SignedPreKeys map[string]*SignedPreKey `protobuf:"bytes,2,rep,name=signed_pre_keys,json=signedPreKeys,proto3" json:"signed_pre_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
// Prekey signature
|
2018-11-06 08:05:32 +00:00
|
|
|
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
|
|
// When the bundle was created locally
|
|
|
|
Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) Reset() { *m = Bundle{} }
|
|
|
|
func (m *Bundle) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Bundle) ProtoMessage() {}
|
|
|
|
func (*Bundle) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{1}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *Bundle) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_Bundle.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_Bundle.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Bundle.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_Bundle.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Bundle.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Bundle proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Bundle) GetIdentity() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Identity
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) GetSignedPreKeys() map[string]*SignedPreKey {
|
|
|
|
if m != nil {
|
|
|
|
return m.SignedPreKeys
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-11-06 08:05:32 +00:00
|
|
|
func (m *Bundle) GetTimestamp() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Timestamp
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
type BundleContainer struct {
|
|
|
|
// X3DH prekey bundle
|
|
|
|
Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
|
|
|
|
// Private signed prekey
|
2018-11-06 08:05:32 +00:00
|
|
|
PrivateSignedPreKey []byte `protobuf:"bytes,2,opt,name=private_signed_pre_key,json=privateSignedPreKey,proto3" json:"private_signed_pre_key,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *BundleContainer) Reset() { *m = BundleContainer{} }
|
|
|
|
func (m *BundleContainer) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*BundleContainer) ProtoMessage() {}
|
|
|
|
func (*BundleContainer) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{2}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *BundleContainer) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_BundleContainer.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_BundleContainer.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_BundleContainer.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_BundleContainer.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_BundleContainer.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_BundleContainer proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *BundleContainer) GetBundle() *Bundle {
|
|
|
|
if m != nil {
|
|
|
|
return m.Bundle
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *BundleContainer) GetPrivateSignedPreKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PrivateSignedPreKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DRHeader struct {
|
|
|
|
// Current ratchet public key
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
// Number of the message in the sending chain
|
|
|
|
N uint32 `protobuf:"varint,2,opt,name=n,proto3" json:"n,omitempty"`
|
|
|
|
// Length of the previous sending chain
|
|
|
|
Pn uint32 `protobuf:"varint,3,opt,name=pn,proto3" json:"pn,omitempty"`
|
|
|
|
// Bundle ID
|
|
|
|
Id []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) Reset() { *m = DRHeader{} }
|
|
|
|
func (m *DRHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DRHeader) ProtoMessage() {}
|
|
|
|
func (*DRHeader) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{3}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *DRHeader) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DRHeader.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DRHeader.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DRHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DRHeader.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DRHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DRHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DRHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetN() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.N
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetPn() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Pn
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DHHeader struct {
|
|
|
|
// Compressed ephemeral public key
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DHHeader) Reset() { *m = DHHeader{} }
|
|
|
|
func (m *DHHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DHHeader) ProtoMessage() {}
|
|
|
|
func (*DHHeader) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{4}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *DHHeader) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DHHeader.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DHHeader.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DHHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_DHHeader.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DHHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DHHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DHHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type X3DHHeader struct {
|
|
|
|
// Ephemeral key used
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
// Used bundle's signed prekey
|
2018-11-06 08:05:32 +00:00
|
|
|
Id []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *X3DHHeader) Reset() { *m = X3DHHeader{} }
|
|
|
|
func (m *X3DHHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*X3DHHeader) ProtoMessage() {}
|
|
|
|
func (*X3DHHeader) Descriptor() ([]byte, []int) {
|
2019-07-17 22:25:42 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{5}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *X3DHHeader) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_X3DHHeader.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_X3DHHeader.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_X3DHHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_X3DHHeader.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_X3DHHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_X3DHHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *X3DHHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *X3DHHeader) GetId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
// Hash Ratchet Header
|
|
|
|
type HRHeader struct {
|
|
|
|
// community key ID
|
|
|
|
KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
|
|
|
|
// Community message number for this key_id
|
|
|
|
SeqNo uint32 `protobuf:"varint,2,opt,name=seq_no,json=seqNo,proto3" json:"seq_no,omitempty"`
|
|
|
|
// Community ID
|
2022-05-27 09:14:40 +00:00
|
|
|
GroupId []byte `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
2021-09-21 15:47:04 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HRHeader) Reset() { *m = HRHeader{} }
|
|
|
|
func (m *HRHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*HRHeader) ProtoMessage() {}
|
|
|
|
func (*HRHeader) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{6}
|
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *HRHeader) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_HRHeader.Unmarshal(m, b)
|
2021-09-21 15:47:04 +00:00
|
|
|
}
|
|
|
|
func (m *HRHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_HRHeader.Marshal(b, m, deterministic)
|
2021-09-21 15:47:04 +00:00
|
|
|
}
|
|
|
|
func (m *HRHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_HRHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *HRHeader) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_HRHeader.Size(m)
|
2021-09-21 15:47:04 +00:00
|
|
|
}
|
|
|
|
func (m *HRHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_HRHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_HRHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *HRHeader) GetKeyId() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HRHeader) GetSeqNo() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.SeqNo
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2022-05-27 09:14:40 +00:00
|
|
|
func (m *HRHeader) GetGroupId() []byte {
|
2021-09-21 15:47:04 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.GroupId
|
|
|
|
}
|
2022-05-27 09:14:40 +00:00
|
|
|
return nil
|
2021-09-21 15:47:04 +00:00
|
|
|
}
|
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
// Direct message value
|
2021-09-21 15:47:04 +00:00
|
|
|
type EncryptedMessageProtocol struct {
|
2018-10-16 10:31:05 +00:00
|
|
|
X3DHHeader *X3DHHeader `protobuf:"bytes,1,opt,name=X3DH_header,json=X3DHHeader,proto3" json:"X3DH_header,omitempty"`
|
|
|
|
DRHeader *DRHeader `protobuf:"bytes,2,opt,name=DR_header,json=DRHeader,proto3" json:"DR_header,omitempty"`
|
|
|
|
DHHeader *DHHeader `protobuf:"bytes,101,opt,name=DH_header,json=DHHeader,proto3" json:"DH_header,omitempty"`
|
2021-09-21 15:47:04 +00:00
|
|
|
HRHeader *HRHeader `protobuf:"bytes,102,opt,name=HR_header,json=HRHeader,proto3" json:"HR_header,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
// Encrypted payload
|
|
|
|
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) Reset() { *m = EncryptedMessageProtocol{} }
|
|
|
|
func (m *EncryptedMessageProtocol) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*EncryptedMessageProtocol) ProtoMessage() {}
|
|
|
|
func (*EncryptedMessageProtocol) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{7}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_EncryptedMessageProtocol.Unmarshal(m, b)
|
2021-09-21 15:47:04 +00:00
|
|
|
}
|
|
|
|
func (m *EncryptedMessageProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_EncryptedMessageProtocol.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_EncryptedMessageProtocol.Merge(m, src)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_EncryptedMessageProtocol.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_EncryptedMessageProtocol.DiscardUnknown(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
var xxx_messageInfo_EncryptedMessageProtocol proto.InternalMessageInfo
|
2018-09-24 18:07:34 +00:00
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) GetX3DHHeader() *X3DHHeader {
|
2018-09-24 18:07:34 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.X3DHHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) GetDRHeader() *DRHeader {
|
2018-09-24 18:07:34 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.DRHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) GetDHHeader() *DHHeader {
|
2018-09-24 18:07:34 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.DHHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *EncryptedMessageProtocol) GetHRHeader() *HRHeader {
|
|
|
|
if m != nil {
|
|
|
|
return m.HRHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *EncryptedMessageProtocol) GetPayload() []byte {
|
2018-09-24 18:07:34 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Top-level protocol message
|
|
|
|
type ProtocolMessage struct {
|
2018-10-16 10:31:05 +00:00
|
|
|
// The device id of the sender
|
|
|
|
InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"`
|
2018-12-21 10:07:25 +00:00
|
|
|
// List of bundles
|
|
|
|
Bundles []*Bundle `protobuf:"bytes,3,rep,name=bundles,proto3" json:"bundles,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
// One to one message, encrypted, indexed by installation_id
|
2021-09-21 15:47:04 +00:00
|
|
|
// TODO map here is redundant in case of community messages
|
|
|
|
EncryptedMessage map[string]*EncryptedMessageProtocol `protobuf:"bytes,101,rep,name=encrypted_message,json=encryptedMessage,proto3" json:"encrypted_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
2018-09-24 18:07:34 +00:00
|
|
|
// Public chats, not encrypted
|
2019-05-23 07:54:28 +00:00
|
|
|
PublicMessage []byte `protobuf:"bytes,102,opt,name=public_message,json=publicMessage,proto3" json:"public_message,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ProtocolMessage) Reset() { *m = ProtocolMessage{} }
|
|
|
|
func (m *ProtocolMessage) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ProtocolMessage) ProtoMessage() {}
|
|
|
|
func (*ProtocolMessage) Descriptor() ([]byte, []int) {
|
2021-09-21 15:47:04 +00:00
|
|
|
return fileDescriptor_4e37b52004a72e16, []int{8}
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *ProtocolMessage) XXX_Unmarshal(b []byte) error {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_ProtocolMessage.Unmarshal(m, b)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_ProtocolMessage.Marshal(b, m, deterministic)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ProtocolMessage.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Size() int {
|
2022-02-14 11:08:18 +00:00
|
|
|
return xxx_messageInfo_ProtocolMessage.Size(m)
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ProtocolMessage.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ProtocolMessage proto.InternalMessageInfo
|
|
|
|
|
2018-10-16 10:31:05 +00:00
|
|
|
func (m *ProtocolMessage) GetInstallationId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.InstallationId
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-12-21 10:07:25 +00:00
|
|
|
func (m *ProtocolMessage) GetBundles() []*Bundle {
|
|
|
|
if m != nil {
|
|
|
|
return m.Bundles
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:47:04 +00:00
|
|
|
func (m *ProtocolMessage) GetEncryptedMessage() map[string]*EncryptedMessageProtocol {
|
2018-09-24 18:07:34 +00:00
|
|
|
if m != nil {
|
2021-09-21 15:47:04 +00:00
|
|
|
return m.EncryptedMessage
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ProtocolMessage) GetPublicMessage() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PublicMessage
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2019-07-17 22:25:42 +00:00
|
|
|
proto.RegisterType((*SignedPreKey)(nil), "encryption.SignedPreKey")
|
|
|
|
proto.RegisterType((*Bundle)(nil), "encryption.Bundle")
|
|
|
|
proto.RegisterMapType((map[string]*SignedPreKey)(nil), "encryption.Bundle.SignedPreKeysEntry")
|
|
|
|
proto.RegisterType((*BundleContainer)(nil), "encryption.BundleContainer")
|
|
|
|
proto.RegisterType((*DRHeader)(nil), "encryption.DRHeader")
|
|
|
|
proto.RegisterType((*DHHeader)(nil), "encryption.DHHeader")
|
|
|
|
proto.RegisterType((*X3DHHeader)(nil), "encryption.X3DHHeader")
|
2021-09-21 15:47:04 +00:00
|
|
|
proto.RegisterType((*HRHeader)(nil), "encryption.HRHeader")
|
|
|
|
proto.RegisterType((*EncryptedMessageProtocol)(nil), "encryption.EncryptedMessageProtocol")
|
2019-07-17 22:25:42 +00:00
|
|
|
proto.RegisterType((*ProtocolMessage)(nil), "encryption.ProtocolMessage")
|
2021-09-21 15:47:04 +00:00
|
|
|
proto.RegisterMapType((map[string]*EncryptedMessageProtocol)(nil), "encryption.ProtocolMessage.EncryptedMessageEntry")
|
2019-07-17 22:25:42 +00:00
|
|
|
}
|
|
|
|
|
2022-07-01 13:54:02 +00:00
|
|
|
func init() { proto.RegisterFile("protocol_message.proto", fileDescriptor_4e37b52004a72e16) }
|
2021-09-21 15:47:04 +00:00
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
var fileDescriptor_4e37b52004a72e16 = []byte{
|
2022-05-27 09:14:40 +00:00
|
|
|
// 631 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x5d, 0x4b, 0xdc, 0x4c,
|
|
|
|
0x14, 0x26, 0x89, 0xfb, 0xe1, 0xd9, 0x8f, 0xec, 0x3b, 0x6f, 0x95, 0x54, 0xbc, 0x58, 0x82, 0xd2,
|
|
|
|
0x6d, 0x29, 0x29, 0x6a, 0xa1, 0xc5, 0xde, 0x59, 0x85, 0x68, 0xb1, 0xc8, 0x08, 0xa5, 0x78, 0xd1,
|
|
|
|
0x10, 0xcd, 0xd1, 0x0e, 0xc6, 0x49, 0xcc, 0x64, 0xa5, 0xf9, 0x03, 0xbd, 0xe9, 0x3f, 0xec, 0xaf,
|
|
|
|
0x29, 0x99, 0x64, 0x92, 0x71, 0x5d, 0xef, 0x72, 0x9e, 0x39, 0x5f, 0xcf, 0x73, 0xce, 0x09, 0xac,
|
|
|
|
0xa7, 0x59, 0x92, 0x27, 0x57, 0x49, 0x1c, 0xdc, 0xa1, 0x10, 0xe1, 0x0d, 0x7a, 0x12, 0x20, 0x80,
|
|
|
|
0xfc, 0x2a, 0x2b, 0xd2, 0x9c, 0x25, 0xdc, 0x2d, 0x60, 0x78, 0xce, 0x6e, 0x38, 0x46, 0x67, 0x19,
|
|
|
|
0x7e, 0xc1, 0x82, 0x6c, 0xc1, 0x58, 0x48, 0x3b, 0x48, 0x33, 0x0c, 0x6e, 0xb1, 0x70, 0x8c, 0xa9,
|
|
|
|
0x31, 0x1b, 0xd2, 0xa1, 0xd0, 0xbd, 0x1c, 0xe8, 0x3d, 0x60, 0x26, 0x58, 0xc2, 0x1d, 0x73, 0x6a,
|
|
|
|
0xcc, 0x46, 0x54, 0x99, 0xe4, 0x35, 0x4c, 0x9a, 0xaa, 0xca, 0xc5, 0x92, 0x2e, 0xb6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