ecutil

package
v2.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ecutil defines tools that help with elliptic curve related computation

Index

Constants

This section is empty.

Variables

This section is empty.

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 CalculateKeySize added in v2.0.16

func CalculateKeySize(crv elliptic.Curve) int

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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