Source File
doc.go
Belonging Package
github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa
// Copyright (c) 2020-2023 The Decred developers// Use of this source code is governed by an ISC// license that can be found in the LICENSE file./*Package ecdsa provides secp256k1-optimized ECDSA signing and verification.This package provides data structures and functions necessary to produce andverify deterministic canonical signatures in accordance with RFC6979 andBIP0062, optimized specifically for the secp256k1 curve using the Elliptic CurveDigital Signature Algorithm (ECDSA), as defined in FIPS 186-3. Seehttps://www.secg.org/sec2-v2.pdf for details on the secp256k1 standard.It also provides functions to parse and serialize the ECDSA signatures with themore strict Distinguished Encoding Rules (DER) of ISO/IEC 8825-1 and someadditional restrictions specific to secp256k1.In addition, it supports a custom "compact" signature format which allowsefficient recovery of the public key from a given valid signature and messagehash combination.A comprehensive suite of tests is provided to ensure proper functionality.# ECDSA use in DecredAt the time of this writing, ECDSA signatures are heavily used for proving coinownership in Decred as the vast majority of transactions consist of what iseffectively transferring ownership of coins to a public key associated with aprivate key only known to the recipient of the coins along with an encumbrancethat requires an ECDSA signature that proves the new owner possesses the privatekey without actually revealing it.# ErrorsThe errors returned by this package are of type ecdsa.Error and fully supportthe standard library errors.Is and errors.As functions. This allows the callerto programmatically determine the specific error by examining the ErrorKindfield of the type asserted ecdsa.Error while still providing rich error messageswith contextual information. See ErrorKind in the package documentation for afull list.*/package ecdsa
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |