crypto

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 4 Imported by: 507

README

go-libp2p-crypto

GoDoc Build Status Discourse posts

Various cryptographic utilities used by ipfs

Table of Contents

Install

go get github.com/libp2p/go-libp2p-crypto

Usage

Go to https://godoc.org/github.com/libp2p/go-libp2p-crypto.

Contribute

Feel free to join in. All welcome. Open an issue!

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2016 Jeromy Johnson


The last gx published version of this module was: 2.0.7: QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK

Documentation

Overview

Deprecated: use github.com/libp2p/go-libp2p-core/crypto instead.

Index

Constants

View Source
const (
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.RSA instead.
	RSA = core.RSA
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Ed25519 instead.
	Ed25519 = core.Ed25519
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Secp256k1 instead.
	Secp256k1 = core.Secp256k1
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSA instead.
	ECDSA = core.ECDSA
)

Variables

View Source
var (
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ErrNotECDSAPubKey instead.
	ErrNotECDSAPubKey = core.ErrNotECDSAPubKey
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ErrNilSig instead.
	ErrNilSig = core.ErrNilSig
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ErrNilPrivateKey instead.
	ErrNilPrivateKey = core.ErrNilPrivateKey
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSACurve instead.
	ECDSACurve = core.ECDSACurve
)
View Source
var (
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ErrBadKeyType instead.
	ErrBadKeyType = core.ErrBadKeyType
	// Deprecated: use github.com/libp2p/go-libp2p-core/crypto.KeyTypes instead.
	KeyTypes = core.KeyTypes
)
View Source
var ErrRsaKeyTooSmall = core.ErrRsaKeyTooSmall

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ErrRsaKeyTooSmall instead.

View Source
var PrivKeyUnmarshallers = core.PrivKeyUnmarshallers

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PrivKeyUnmarshallers instead.

View Source
var PubKeyUnmarshallers = core.PubKeyUnmarshallers

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PubKeyUnmarshallers instead.

Functions

func ConfigDecodeKey deprecated

