identity

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Name string
	// contains filtered or unexported fields
}

Identity is an encapsulation of Name, PrivateKey and other features that make up a Ricochet client. The purpose of Identity is to prevent other classes directly accessing private key and to ensure the integrity of security-critical functions.

func Init

func Init(filename string) Identity

Init loads an identity from a file. Currently file should be a private_key but this may change in the future. //XXX

func Initialize

func Initialize(name string, pk *rsa.PrivateKey) Identity

Initialize is a courtesy function for initializing an Identity in-code.

func InitializeV3

func InitializeV3(name string, pk *ed25519.PrivateKey, pubk *ed25519.PublicKey) Identity

InitializeV3 is a courtesy function for initializing a V3 Identity in-code.

func (*Identity) EDH

func (i *Identity) EDH(key ed25519.PublicKey) []byte

EDH performs a diffie helman operation on this identities private key with the given public key.

func (*Identity) Hostname

func (i *Identity) Hostname() string

Hostname provides the onion address associated with this Identity.

func (*Identity) Initialized

func (i *Identity) Initialized() bool

Initialized ensures that an Identity has been assigned a private_key and is ready to perform operations.

func (*Identity) PublicKeyBytes

func (i *Identity) PublicKeyBytes() []byte

PublicKeyBytes returns the public key associated with this Identity in serializable-friendly format.

func (*Identity) Sign

func (i *Identity) Sign(challenge []byte) ([]byte, error)

Sign produces a cryptographic signature using this Identities private key.

Jump to

Keyboard shortcuts

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