signature_p

package
v0.0.0-...-8b53a4d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PRIVATE_KEY = new(ecdsa.PrivateKey)
View Source
var PRIVATE_KEY_BYTES = []byte{}
View Source
var PRIVATE_KEY_HEX = ""
View Source
var PUBLIC_KEY = []byte{}
View Source
var PUBLIC_KEY_HEX = ""
View Source
var SIGNATURE = []byte{}
View Source
var SIGNATURE_HEX = ""

Functions

func GeneratePublicAndPrivateKey

func GeneratePublicAndPrivateKey()

func HashPublicKey

func HashPublicKey(publicKey []byte) []byte

Hash the public key to display on the blockchain. This is how BTC does it TODO: Implement this function for additional ***security*** and ***privacy***!

func RingSignature

func RingSignature() string

Merges transaction with other transactions on the chain to maintain anonymity

func SignTransaction

func SignTransaction(value string) []byte

Return the hex signature

func VerifySignature

func VerifySignature(block p2.Block) bool
To verify the data, we need

1. The data that was signed 2. The signature_p 3. The Public Key

So we need to add that to the Block Will likely take as input the signature_p

Types

type ECDSASignature

type ECDSASignature struct {
	R, S *big.Int
}

Need to make a ECDSASignature struct to verify

Jump to

Keyboard shortcuts

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