func ConfigDecodeKey(b string) ([]byte, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ConfigDecodeKey instead.

func ConfigEncodeKey deprecated

func ConfigEncodeKey(b []byte) string

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ConfigEncodeKey instead.

func ECDSAKeyPairFromKey deprecated

func ECDSAKeyPairFromKey(priv *ecdsa.PrivateKey) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSAKeyPairFromKey instead.

func GenerateECDSAKeyPair deprecated

func GenerateECDSAKeyPair(src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateECDSAKeyPair instead.

func GenerateECDSAKeyPairWithCurve deprecated

func GenerateECDSAKeyPairWithCurve(curve elliptic.Curve, src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateECDSAKeyPairWithCurve instead.

func GenerateEd25519Key deprecated

func GenerateEd25519Key(src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateEd25519Key instead.

func GenerateKeyPair deprecated

func GenerateKeyPair(typ, bits int) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateKeyPair instead.

func GenerateKeyPairWithReader deprecated

func GenerateKeyPairWithReader(typ, bits int, src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateKeyPairWithReader instead.

func GenerateRSAKeyPair deprecated

func GenerateRSAKeyPair(bits int, src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateRSAKeyPair instead.

func GenerateSecp256k1Key deprecated

func GenerateSecp256k1Key(src io.Reader) (PrivKey, PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateSecp256k1Key instead.

func KeyEqual deprecated

func KeyEqual(k1, k2 Key) bool

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.KeyEqual instead.

func KeyStretcher deprecated

func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedKeys, StretchedKeys)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.KeyStretcher instead.

func MarshalECDSAPrivateKey deprecated

func MarshalECDSAPrivateKey(ePriv ECDSAPrivateKey) ([]byte, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.MarshalECDSAPrivateKey instead.

func MarshalECDSAPublicKey deprecated

func MarshalECDSAPublicKey(ePub ECDSAPublicKey) ([]byte, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.MarshalECDSAPublicKey instead.

func MarshalPrivateKey deprecated

func MarshalPrivateKey(k PrivKey) ([]byte, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.MarshalPrivateKey instead.

func MarshalPublicKey deprecated

func MarshalPublicKey(k PubKey) ([]byte, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.MarshalPublicKey instead.

Types

type ECDSAPrivateKey deprecated

type ECDSAPrivateKey = core.ECDSAPrivateKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSAPrivateKey instead.

type ECDSAPublicKey deprecated

type ECDSAPublicKey = core.ECDSAPublicKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSAPublicKey instead.

type ECDSASig deprecated

type ECDSASig = core.ECDSASig

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.ECDSASig instead.

type Ed25519PrivateKey deprecated

type Ed25519PrivateKey = core.Ed25519PrivateKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Ed25519PrivateKey instead.

type Ed25519PublicKey deprecated

type Ed25519PublicKey = core.Ed25519PublicKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Ed25519PublicKey instead.

type GenSharedKey deprecated

type GenSharedKey = core.GenSharedKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenSharedKey instead.

func GenerateEKeyPair deprecated

func GenerateEKeyPair(curveName string) ([]byte, GenSharedKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenerateEKeyPair instead.

type Key deprecated

type Key = core.Key

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Key instead.

type PrivKey deprecated

type PrivKey = core.PrivKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PrivKey instead.

func UnmarshalECDSAPrivateKey deprecated

func UnmarshalECDSAPrivateKey(data []byte) (PrivKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalECDSAPrivateKey instead.

func UnmarshalEd25519PrivateKey deprecated

func UnmarshalEd25519PrivateKey(data []byte) (PrivKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalEd25519PrivateKey instead.

func UnmarshalPrivateKey deprecated

func UnmarshalPrivateKey(data []byte) (PrivKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalPrivateKey instead.

func UnmarshalRsaPrivateKey deprecated

func UnmarshalRsaPrivateKey(b []byte) (PrivKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalRsaPrivateKey instead.

func UnmarshalSecp256k1PrivateKey deprecated

func UnmarshalSecp256k1PrivateKey(data []byte) (PrivKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalSecp256k1PrivateKey instead.

type PrivKeyUnmarshaller deprecated

type PrivKeyUnmarshaller = core.PrivKeyUnmarshaller

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PrivKeyUnmarshaller instead.

type PubKey deprecated

type PubKey = core.PubKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PubKey instead.

func UnmarshalECDSAPublicKey deprecated

func UnmarshalECDSAPublicKey(data []byte) (PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalECDSAPublicKey instead.

func UnmarshalEd25519PublicKey deprecated

func UnmarshalEd25519PublicKey(data []byte) (PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalEd25519PublicKey instead.

func UnmarshalPublicKey deprecated

func UnmarshalPublicKey(data []byte) (PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalPublicKey instead.

func UnmarshalRsaPublicKey deprecated

func UnmarshalRsaPublicKey(b []byte) (PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalRsaPublicKey instead.

func UnmarshalSecp256k1PublicKey deprecated

func UnmarshalSecp256k1PublicKey(data []byte) (PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.UnmarshalSecp256k1PublicKey instead.

type PubKeyUnmarshaller deprecated

type PubKeyUnmarshaller = core.PubKeyUnmarshaller

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.PubKeyUnmarshaller instead.

type RsaPrivateKey deprecated

type RsaPrivateKey = core.RsaPrivateKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.RsaPrivateKey instead.

type RsaPublicKey deprecated

type RsaPublicKey = core.RsaPublicKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.RsaPublicKey instead.

type Secp256k1PrivateKey deprecated

type Secp256k1PrivateKey = core.Secp256k1PrivateKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Secp256k1PrivateKey instead.

type Secp256k1PublicKey deprecated

type Secp256k1PublicKey = core.Secp256k1PublicKey

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.Secp256k1PublicKey instead.

type StretchedKeys deprecated

type StretchedKeys = core.StretchedKeys

Deprecated: use github.com/libp2p/go-libp2p-core/crypto.GenSharedKey instead.

Directories

Path Synopsis
Deprecated: use github.com/libp2p/go-libp2p-core/crypto/pb instead.
Deprecated: use github.com/libp2p/go-libp2p-core/crypto/pb instead.
Deprecated: use github.com/libp2p/go-libp2p-core/test instead.
Deprecated: use github.com/libp2p/go-libp2p-core/test instead.

Jump to

Keyboard shortcuts

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