saltpackkeys

package
v4.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRecipientKeyfinderEngineHook

func NewRecipientKeyfinderEngineHook(getKBFSKeyfinderForTesting bool) func(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface

func NewSaltpackKBFSKeyfinderEngineForTesting

func NewSaltpackKBFSKeyfinderEngineForTesting(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface

NewSaltpackKBFSKeyfinderEngineForTesting creates a SaltpackKBFSKeyfinderEngineForTesting engine.

func NewSaltpackRecipientKeyfinderEngineAsInterface

func NewSaltpackRecipientKeyfinderEngineAsInterface(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface

SaltpackRecipientKeyfinderEngine creates a SaltpackRecipientKeyfinderEngine engine.

func NewSaltpackRecipientKeyfinderEngineAsInterfaceForTesting

func NewSaltpackRecipientKeyfinderEngineAsInterfaceForTesting(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface

SaltpackRecipientKeyfinderEngineForTesting creates a SaltpackRecipientKeyfinderEngine engine. CORE-8423 remove this after most clients update

Types

type KeyPseudonymResolver

type KeyPseudonymResolver struct {
	// contains filtered or unexported fields
}

KeyPseudonymResolver resolves new (team based) Key Pseudonyms, but falls back to old Kbfs Pseudonyms when it cannot find any match. A mock implementation (which does not communicate with the sever and avoids circular dependencies) is available in the saltpackkeysmocks package.

func (*KeyPseudonymResolver) ResolveKeys

func (r *KeyPseudonymResolver) ResolveKeys(identifiers [][]byte) ([]*saltpack.SymmetricKey, error)

type SaltpackKBFSKeyfinderEngineForTesting

type SaltpackKBFSKeyfinderEngineForTesting struct {
	SaltpackSymmetricKeys []libkb.SaltpackReceiverSymmetricKey
	// contains filtered or unexported fields
}

SaltpackKBFSKeyfinderEngineForTesting is an engine to find kbfs keys to encrypt saltpack messages. These keys have been substituted with implicit team keys in the current version of the keybase app, so this engine is behind a devel only flag and is used only in tests to ensure backwards compatibility.

This engine silently ignores teams and other kinds of keys requested, so be careful! This code used to be part of the SaltpackEncrypt engine in engine/saltpack_encrypt.go.

func (*SaltpackKBFSKeyfinderEngineForTesting) GetPublicKIDs

func (e *SaltpackKBFSKeyfinderEngineForTesting) GetPublicKIDs() []keybase1.KID

func (*SaltpackKBFSKeyfinderEngineForTesting) GetSymmetricKeys

func (*SaltpackKBFSKeyfinderEngineForTesting) Name

Name is the unique engine name.

func (*SaltpackKBFSKeyfinderEngineForTesting) Prereqs

Prereqs returns the engine prereqs.

func (*SaltpackKBFSKeyfinderEngineForTesting) RequiredUIs

RequiredUIs returns the required UIs.

func (*SaltpackKBFSKeyfinderEngineForTesting) Run

func (*SaltpackKBFSKeyfinderEngineForTesting) SubConsumers

SubConsumers returns the other UI consumers for this engine.

type SaltpackRecipientKeyfinderEngine

type SaltpackRecipientKeyfinderEngine struct {
	engine.SaltpackUserKeyfinder
	SymmetricEntityKeyMap map[keybase1.TeamID](keybase1.TeamApplicationKey)
	SaltpackSymmetricKeys []libkb.SaltpackReceiverSymmetricKey

	SkipTlfKeysForTesting bool // CORE-8423 remove this after most clients update
}

SaltpackRecipientKeyfinderEngine is an engine to find Per User/Per Team Keys. Users can also be loaded by assertions, possibly tracking them if necessary.

SaltpackRecipientKeyfinderEngine extends the functionality of engine.SaltpackUserKeyfinder (which can only find user keys but not team keys). This is a separate object (and also not part of the engine package) to avoid circular dependencies (as teams depends on engine).

func (*SaltpackRecipientKeyfinderEngine) GetSymmetricKeys

func (*SaltpackRecipientKeyfinderEngine) Name

Name is the unique engine name.

func (*SaltpackRecipientKeyfinderEngine) Run

Jump to

Keyboard shortcuts

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