blocksight 2021-04-26 13:36:57 阅读数:158

本文一共[544]字，预计阅读时长:1分钟~

mathematics
encryption
principle
process
blockchain

In the last section, we introduced Elliptic curve operations and security principles over discrete fields , With these foundations , This section describes how to use elliptic curves over discrete fields for encryption and decryption . If you find it difficult to read and understand this article , You can refer to some previous historical articles . In the future, the elliptic curve means by default ** Elliptic curves of modulo primes over discrete fields **.

Using the knowledge from the previous section , In the mold 𝑝（p It's a very large prime number ） On Finite Fields , The use of elliptic curves for encryption and decryption is also related to RSA A certain degree of similarity （* There will be a special article to explain RSA*）, Every user has his own public key and private key . The private key is the number selected by the user 𝑛（ In the actual algorithm, it is an unpredictable value randomly generated by the random number generator ）, The private key is kept secret by itself ; The public key is made up of 𝑃=𝑛𝐺（G Is the selected generator ）, The calculated point , The public key is open to the public .

To sum up ：** The private key is an undisclosed number , The public key is a point on an elliptic curve **.

Assume A And B Encrypted communication , The encryption process is as follows ：

（1）A First, convert the plaintext message （ code ） by (𝑎,𝑏) Medium (𝑥,𝑦), Then randomly select a positive integer 𝑘( Also generated by the random number generator ), And make use of B The public key , Calculate the ciphertext as follows ：

={𝑘𝐺,+𝑘} therefore , The ciphertext is actually composed of two points .

（2）B Received the ciphertext , Use your private key to do the following calculation , You can decrypt and get plaintext ：

+𝑘−(𝑘𝐺)=+𝑘(𝐺)−(𝑘𝐺)=+𝑘(𝐺)−k(𝐺)= In the above formula , We use the commutative law of point multiplication :𝑘(𝐺)=(k𝐺) The decryption process is simply ,（1） In the ciphertext generated in , Second points +𝑘 Minus the first point 𝑘𝐺 With your own private key 𝑛 Product of .

Empathy ,B Encrypted information is sent to A,A So is the decryption process . Let's think about it ourselves .

The parameters in the elliptic curve equation （ Do not understand the elliptic curve equation reference Last one ） Selected as ：𝑎=0, 𝑏=−4,𝑝=199,𝐺=(2,2), The elliptic curve equation is ：=−4,

hypothesis B The selected private key is =113, Its public key :=113𝐺=(192,161)

A I hope the news will be =(88,57)(* notes ： In general, the complete scene is that a piece of text is first transformed into a point on an elliptic curve , There are many ways of transformation , If necessary, we can introduce it separately , Here is an example of using the transformation point directly , Easy to explain *) Encrypted and sent to B, therefore A Randomly select positive integers 𝑘=103, And pass B The ciphertext is obtained by public key encryption ：

={103(2,2),(88,57)+103(192,161)}={(96,66),(124,70)}B After receiving the ciphertext message , Use your own private key =119 To decrypt ：

+𝑘−(𝑘𝐺)=(124,70)−113(96,66)=(124,70)−(190,62)=(88,57)=.

Be careful ： there ‘+’ Is the mould p The point addition operation of , Previously introduced .

Come here ,B Decrypt smoothly and get clear text message ,A And B The encrypted communication between them is completed successfully . It should be noted that , Here is the elliptic curve, the parameter selection is relatively small , Easy to calculate and understand , The actual choice is a very large integer , Improve safety .

You can see the actual elliptic curve algorithm （ English abbreviation ：ECC） Parameters ,p,g,n It's huge .ECC Recommended parameters ：256k1

*p=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F a=0000000000000000000000000000000000000000000000000000000000000000 b=0000000000000000000000000000000000000000000000000000000000000007 G=79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8 n=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141*————————————————

The next section talks about elliptic curve signature and its verification process . Welcome to your attention , If you have any questions, please leave a message ！！

版权声明：本文为[blocksight]所创，转载请带上原文链接，感谢。 https://netfreeman.com/2021/04/20210425000405713p.html

