p521

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package p521 implements RFC9380 for the P521 group.

Index

Constants

View Source
const (
	// H2CP521 represents the hash-to-curve string identifier for P521.
	H2CP521 = "P521_XMD:SHA-512_SSWU_RO_"

	// E2CP521 represents the encode-to-curve string identifier for P521.
	E2CP521 = "P521_XMD:SHA-512_SSWU_NU_"
)

Variables

This section is empty.

Functions

func EncodeToCurve

func EncodeToCurve(input, dst []byte) *nistec.P521Point

EncodeToCurve implements encode-to-curve mapping to P521 of input with dst. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.

func HashToCurve

func HashToCurve(input, dst []byte) *nistec.P521Point

HashToCurve implements hash-to-curve mapping to P521 of input with dst. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.

func HashToScalar

func HashToScalar(input, dst []byte) *big.Int

HashToScalar returns a safe mapping of the arbitrary input to a scalar for the prime-order group of P521. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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