crypto

package
v0.4.37 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package crypto provides support for converting secp256k1 keys between Flow and SEC compressed formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDERSignature added in v0.4.23

func ConvertDERSignature(sig string) (string, error)

ConvertDERSignature re-encodes a DER-encoded ECDSA signature into the format expected by Flow.

func ConvertFlowPublicKey

func ConvertFlowPublicKey(key []byte) ([]byte, error)

ConvertFlowPublicKey re-encodes a secp256k1 public key from the format used by Flow to the SEC compressed format.

func ConvertFlowSignature added in v0.4.23

func ConvertFlowSignature(sig string) (string, error)

ConvertFlowSignature re-encodes an ECDSA signature from Flow's format into DER encoding.

The format of a DER encoded signature for secp256k1 is as follows:

0x30 <total length> 0x02 <length of R> <R> 0x02 <length of S> <S>

func ConvertRosettaPublicKey

func ConvertRosettaPublicKey(key []byte) ([]byte, error)

ConvertRosettaPublicKey re-encodes a SEC compressed secp256k1 public key to the format expected by Flow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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