Documentation ¶
Overview ¶
Package vcrypt is a generated protocol buffer package.
It is generated from these files:
vcrypt.proto marker.proto node.proto plan.proto vault.proto
It has these top-level messages:
Envelope
Index ¶
- Variables
- func Armor(msg Message) ([]byte, error)
- func Marshal(msg Message) ([]byte, error)
- type Driver
- type Envelope
- func (this *Envelope) GetValue() interface{}
- func (m *Envelope) Marshal() (data []byte, err error)
- func (m *Envelope) MarshalTo(data []byte) (int, error)
- func (e *Envelope) Message() (Message, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (this *Envelope) SetValue(value interface{}) bool
- func (m *Envelope) Size() (n int)
- func (m *Envelope) String() string
- func (m *Envelope) Unmarshal(data []byte) error
- type Graph
- type Marker
- type Message
- type Node
- func (n *Node) Comment() (string, error)
- func (n *Node) Cryptex() (cryptex.Cryptex, error)
- func (n *Node) Digest() ([]byte, error)
- func (this *Node) GetValue() interface{}
- func (m *Node) Marshal() (data []byte, err error)
- func (m *Node) MarshalTo(data []byte) (int, error)
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (n *Node) Secret() (secret.Secret, error)
- func (this *Node) SetValue(value interface{}) bool
- func (m *Node) Size() (n int)
- func (m *Node) String() string
- func (n *Node) Type() NodeType
- func (m *Node) Unmarshal(data []byte) error
- type NodeType
- type Plan
- func (p *Plan) AddSeal(slr Sealer) (seal.Seal, error)
- func (p *Plan) BFS(fn func(*Node) error) error
- func (p *Plan) Comment() string
- func (p *Plan) Digest() ([]byte, error)
- func (p *Plan) Graph() (*Graph, error)
- func (m *Plan) Marshal() (data []byte, err error)
- func (m *Plan) MarshalTo(data []byte) (int, error)
- func (*Plan) ProtoMessage()
- func (m *Plan) Reset()
- func (p *Plan) Seals() ([]seal.Seal, error)
- func (m *Plan) Size() (n int)
- func (m *Plan) String() string
- func (m *Plan) Unmarshal(data []byte) error
- type Sealer
- type Vault
- func (v *Vault) Comment() string
- func (v *Vault) Digest() ([]byte, error)
- func (v *Vault) Lock(r io.Reader, drv Driver) error
- func (m *Vault) Marshal() (data []byte, err error)
- func (m *Vault) MarshalTo(data []byte) (int, error)
- func (v *Vault) Payload() (payload.Payload, error)
- func (*Vault) ProtoMessage()
- func (m *Vault) Reset()
- func (v *Vault) Seals() ([]seal.Seal, error)
- func (m *Vault) Size() (n int)
- func (m *Vault) String() string
- func (v *Vault) Unlock(w io.Writer, drv Driver) (unlocked bool, err error)
- func (m *Vault) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidLengthMarker = fmt.Errorf("proto: negative length found during unmarshaling")
)
var (
ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling")
)
var (
ErrInvalidLengthPlan = fmt.Errorf("proto: negative length found during unmarshaling")
)
var (
ErrInvalidLengthVault = fmt.Errorf("proto: negative length found during unmarshaling")
)
var (
ErrInvalidLengthVcrypt = fmt.Errorf("proto: negative length found during unmarshaling")
)
Functions ¶
Types ¶
type Driver ¶
type Driver interface { material.DB // LockPayload encrypts the Reader data and returns the payload and decryption key. LockPayload(io.Reader) (payload.Payload, []byte, error) // LoadSecret returns the secret data for a Secret. LoadSecret(secret.Secret) (data [][]byte, skip bool, err error) }
Driver is an interface for an interactive vault processor.
type Envelope ¶
type Envelope struct { Plan *Plan `protobuf:"bytes,1,opt,name=plan" json:"plan,omitempty"` Material *material.Material `protobuf:"bytes,2,opt,name=material" json:"material,omitempty"` Vault *Vault `protobuf:"bytes,3,opt,name=vault" json:"vault,omitempty"` }
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
type Graph ¶
Graph encodes an encryption plan into discrete steps represented as Nodes.
func BuildGraph ¶
BuildGraph constructs a graph from a slice of Nodes.
type Marker ¶
type Marker struct {
Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`
}
func (*Marker) ProtoMessage ¶
func (*Marker) ProtoMessage()
type Message ¶
type Message interface { // Marshal returns the binary representation of the Message. Marshal() (data []byte, err error) // Unmarshal parses the Message encoded in data. Unmarshal(data []byte) error Comment() string Digest() ([]byte, error) }
Message is a top-level data structure for exporting & importing.
type Node ¶
type Node struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Inputs [][]byte `protobuf:"bytes,2,rep,name=inputs" json:"inputs,omitempty"` Marker *Marker `protobuf:"bytes,5,opt,name=marker" json:"marker,omitempty"` // contains filtered or unexported fields }
func NewCryptexNode ¶
NewCryptexNode constructs a node with the marshaled cryptex data.
func NewMarkerNode ¶
NewMarkerNode constructs a node with a marker for material data.
func NewSecretNode ¶
NewSecretNode constructs a node with the marshaled secret data.
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type Plan ¶
type Plan struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Nodes []*Node `protobuf:"bytes,3,rep,name=nodes" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*Plan) AddSeal ¶
AddSeal adds a Seal for the Plan from the nonce, root node, and comment data.
func (*Plan) ProtoMessage ¶
func (*Plan) ProtoMessage()
type Sealer ¶
type Sealer interface { // Seal constructs a new seal for the data. Seal([]byte) (seal.Seal, error) }
Sealer is an interface for the Seal method.
type Vault ¶
type Vault struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Plan *Plan `protobuf:"bytes,3,opt,name=plan" json:"plan,omitempty"` Materials []*material.Material `protobuf:"bytes,4,rep,name=materials" json:"materials,omitempty"` // contains filtered or unexported fields }
func (*Vault) Lock ¶
Lock encrypts a vault by building an encrypted Payload from r. It then secures the decryption key in a multi-step encryption scheme described in the Plan.
func (*Vault) ProtoMessage ¶
func (*Vault) ProtoMessage()
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package cryptex is a generated protocol buffer package.
|
Package cryptex is a generated protocol buffer package. |
internal
|
|
Package material is a generated protocol buffer package.
|
Package material is a generated protocol buffer package. |
Package payload is a generated protocol buffer package.
|
Package payload is a generated protocol buffer package. |
Package seal is a generated protocol buffer package.
|
Package seal is a generated protocol buffer package. |
Package secret is a generated protocol buffer package.
|
Package secret is a generated protocol buffer package. |