This article is a mirror article of machine translation, please click here to jump to the original article.

View: 959|Reply: 2

[Source] The secp256k1 algorithm behind cryptocurrencies in the blockchain

[Copy link]
Posted on 2025-4-12 18:22:07 | | | |
secp256k1 refers to the parameters of the elliptic curve used in Bitcoin's public key cryptography, which is defined in the Standards for Efficient Cryptography (SEC), with reference to Certicom Research:The hyperlink login is visible.。 Currently, the secp256k1 and ECDSA algorithms are used in Bitcoin. Originating from the application in Bitcoin, most blockchain projects such as Ethereum are used later.

Before Bitcoin, secp256k1 was almost never used, but it is now becoming more and more popular due to its several nice features. Most commonly used curves have a stochastic structure, but secp256k1 is constructed in a special, non-random way, allowing for efficient computations. If fully optimized, it is usually more than 30% faster than other curves. In addition, unlike the popular NIST curves, the constants of secp256k1 are selected in a predictable manner, which significantly reduces the likelihood of curve creators inserting any type of backdoor software into the curve.



Digital signatures

The core of digital signature is private key signing and public key verification; Signature is the process of using the private key to sign the data to generate the signature value, and signature verification is the process of recovering the public key from the signature.
Digital signatures have three uses in Ethereum. First, the signature proves that the owner of the private key implies that the owner of the Ethereum account has authorized the payment of ether or the execution of the contract. Second, the proof of authorization is _undeniable_ (undeniable). Third, the signature proves that the transaction data has not been and cannot be modified by anyone after the transaction is signed.

The cryptography behind the top 20 cryptocurrencies



Address:The hyperlink login is visible.

C# uses BouncyCastle.Cryptography to generate elliptic curve SECP256K1 key pairs

As shown below:



Private key: C66C343A5CD1A1D25B24A47D71047442EFED87DE12933779B1DAD914401776B5
Public key: 04C99FE3CDC4D0025CFA1CC0BC6401FF273ABC4C86EB912F4325D286C5162A2D21D7DF76C3E79CF4F7C2183F0E230D187B26BC8A5FCA2436EA91AC72B8EC0F4651

The code is as follows:



C# uses Nethereum.Signer to generate key pairs

The code is as follows:



Review:

.NET/C# Create ETH wallet account and verification password based on Nethereum [with source code]
https://www.itsvse.com/thread-9520-1-1.html

Ethereum (ETH) Wallet "Address, Password, Private Key, Mnemonic Phrase, Keystore"
https://www.itsvse.com/thread-4525-1-1.html

Reference:

The hyperlink login is visible.
The hyperlink login is visible.




Previous:Alibaba Cloud OSS Object Storage Tutorial on Creating a New Bucket and Setting RAM Policy
Next:.NET/C# Alibaba Cloud includes the V4 signature algorithm in the Header
 Landlord| Posted on 2025-4-12 18:23:15 |
 Landlord| Posted on 2025-4-14 10:37:18 |
Blockchain digital wallet (HD) BIP32, BIP44, BIP39 protocol
https://www.itsvse.com/thread-10989-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com