Documentation ¶
Index ¶
- Constants
- Variables
- func IsInSubGroup(p *Point) bool
- func IsZero(p *Point) bool
- func RandomValue() *big.Int
- func ToBytes(p *Point) []byte
- func ToString(p *Point) string
- func VecToBytes(vp []*Point) ([]byte, error)
- type Point
- func Add(a, b *Point) *Point
- func FromBytes(pBytes []byte) (*Point, error)
- func FromString(pStr string) (*Point, error)
- func MapToGroup(seed string) (H *Point, err error)
- func Neg(a *Point) *Point
- func ScalarBaseMul(a *big.Int) *Point
- func ScalarMul(p *Point, a *big.Int) *Point
- func ZeroPoint() *Point
- type PrivateKey
- type PublicKey
Constants ¶
View Source
const ( SeedH = "ZkBNBTwistedEdwardsBn254HSeed" SeedU = "ZkBNBTwistedEdwardsBn254USeed" PointSize = 32 )
Variables ¶
View Source
var ( ErrMapToGroup = errors.New("Failed to Hash-to-point.") ErrInvalidPointSize = errors.New("err: invalid point size") )
Functions ¶
func IsInSubGroup ¶
func RandomValue ¶
func VecToBytes ¶
Types ¶
type Point ¶
type Point = twistededwards.PointAffine
func FromString ¶
func MapToGroup ¶
func ScalarBaseMul ¶
type PrivateKey ¶
type PrivateKey = eddsa.PrivateKey
func GenerateEddsaPrivateKey ¶
func GenerateEddsaPrivateKey(seed string) (sk *PrivateKey, err error)
GenerateEddsaPrivateKey: generate eddsa private key
func GenerateKey ¶
func GenerateKey(r io.Reader) (*PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.