secp256k1

package
v0.0.0-...-64dd8ac Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DERKeyTemplate

func DERKeyTemplate() (*tinkpb.KeyTemplate, error)

DERKeyTemplate is a KeyTemplate that generates a new ECDSA secp256k1 private key with the following parameters:

  • Hash function: SHA256
  • Curve: secp256k1
  • Signature encoding: DER
  • Output prefix type: TINK

func IEEEP1363KeyTemplate

func IEEEP1363KeyTemplate() (*tinkpb.KeyTemplate, error)

IEEEP1363KeyTemplate is a KeyTemplate that generates a new ECDSA secp256k1 private key with the following parameters:

  • Hash function: SHA256
  • Curve: secp256k1
  • Signature encoding: IEEE-P1363
  • Output prefix type: TINK

func NewSigner

func NewSigner(h *keyset.Handle) (tink.Signer, error)

NewSigner returns a Signer primitive from the given keyset handle.

func NewSignerWithKeyManager

func NewSignerWithKeyManager(h *keyset.Handle, km registry.KeyManager) (tink.Signer, error)

NewSignerWithKeyManager returns a Signer primitive from the given keyset handle and custom key manager. Deprecated: register the KeyManager and use New above.

func NewVerifier

func NewVerifier(h *keyset.Handle) (tink.Verifier, error)

NewVerifier returns a Verifier primitive from the given keyset handle.

func NewVerifierWithKeyManager

func NewVerifierWithKeyManager(h *keyset.Handle, km registry.KeyManager) (tink.Verifier, error)

NewVerifierWithKeyManager returns a Verifier primitive from the given keyset handle and custom key manager. Deprecated: register the KeyManager and use New above.

func ValidateSecp256K1Params

func ValidateSecp256K1Params(hashAlg, curve, encoding string) error

ValidateSecp256K1Params validates ECDSA parameters. The hash's strength must not be weaker than the curve's strength. DER and IEEE_P1363 encodings are supported.

Types

This section is empty.

Directories

Path Synopsis
Package subtle provides subtle implementations of the digital signature primitive.
Package subtle provides subtle implementations of the digital signature primitive.

Jump to

Keyboard shortcuts

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