keymanagement

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package keymanagement provides utilities for managing cryptographic keys, specifically focusing on EdDSA (Poseidon hash over BN128 elliptic curve signature scheme) keys derived from Ethereum private keys.

It includes functions for deriving EdDSA keys from Ethereum private keys, loading EdDSA keys from files, and saving EdDSA keys to files securely.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveEdDSAKeyFromEthereumPrivateKey

func DeriveEdDSAKeyFromEthereumPrivateKey(privateKey *ecdsa.PrivateKey) (babyjub.PrivateKey, error)

DeriveEdDSAKeyFromEthereumPrivateKey derives an EdDSA (Poseidon hash over BN128 elliptic curve signature scheme) private key from an Ethereum private key. It signs a predefined message hash using the Ethereum private key and converts the resulting signature into an EdDSA private key for further use.

func LoadEdDSA

func LoadEdDSA(file string) (babyjub.PrivateKey, error)

LoadEdDSA loads a Baby Jubjub private key from the given file.

Source: https://github.com/ethereum/go-ethereum/blob/285202aae2a580b82f30ebd909c1819b22d90066/crypto/crypto.go#L194

func SaveEdDSA

func SaveEdDSA(file string, key babyjub.PrivateKey) error

SaveEdDSA saves a Baby Jubjub private key to the given file with restrictive permissions. The key data is saved hex-encoded.

Source: https://github.com/ethereum/go-ethereum/blob/285202aae2a580b82f30ebd909c1819b22d90066/crypto/crypto.go#L250

Types

This section is empty.

Jump to

Keyboard shortcuts

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