Deprecated: This version of github.com/lestrrat-go/jwx is deprecated. Please use github.com/lestrrat-go/jwx/v3 or newer instead.

package ecutil

import "github.com/lestrrat-go/jwx/internal/ecutil"

Package ecutil defines tools that help with elliptic curve related computation

Index

Functions

func AlgorithmForCurve

func AlgorithmForCurve(crv elliptic.Curve) (jwa.EllipticCurveAlgorithm, bool)

func AllocECPointBuffer

func AllocECPointBuffer(v *big.Int, crv elliptic.Curve) []byte

AllocECPointBuffer allocates a buffer for the given point in the given curve. This buffer should be released using the ReleaseECPointBuffer function.

func AvailableAlgorithms

func AvailableAlgorithms() []jwa.EllipticCurveAlgorithm

func AvailableCurves

func AvailableCurves() []elliptic.Curve

func CurveForAlgorithm

func CurveForAlgorithm(alg jwa.EllipticCurveAlgorithm) (elliptic.Curve, bool)

func IsAvailable

func IsAvailable(alg jwa.EllipticCurveAlgorithm) bool

func RegisterCurve

func RegisterCurve(crv elliptic.Curve, alg jwa.EllipticCurveAlgorithm)

func ReleaseECPointBuffer

func ReleaseECPointBuffer(buf []byte)

ReleaseECPointBuffer releases the []byte buffer allocated.

Source Files

ecutil.go

Version
v1.2.31 (latest)
Published
Apr 9, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
3 weeks ago

Tools for package owners.