voucher/internal/pkg/cmbv2/model/model.go

35 lines
512 B
Go

package model
import (
"crypto/elliptic"
"math/big"
)
var (
One = new(big.Int).SetInt64(1)
DefaultUid = []byte{0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38}
VerifyFalse = []byte{0x30}
VerifyTrue = []byte{0x31}
)
type CipherType int32
const (
C1C2C3 CipherType = 1
C1C3C2 CipherType = 2
)
type PublicKey struct {
elliptic.Curve
X, Y *big.Int
}
type PrivateKey struct {
*PublicKey
D *big.Int
}
type Signature struct {
R, S *big.Int
}