types

package
v0.0.0-...-b124b1e Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// NIST
	Nist // = 1
	// 国密
	Gm // = 2
)

定义创建账户时产生的助记词中的标记符的值,及其所对应的椭圆曲线密码学算法的类型

View Source
const (

	// 预留标记位的类型1
	ReservedType1
	// 预留标记位的类型2
	ReservedType2
)

定义创建账户时产生的助记词中的标记符的值,及其所对应的预留标记位的类型

View Source
const (
	// 美国Federal Information Processing Standards的椭圆曲线
	CurveNist = "P-256"
	// 国密椭圆曲线
	CurveGm = "SM2-P-256"
)

定义公私钥中所包含的标记符的值,及其所对应的椭圆曲线密码学算法的类型

View Source
const (
	// ECDSA签名算法
	ECDSA = "ECDSA"
	// Schnorr签名算法,EDDSA的前身
	Schnorr = "Schnorr"
	// Schnorr环签名算法
	SchnorrRing = "SchnorrRing"
	// 多重签名算法
	MultiSig = "MultiSig"
	// 门限签名算法
	TssSig = "TssSig"
	// Bls签名算法
	BlsSig = "BlsSig"
)

定义签名中所包含的标记符的值,及其所对应的签名算法的类型

Variables

View Source
var (
	InvalidInputParamsError        = errors.New("Invalid input params")
	NotExactTheSameCurveInputError = errors.New("The private keys of all the keys are not using the the same curve")

	TooSmallNumOfkeysError = errors.New("The total num of keys should be greater than one")
	EmptyMessageError      = errors.New("Message to be sign should not be nil")
	InValidSignatureError  = errors.New("XuperSignature is invalid")
)

Functions

func MarshalXuperSignature

func MarshalXuperSignature(sig *XuperSignature) ([]byte, error)

Types

type BlsSignature

type BlsSignature struct {
	S []byte
}

BLS签名

type ECDSASignature

type ECDSASignature struct {
	R, S *big.Int
}

ECDSA签名

type MultiSignature

type MultiSignature struct {
	S []byte
	R []byte
}

多重签名

type PublicKeyFactor

type PublicKeyFactor struct {
	X, Y *big.Int
}

type RingSignature

type RingSignature struct {
	CurveName string
	Members   []*PublicKeyFactor
	E         *big.Int
	S         []*big.Int
}

Schnorr环签名

type SchnorrSignature

type SchnorrSignature struct {
	E, S *big.Int
}

Schnorr签名,EDDSA的前身

type TssSignature

type TssSignature struct {
	S []byte
	R []byte
}

门限签名

type XuperSignature

type XuperSignature struct {
	SigType    string
	SigContent []byte
}

统一的签名结构

Jump to

Keyboard shortcuts

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