cryptengine

package
Version: v0.0.0-...-30b4a77 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Overview

Package cryptengine implements the command engine for mutecrypt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptEngine

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

CryptEngine abstracts a mutecrypt command engine.

func New

func New() *CryptEngine

New returns a new Mute crypt engine.

func (*CryptEngine) AddSessionKey

func (ce *CryptEngine) AddSessionKey(
	hash, json, privKey string,
	cleanupTime uint64,
) error

AddSessionKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) CleanupSessionKeys

func (ce *CryptEngine) CleanupSessionKeys(t uint64) error

CleanupSessionKeys implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) Close

func (ce *CryptEngine) Close() error

Close the underlying database of the crypt engine.

func (*CryptEngine) DelMessageKey

func (ce *CryptEngine) DelMessageKey(
	sessionKey string,
	sender bool,
	msgIndex uint64,
) error

DelMessageKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) DelPrivSessionKey

func (ce *CryptEngine) DelPrivSessionKey(hash string) error

DelPrivSessionKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetChainKey

func (ce *CryptEngine) GetChainKey(sessionKey string) (*[32]byte, error)

GetChainKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetMessageKey

func (ce *CryptEngine) GetMessageKey(
	sessionKey string,
	sender bool,
	msgIndex uint64,
) (*[64]byte, error)

GetMessageKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetPrivateKeyEntry

func (ce *CryptEngine) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error)

GetPrivateKeyEntry implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetPublicKeyEntry

func (ce *CryptEngine) GetPublicKeyEntry(uidMsg *uid.Message) (*uid.KeyEntry, string, error)

GetPublicKeyEntry implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetRootKeyHash

func (ce *CryptEngine) GetRootKeyHash(sessionKey string) (*[64]byte, error)

GetRootKeyHash implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetSessionKey

func (ce *CryptEngine) GetSessionKey(hash string) (
	json, privKey string,
	err error,
)

GetSessionKey implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) GetSessionState

func (ce *CryptEngine) GetSessionState(sessionStateKey string) (
	*session.State,
	error,
)

GetSessionState implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) HasSession

func (ce *CryptEngine) HasSession(sessionKey string) bool

HasSession implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) NumMessageKeys

func (ce *CryptEngine) NumMessageKeys(sessionKey string) (uint64, error)

NumMessageKeys implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) SetSessionState

func (ce *CryptEngine) SetSessionState(
	sessionStateKey string,
	sessionState *session.State,
) error

SetSessionState implements corresponding method for msg.KeyStore interface.

func (*CryptEngine) Start

func (ce *CryptEngine) Start(args []string) error

Start starts the crypt engine with the given args.

func (*CryptEngine) StoreSession

func (ce *CryptEngine) StoreSession(
	sessionKey, rootKeyHash, chainKey string,
	send, recv []string,
) error

StoreSession implements corresponding method for msg.KeyStore interface.

Directories

Path Synopsis
Package cache caches the key server capabilities and clients used for mutecrypt's cryptengine.
Package cache caches the key server capabilities and clients used for mutecrypt's cryptengine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL