crypto

package
v0.4.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

It converts a `WebauthnCredential` to a `webauthn.Credential`

Index

Constants

BTCCoinType is the CoinType for Bitcoin.

View Source
const COSMOSCoinType = types.CoinType_CoinType_COSMOS

COSMOSCoinType is the CoinType for Cosmos.

DOGECoinType is the CoinType for Dogecoin.

ETHCoinType is the CoinType for Ethereum.

Ed25519KeyType is the key type for ed25519.

FILECOINCoinType is the CoinType for Filecoin.

HNSCoinType is the CoinType for Handshake.

LTCCoinType is the CoinType for Litecoin.

RSAKeyType is the key type for RSA.

SOLCoinType is the CoinType for Solana.

SONRCoinType is the CoinType for Sonr.

Secp256k1KeyType is the key type for secp256k1.

TestCoinType is the CoinType for Testnet.

WebAuthnKeyType is the key type for WebAuthn.

XRPCoinType is the CoinType for XRP.

Variables

View Source
var AllCoinTypes = types.AllCoinTypes

AllCoinTypes is a slice of all CoinTypes.

Functions

func NewWebAuthnCredential added in v0.3.1

NewWebAuthnCredential creates a new WebauthnCredential from a ParsedCredentialCreationData and contains all needed information about a WebAuthn credential for storage. This is then used to create a VerificationMethod for the DID Document.

Types

type CoinType added in v0.3.1

type CoinType = types.CoinType

CoinType is a type alias for types.CoinType in pkg/crypto/internal/types.

func CoinTypeFromAddrPrefix added in v0.4.3

func CoinTypeFromAddrPrefix(str string) CoinType

CoinTypeFromAddrPrefix returns the CoinType from the public key address prefix (btc, eth).

func CoinTypeFromBipPath added in v0.4.3

func CoinTypeFromBipPath(i int32) CoinType

CoinTypeFromBipPath returns the CoinType from the BIP Path (0, 60).

func CoinTypeFromDidMethod added in v0.4.3

func CoinTypeFromDidMethod(str string) CoinType

CoinTypeFromDidMethod returns the CoinType from the DID Method (btc, eth).

func CoinTypeFromName added in v0.4.3

func CoinTypeFromName(str string) CoinType

CoinTypeFromName returns the CoinType from the Blockchain name (Bitcoin, Ethereum).

func CoinTypeFromTicker added in v0.4.3

func CoinTypeFromTicker(str string) CoinType

CoinTypeFromTicker returns the CoinType from the tokens Ticker (BTC, ETH).

type KeyType added in v0.3.1

type KeyType = types.KeyType

KeyType is a type alias for types.KeyType in pkg/crypto/internal/types.

type MPCCmpConfig added in v0.3.2

type MPCCmpConfig = cmp.Config

MPCCmpConfig is a type alias for pool.CmpConfig in pkg/pool.

type MPCECDSASignature added in v0.3.2

type MPCECDSASignature = ecdsa.Signature

MPCECDSASignature is a type alias for ecdsa.Signature in pkg/ecdsa.

func NewEmptyECDSASecp256k1Signature added in v0.3.2

func NewEmptyECDSASecp256k1Signature() MPCECDSASignature

NewEmptyECDSASecp256k1Signature creates a new empty MPCECDSASignature.

type MPCPool added in v0.3.2

type MPCPool = pool.Pool

MPCPool is a type alias for pool.Pool in pkg/pool.

func NewMPCPool added in v0.3.2

func NewMPCPool(size int) *MPCPool

NewMPCPool creates a new MPCPool with the given size.

type MPCSecp256k1Curve added in v0.3.2

type MPCSecp256k1Curve = curve.Secp256k1

MPCSecp256k1Curve is a type alias for curve.Secp256k1Point in pkg/math/curve.

type MPCSecp256k1Point added in v0.3.2

type MPCSecp256k1Point = curve.Secp256k1Point

MPCSecp256k1Point is a type alias for curve.Secp256k1Point in pkg/math/curve.

type Network

type Network interface {
	// Ls returns a list of peers that are connected to the network.
	Ls() []party.ID

	// A function that takes in a party ID and returns a channel of protocol messages.
	Next(id party.ID) <-chan *protocol.Message

	// Sending a message to the network.
	Send(msg *protocol.Message)

	// A channel that is closed when the party is done with the protocol.
	Done(id party.ID) chan struct{}

	// A function that is called when a party is done with the protocol.
	Quit(id party.ID)

	// IsOnlineNetwork returns true if the network is an online network.
	IsOnlineNetwork() bool
}

A Network is a channel that sends messages to parties and receives messages from parties.

type PartyID added in v0.3.2

type PartyID = party.ID

PartyID is a type alias for party.ID in pkg/party.

type PeerID added in v0.3.2

type PeerID = peer.ID

PeerID is a type alias for peer.ID in pkg/peer.

type PubKey

type PubKey = types.PubKey

PubKey is a type alias for types.PubKey in pkg/crypto/internal/types.

func NewEd25519PubKey added in v0.3.1

func NewEd25519PubKey(bz []byte) *PubKey

NewEd25519PubKey takes a byte array of raw public key bytes and returns a PubKey.

func NewRSAPubKey added in v0.3.1

func NewRSAPubKey(bz []byte) *PubKey

NewRSAPubKey takes a byte array of raw public key bytes and returns a PubKey.

func NewSecp256k1PubKey added in v0.3.1

func NewSecp256k1PubKey(bz []byte) *PubKey

NewSecp256k1PubKey takes a byte array of raw public key bytes and returns a PubKey.

func NewWebAuthnPubKey added in v0.3.1

func NewWebAuthnPubKey(bz []byte) *PubKey

NewWebAuthnPubKey takes a byte array of raw public key bytes and returns a PubKey.

func PubKeyFromBytes added in v0.3.1

func PubKeyFromBytes(bz []byte) (*PubKey, error)

PubKeyFromBytes takes a byte array and returns a PubKey

func PubKeyFromCommon added in v0.3.1

func PubKeyFromCommon(pk SNRPubKey) (*PubKey, error)

PubKeyFromCommon takes a common.SNRPubKey and returns a PubKey

func PubKeyFromDID added in v0.3.1

func PubKeyFromDID(did string) (*PubKey, error)

It takes a string of a DID, decodes it from base58, unmarshals it into a PubKey, and returns the PubKey

func PubKeyFromWebAuthn added in v0.3.1

func PubKeyFromWebAuthn(cred *types.WebauthnCredential) (*PubKey, error)

PubKeyFromWebAuthn takes a webauthncose.Key and returns a PubKey

type SNRPubKey added in v0.3.1

type SNRPubKey = common.SNRPubKey

SNRPubKey is a type alias for common.SNRPubKey in pkg/common.

type WebauthnAuthenticator added in v0.3.1

type WebauthnAuthenticator = types.WebauthnAuthenticator

WebauthnAuthenticator is a type alias for types.WebauthnAuthenticator in pkg/crypto/internal/types.

type WebauthnCredential added in v0.3.1

type WebauthnCredential = types.WebauthnCredential

WebauthnCredential is a type alias for types.WebauthnCredential in pkg/crypto/internal/types.

Directories

Path Synopsis
mpc

Jump to

Keyboard shortcuts

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