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:
Reference:
The hyperlink login is visible.
The hyperlink login is visible. |