Documentation ¶
Index ¶
- Constants
- func GetCurveByName(curveName string) (elliptic.Curve, bool)
- func GetCurveName(curve elliptic.Curve) string
- type ECPoint
- func (p *ECPoint) Add(p1 *ECPoint) (*ECPoint, error)
- func (p *ECPoint) Equals(p2 *ECPoint) bool
- func (p *ECPoint) IsOnCurve() bool
- func (p *ECPoint) MarshalJSON() ([]byte, error)
- func (p *ECPoint) PointToEcdsaPubKey() string
- func (p *ECPoint) PointToEd25519PubKey() string
- func (p *ECPoint) ScalarMult(k *big.Int) *ECPoint
- func (p *ECPoint) SetCurve(curve elliptic.Curve) *ECPoint
- func (p *ECPoint) UnmarshalJSON(payload []byte) error
Constants ¶
View Source
const ( Secp256k1 string = "secp256k1" Ed25519 string = "ed25519" )
Variables ¶
This section is empty.
Functions ¶
func GetCurveName ¶
Types ¶
type ECPoint ¶
func EcdsaPubKeyToPoint ¶
func Ed25519PubKeyToPoint ¶
func ScalarToPoint ¶
ScalarToPoint return public key k*G
func (*ECPoint) MarshalJSON ¶
func (*ECPoint) PointToEcdsaPubKey ¶
func (*ECPoint) PointToEd25519PubKey ¶
func (*ECPoint) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.