Documentation ¶
Index ¶
- Variables
- type EncryptedKeyset
- func (*EncryptedKeyset) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedKeyset) GetEncryptedKeyset() []byte
- func (x *EncryptedKeyset) GetKeysetInfo() *KeysetInfo
- func (*EncryptedKeyset) ProtoMessage()
- func (x *EncryptedKeyset) ProtoReflect() protoreflect.Message
- func (x *EncryptedKeyset) Reset()
- func (x *EncryptedKeyset) String() string
- type KeyData
- func (*KeyData) Descriptor() ([]byte, []int)deprecated
- func (x *KeyData) GetKeyMaterialType() KeyData_KeyMaterialType
- func (x *KeyData) GetTypeUrl() string
- func (x *KeyData) GetValue() []byte
- func (*KeyData) ProtoMessage()
- func (x *KeyData) ProtoReflect() protoreflect.Message
- func (x *KeyData) Reset()
- func (x *KeyData) String() string
- type KeyData_KeyMaterialType
- func (KeyData_KeyMaterialType) Descriptor() protoreflect.EnumDescriptor
- func (x KeyData_KeyMaterialType) Enum() *KeyData_KeyMaterialType
- func (KeyData_KeyMaterialType) EnumDescriptor() ([]byte, []int)deprecated
- func (x KeyData_KeyMaterialType) Number() protoreflect.EnumNumber
- func (x KeyData_KeyMaterialType) String() string
- func (KeyData_KeyMaterialType) Type() protoreflect.EnumType
- type KeyStatusType
- func (KeyStatusType) Descriptor() protoreflect.EnumDescriptor
- func (x KeyStatusType) Enum() *KeyStatusType
- func (KeyStatusType) EnumDescriptor() ([]byte, []int)deprecated
- func (x KeyStatusType) Number() protoreflect.EnumNumber
- func (x KeyStatusType) String() string
- func (KeyStatusType) Type() protoreflect.EnumType
- type KeyTemplate
- func (*KeyTemplate) Descriptor() ([]byte, []int)deprecated
- func (x *KeyTemplate) GetOutputPrefixType() OutputPrefixType
- func (x *KeyTemplate) GetTypeUrl() string
- func (x *KeyTemplate) GetValue() []byte
- func (*KeyTemplate) ProtoMessage()
- func (x *KeyTemplate) ProtoReflect() protoreflect.Message
- func (x *KeyTemplate) Reset()
- func (x *KeyTemplate) String() string
- type Keyset
- type KeysetInfo
- func (*KeysetInfo) Descriptor() ([]byte, []int)deprecated
- func (x *KeysetInfo) GetKeyInfo() []*KeysetInfo_KeyInfo
- func (x *KeysetInfo) GetPrimaryKeyId() uint32
- func (*KeysetInfo) ProtoMessage()
- func (x *KeysetInfo) ProtoReflect() protoreflect.Message
- func (x *KeysetInfo) Reset()
- func (x *KeysetInfo) String() string
- type KeysetInfo_KeyInfo
- func (*KeysetInfo_KeyInfo) Descriptor() ([]byte, []int)deprecated
- func (x *KeysetInfo_KeyInfo) GetKeyId() uint32
- func (x *KeysetInfo_KeyInfo) GetOutputPrefixType() OutputPrefixType
- func (x *KeysetInfo_KeyInfo) GetStatus() KeyStatusType
- func (x *KeysetInfo_KeyInfo) GetTypeUrl() string
- func (*KeysetInfo_KeyInfo) ProtoMessage()
- func (x *KeysetInfo_KeyInfo) ProtoReflect() protoreflect.Message
- func (x *KeysetInfo_KeyInfo) Reset()
- func (x *KeysetInfo_KeyInfo) String() string
- type Keyset_Key
- func (*Keyset_Key) Descriptor() ([]byte, []int)deprecated
- func (x *Keyset_Key) GetKeyData() *KeyData
- func (x *Keyset_Key) GetKeyId() uint32
- func (x *Keyset_Key) GetOutputPrefixType() OutputPrefixType
- func (x *Keyset_Key) GetStatus() KeyStatusType
- func (*Keyset_Key) ProtoMessage()
- func (x *Keyset_Key) ProtoReflect() protoreflect.Message
- func (x *Keyset_Key) Reset()
- func (x *Keyset_Key) String() string
- type OutputPrefixType
- func (OutputPrefixType) Descriptor() protoreflect.EnumDescriptor
- func (x OutputPrefixType) Enum() *OutputPrefixType
- func (OutputPrefixType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OutputPrefixType) Number() protoreflect.EnumNumber
- func (x OutputPrefixType) String() string
- func (OutputPrefixType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( KeyStatusType_name = map[int32]string{ 0: "UNKNOWN_STATUS", 1: "ENABLED", 2: "DISABLED", 3: "DESTROYED", } KeyStatusType_value = map[string]int32{ "UNKNOWN_STATUS": 0, "ENABLED": 1, "DISABLED": 2, "DESTROYED": 3, } )
Enum value maps for KeyStatusType.
var ( OutputPrefixType_name = map[int32]string{ 0: "UNKNOWN_PREFIX", 1: "TINK", 2: "LEGACY", 3: "RAW", 4: "CRUNCHY", } OutputPrefixType_value = map[string]int32{ "UNKNOWN_PREFIX": 0, "TINK": 1, "LEGACY": 2, "RAW": 3, "CRUNCHY": 4, } )
Enum value maps for OutputPrefixType.
var ( KeyData_KeyMaterialType_name = map[int32]string{ 0: "UNKNOWN_KEYMATERIAL", 1: "SYMMETRIC", 2: "ASYMMETRIC_PRIVATE", 3: "ASYMMETRIC_PUBLIC", 4: "REMOTE", } KeyData_KeyMaterialType_value = map[string]int32{ "UNKNOWN_KEYMATERIAL": 0, "SYMMETRIC": 1, "ASYMMETRIC_PRIVATE": 2, "ASYMMETRIC_PUBLIC": 3, "REMOTE": 4, } )
Enum value maps for KeyData_KeyMaterialType.
var File_third_party_tink_proto_tink_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EncryptedKeyset ¶
type EncryptedKeyset struct { // Required. EncryptedKeyset []byte `protobuf:"bytes,2,opt,name=encrypted_keyset,json=encryptedKeyset,proto3" json:"encrypted_keyset,omitempty"` // Optional. KeysetInfo *KeysetInfo `protobuf:"bytes,3,opt,name=keyset_info,json=keysetInfo,proto3" json:"keyset_info,omitempty"` // contains filtered or unexported fields }
Represents a keyset that is encrypted with a master key.
func (*EncryptedKeyset) Descriptor
deprecated
func (*EncryptedKeyset) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedKeyset.ProtoReflect.Descriptor instead.
func (*EncryptedKeyset) GetEncryptedKeyset ¶
func (x *EncryptedKeyset) GetEncryptedKeyset() []byte
func (*EncryptedKeyset) GetKeysetInfo ¶
func (x *EncryptedKeyset) GetKeysetInfo() *KeysetInfo
func (*EncryptedKeyset) ProtoMessage ¶
func (*EncryptedKeyset) ProtoMessage()
func (*EncryptedKeyset) ProtoReflect ¶
func (x *EncryptedKeyset) ProtoReflect() protoreflect.Message
func (*EncryptedKeyset) Reset ¶
func (x *EncryptedKeyset) Reset()
func (*EncryptedKeyset) String ¶
func (x *EncryptedKeyset) String() string
type KeyData ¶
type KeyData struct { // Required. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // In format type.googleapis.com/packagename.messagename // Required. // Contains specific serialized *Key proto Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Required. KeyMaterialType KeyData_KeyMaterialType `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
The actual *Key-proto is wrapped in a KeyData message, which in addition to this serialized proto contains also type_url identifying the definition of *Key-proto (as in KeyFormat-message), and some extra metadata about the type key material.
func (*KeyData) Descriptor
deprecated
func (*KeyData) GetKeyMaterialType ¶
func (x *KeyData) GetKeyMaterialType() KeyData_KeyMaterialType
func (*KeyData) GetTypeUrl ¶
func (*KeyData) ProtoMessage ¶
func (*KeyData) ProtoMessage()
func (*KeyData) ProtoReflect ¶
func (x *KeyData) ProtoReflect() protoreflect.Message
type KeyData_KeyMaterialType ¶
type KeyData_KeyMaterialType int32
const ( KeyData_UNKNOWN_KEYMATERIAL KeyData_KeyMaterialType = 0 KeyData_SYMMETRIC KeyData_KeyMaterialType = 1 KeyData_ASYMMETRIC_PRIVATE KeyData_KeyMaterialType = 2 KeyData_ASYMMETRIC_PUBLIC KeyData_KeyMaterialType = 3 KeyData_REMOTE KeyData_KeyMaterialType = 4 // points to a remote key, i.e., in a KMS. )
func (KeyData_KeyMaterialType) Descriptor ¶
func (KeyData_KeyMaterialType) Descriptor() protoreflect.EnumDescriptor
func (KeyData_KeyMaterialType) Enum ¶
func (x KeyData_KeyMaterialType) Enum() *KeyData_KeyMaterialType
func (KeyData_KeyMaterialType) EnumDescriptor
deprecated
func (KeyData_KeyMaterialType) EnumDescriptor() ([]byte, []int)
Deprecated: Use KeyData_KeyMaterialType.Descriptor instead.
func (KeyData_KeyMaterialType) Number ¶
func (x KeyData_KeyMaterialType) Number() protoreflect.EnumNumber
func (KeyData_KeyMaterialType) String ¶
func (x KeyData_KeyMaterialType) String() string
func (KeyData_KeyMaterialType) Type ¶
func (KeyData_KeyMaterialType) Type() protoreflect.EnumType
type KeyStatusType ¶
type KeyStatusType int32
const ( KeyStatusType_UNKNOWN_STATUS KeyStatusType = 0 KeyStatusType_ENABLED KeyStatusType = 1 // Can be used for crypto operations. KeyStatusType_DISABLED KeyStatusType = 2 // Cannot be used, but exists and can become ENABLED. KeyStatusType_DESTROYED KeyStatusType = 3 // Key data does not exist in this Keyset any more. )
func (KeyStatusType) Descriptor ¶
func (KeyStatusType) Descriptor() protoreflect.EnumDescriptor
func (KeyStatusType) Enum ¶
func (x KeyStatusType) Enum() *KeyStatusType
func (KeyStatusType) EnumDescriptor
deprecated
func (KeyStatusType) EnumDescriptor() ([]byte, []int)
Deprecated: Use KeyStatusType.Descriptor instead.
func (KeyStatusType) Number ¶
func (x KeyStatusType) Number() protoreflect.EnumNumber
func (KeyStatusType) String ¶
func (x KeyStatusType) String() string
func (KeyStatusType) Type ¶
func (KeyStatusType) Type() protoreflect.EnumType
type KeyTemplate ¶
type KeyTemplate struct { // Required. The type_url of the key type in format // type.googleapis.com/packagename.messagename -- see above for details. // This is typically the protobuf type URL of the *Key proto. In particular, // this is different of the protobuf type URL of the *KeyFormat proto. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Required. The serialized *KeyFormat proto. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Required. The type of prefix used when computing some primitives to // identify the ciphertext/signature, etc. OutputPrefixType OutputPrefixType `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*KeyTemplate) Descriptor
deprecated
func (*KeyTemplate) Descriptor() ([]byte, []int)
Deprecated: Use KeyTemplate.ProtoReflect.Descriptor instead.
func (*KeyTemplate) GetOutputPrefixType ¶
func (x *KeyTemplate) GetOutputPrefixType() OutputPrefixType
func (*KeyTemplate) GetTypeUrl ¶
func (x *KeyTemplate) GetTypeUrl() string
func (*KeyTemplate) GetValue ¶
func (x *KeyTemplate) GetValue() []byte
func (*KeyTemplate) ProtoMessage ¶
func (*KeyTemplate) ProtoMessage()
func (*KeyTemplate) ProtoReflect ¶
func (x *KeyTemplate) ProtoReflect() protoreflect.Message
func (*KeyTemplate) Reset ¶
func (x *KeyTemplate) Reset()
func (*KeyTemplate) String ¶
func (x *KeyTemplate) String() string
type Keyset ¶
type Keyset struct { // Identifies key used to generate new crypto data (encrypt, sign). // Required. PrimaryKeyId uint32 `protobuf:"varint,1,opt,name=primary_key_id,json=primaryKeyId,proto3" json:"primary_key_id,omitempty"` // Actual keys in the Keyset. // Required. Key []*Keyset_Key `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
A Tink user works usually not with single keys, but with keysets, to enable key rotation. The keys in a keyset can belong to different implementations/key types, but must all implement the same primitive. Any given keyset (and any given key) can be used for one primitive only.
func (*Keyset) Descriptor
deprecated
func (*Keyset) GetKey ¶
func (x *Keyset) GetKey() []*Keyset_Key
func (*Keyset) GetPrimaryKeyId ¶
func (*Keyset) ProtoMessage ¶
func (*Keyset) ProtoMessage()
func (*Keyset) ProtoReflect ¶
func (x *Keyset) ProtoReflect() protoreflect.Message
type KeysetInfo ¶
type KeysetInfo struct { // See Keyset.primary_key_id. PrimaryKeyId uint32 `protobuf:"varint,1,opt,name=primary_key_id,json=primaryKeyId,proto3" json:"primary_key_id,omitempty"` // KeyInfos in the KeysetInfo. // Each KeyInfo is corresponding to a Key in the corresponding Keyset. KeyInfo []*KeysetInfo_KeyInfo `protobuf:"bytes,2,rep,name=key_info,json=keyInfo,proto3" json:"key_info,omitempty"` // contains filtered or unexported fields }
Represents a "safe" Keyset that doesn't contain any actual key material, thus can be used for logging or monitoring. Most fields are copied from Keyset.
func (*KeysetInfo) Descriptor
deprecated
func (*KeysetInfo) Descriptor() ([]byte, []int)
Deprecated: Use KeysetInfo.ProtoReflect.Descriptor instead.
func (*KeysetInfo) GetKeyInfo ¶
func (x *KeysetInfo) GetKeyInfo() []*KeysetInfo_KeyInfo
func (*KeysetInfo) GetPrimaryKeyId ¶
func (x *KeysetInfo) GetPrimaryKeyId() uint32
func (*KeysetInfo) ProtoMessage ¶
func (*KeysetInfo) ProtoMessage()
func (*KeysetInfo) ProtoReflect ¶
func (x *KeysetInfo) ProtoReflect() protoreflect.Message
func (*KeysetInfo) Reset ¶
func (x *KeysetInfo) Reset()
func (*KeysetInfo) String ¶
func (x *KeysetInfo) String() string
type KeysetInfo_KeyInfo ¶
type KeysetInfo_KeyInfo struct { // the type url of this key, // e.g., type.googleapis.com/google.crypto.tink.HmacKey. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // See Keyset.Key.status. Status KeyStatusType `protobuf:"varint,2,opt,name=status,proto3,enum=google.crypto.tink.KeyStatusType" json:"status,omitempty"` // See Keyset.Key.key_id. KeyId uint32 `protobuf:"varint,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // See Keyset.Key.output_prefix_type. OutputPrefixType OutputPrefixType `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*KeysetInfo_KeyInfo) Descriptor
deprecated
func (*KeysetInfo_KeyInfo) Descriptor() ([]byte, []int)
Deprecated: Use KeysetInfo_KeyInfo.ProtoReflect.Descriptor instead.
func (*KeysetInfo_KeyInfo) GetKeyId ¶
func (x *KeysetInfo_KeyInfo) GetKeyId() uint32
func (*KeysetInfo_KeyInfo) GetOutputPrefixType ¶
func (x *KeysetInfo_KeyInfo) GetOutputPrefixType() OutputPrefixType
func (*KeysetInfo_KeyInfo) GetStatus ¶
func (x *KeysetInfo_KeyInfo) GetStatus() KeyStatusType
func (*KeysetInfo_KeyInfo) GetTypeUrl ¶
func (x *KeysetInfo_KeyInfo) GetTypeUrl() string
func (*KeysetInfo_KeyInfo) ProtoMessage ¶
func (*KeysetInfo_KeyInfo) ProtoMessage()
func (*KeysetInfo_KeyInfo) ProtoReflect ¶
func (x *KeysetInfo_KeyInfo) ProtoReflect() protoreflect.Message
func (*KeysetInfo_KeyInfo) Reset ¶
func (x *KeysetInfo_KeyInfo) Reset()
func (*KeysetInfo_KeyInfo) String ¶
func (x *KeysetInfo_KeyInfo) String() string
type Keyset_Key ¶
type Keyset_Key struct { // Contains the actual, instantiation specific key proto. // By convention, each key proto contains a version field. KeyData *KeyData `protobuf:"bytes,1,opt,name=key_data,json=keyData,proto3" json:"key_data,omitempty"` Status KeyStatusType `protobuf:"varint,2,opt,name=status,proto3,enum=google.crypto.tink.KeyStatusType" json:"status,omitempty"` // Identifies a key within a keyset, is a part of metadata // of a ciphertext/signature. KeyId uint32 `protobuf:"varint,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Determines the prefix of the ciphertexts/signatures produced by this key. // This value is copied verbatim from the key template. OutputPrefixType OutputPrefixType `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Keyset_Key) Descriptor
deprecated
func (*Keyset_Key) Descriptor() ([]byte, []int)
Deprecated: Use Keyset_Key.ProtoReflect.Descriptor instead.
func (*Keyset_Key) GetKeyData ¶
func (x *Keyset_Key) GetKeyData() *KeyData
func (*Keyset_Key) GetKeyId ¶
func (x *Keyset_Key) GetKeyId() uint32
func (*Keyset_Key) GetOutputPrefixType ¶
func (x *Keyset_Key) GetOutputPrefixType() OutputPrefixType
func (*Keyset_Key) GetStatus ¶
func (x *Keyset_Key) GetStatus() KeyStatusType
func (*Keyset_Key) ProtoMessage ¶
func (*Keyset_Key) ProtoMessage()
func (*Keyset_Key) ProtoReflect ¶
func (x *Keyset_Key) ProtoReflect() protoreflect.Message
func (*Keyset_Key) Reset ¶
func (x *Keyset_Key) Reset()
func (*Keyset_Key) String ¶
func (x *Keyset_Key) String() string
type OutputPrefixType ¶
type OutputPrefixType int32
Tink produces and accepts ciphertexts or signatures that consist of a prefix and a payload. The payload and its format is determined entirely by the primitive, but the prefix has to be one of the following 4 types:
- Legacy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte key id that is computed from the key material. In addition to that, signature schemes and MACs will add a \x00 byte to the end of the data being signed / MACed when operating on keys with this OutputPrefixType.
- Crunchy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte key id that is generated randomly.
- Tink : prefix is 5 bytes, starts with \x01 and followed by 4-byte key id that is generated randomly.
- Raw : prefix is 0 byte, i.e., empty.
const ( OutputPrefixType_UNKNOWN_PREFIX OutputPrefixType = 0 OutputPrefixType_TINK OutputPrefixType = 1 OutputPrefixType_LEGACY OutputPrefixType = 2 OutputPrefixType_RAW OutputPrefixType = 3 OutputPrefixType_CRUNCHY OutputPrefixType = 4 )
func (OutputPrefixType) Descriptor ¶
func (OutputPrefixType) Descriptor() protoreflect.EnumDescriptor
func (OutputPrefixType) Enum ¶
func (x OutputPrefixType) Enum() *OutputPrefixType
func (OutputPrefixType) EnumDescriptor
deprecated
func (OutputPrefixType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OutputPrefixType.Descriptor instead.
func (OutputPrefixType) Number ¶
func (x OutputPrefixType) Number() protoreflect.EnumNumber
func (OutputPrefixType) String ¶
func (x OutputPrefixType) String() string
func (OutputPrefixType) Type ¶
func (OutputPrefixType) Type() protoreflect.EnumType