- In depth analysis of the basic components of the defi loan agreement
- 美SEC指控区块链信贷公司非法出售超3000万美元证券
- 深度 | 巴菲特在数字资产的估值中错过了什么？
- The US SEC accused blockchain credit companies of illegally selling securities exceeding US $30 million
- What did Buffett miss in the valuation of digital assets?
- Solana上的跨链生态
- 广东省税务局区块链出口退税业务成功上线
- 区块链50收评 | 成分股涨跌不一 两极分化明显
- 新闻周刊 | 以太坊主网完成伦敦升级
- Cross chain ecology on Solana
- Guangdong provincial taxation bureau successfully launched the blockchain export tax rebate business
- Blockchain 50 closing comments | component stocks did not rise or fall significantly
- Newsweek - Ethereum main network upgraded in London
- 区块链大有前途，数字货币不会消失
- Blockchain has great prospects, and digital currency will not disappear
- 区块链中很重要的10个项目
- 解析去中心化衍生品三大流派：能否撼动中心化交易所地位？
- 技术周刊｜伦敦升级后以太坊平均每分钟燃烧2.36ETH
- 数字人民币本质上不也是人民币吗，为什么说能挑战美元霸权？
- 10 important projects in the blockchain
- Analyzing the three schools of decentralized derivatives: can we shake the status of centralized exchanges?
- Techweek London upgraded Ethereum burns an average of 2.36 eth per minute
- Isn't digital RMB also RMB in essence? Why can it challenge the hegemony of the US dollar?
- Blockchain practice (II) realization of pow workload proof | 15th day of settlement
- 外媒：美国新的比特币税收计划可能扼杀更环保的区块链技术
- Foreign media: the new bitcoin tax plan in the United States may stifle more environmentally friendly blockchain technology
- 【geth】Go调用智能合约 | 一起来学区块链
- 【geth】Go语言调用以太坊 | 一起来学区块链
- [get] go invokes the smart contract | together with the school district block chain
- [get] go language calls Ethereum | together with the school district block chain
- EIP-1559实施后 Gas为什么没有剧烈下降
- Why didn't gas drop sharply after the implementation of eip-1559
- 以太坊伦敦升级已完成 矿工有哪些注意事项?
- Ethereum London upgrade has been completed. What should miners pay attention to?
- 项目周刊｜以太坊在两天内销毁了新币发行量的36%
- Project weekly Ethereum destroyed 36% of the circulation of new coins in two days
- 加密企业如何通过区块链认证绿色能源？
- How can encryption enterprises certify green energy through blockchain?
- 从SEC主席最新演讲谈数字货币行业风控
- On risk control of digital currency industry from the latest speech of SEC Chairman
- DeFi 龙头的再进化之旅：纵览 Uniswap V3 生态全景
- The re evolution journey of defi leader: an overview of uniswap V3 ecology
- 英国拍卖行佳士得拍卖 Cryptopunks、Meebits、Bored Apes NFT
- 卡尔达诺报告：在 Wave Financial Group 的支持下实现完全中心化和全球金融普惠
- NFT，开启“元宇宙”的钥匙
- 以太坊燃烧第一个24小时：中文社区在关心什么
- British auction house Christie's auctions cryptopunks, meebits, bored apes NFT
- Caldano report: complete centralization and global financial inclusion with the support of wave financial group
- NFT, the key to the "meta universe"
- Ethereum burning for the first 24 hours: what does the Chinese community care about
- 趣币早报 |美国阻止财政部挑选加密货币的赢家和输家
- Qu coin morning post | the United States prevents the treasury from selecting the winners and losers of cryptocurrency
- 区块链 公钥 私钥 生成地址 关系
- Address relationship generated by blockchain public key and private key
- 如何实现去中心化跨链消息传递和资产转移？
- 以太坊伦敦升级：随之生效的以太坊EIP-1559是什么
- Tokemak能否支配更多DeFi流动性
- How to achieve decentralized cross chain messaging and asset transfer?
- Ethereum London upgrade: what is Ethereum eip-1559 in effect
- Can tokemak dominate more defi liquidity