国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CE235編程代寫、代做python程序設(shè)計
CE235編程代寫、代做python程序設(shè)計

時間:2024-12-11  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



Assignment 2: Blockchain and Mining with Proof-of-work for Bitcoin 
CE235 Computer Security 
2024-2025 
University of Essex 
1. Introduction 
 
1.1 Bitcoin Mining 
Bitcoin is a cryptocurrency. In the Bitcoin system Bitcoins are mined through proof-of-work mechanism. 
Bitcoin miners are given technical puzzles to solve. There is only one puzzle at any time with a given difficulty 
level, which is set by the system administrator. New puzzles are created after the current one is solved. 
The first miner who solves the puzzle is awarded a specified number of bitcoins. The winner creates and sign a 
new block with digital signature technology and broadcast to other Bitcoin users. The signed block is linked to 
the previous signed blocks. These blocks form a chain of blocks (called blockchain) as shown in the following 
figure. The new signed blocks are verified by others and could become mature after being confirmed by a given 
number of miners, which is measured by length of blocks linked to the new blocks. 
 
 
1.2 Technical puzzle 
The puzzle set in the proof-of-work is to find a specific integer number (called nonce), which together with a 
few other numbers (such as hash value of the previous block, the transactions to be included to the new block) 
are hashed with SHA-256 algorithm and the hashed value satisfies a given condition. 
The puzzle can be formulated as follows: 
 
where preHash is the hash value of the previous block, Tx is transaction of bitcoins. levelHard is a given number, 
usually controlled by requiring a consecutive number of most significant bits (MSB) being zeros, for example 
the first 30 MSBs being zero. The more MSB zeros required on levelHard, the more difficult to solve the puzzle 
(finding the nonce satisfying the condition). Below gives a binary number with the 15 MSB being zeros and 5 
least significant bits (LSB). 
(MSB) 00000000000000011100000101111110011010101100000 (LSB) 
 
1.3 Signing and verifying a new block 
The first miner solving the puzzle will create a new block, which includes a block header (storing the digital 
signature of this new block, which will include the hash value of the block body) and a block body. The block 
body includes the hash value of the previous block, the found nonce and transactions included in this block. The 
digital signature is created by encrypting the hash value of this new block with private key. The block is linked 
to the last block of the existing blockchain and broadcast. The new block will then be verified by others using 
the winning miner’s public key and checking the hash values of this and previous blocks. 
 
2. Specification 
Block header (signature)
Prev Hash
Nonce
Tx1
Tx2
TxN
Block header (signature)
Prev Hash
Nonce
Tx1
Tx2
TxN
Block header (signature)
Prev Hash
Nonce
Tx1
Tx2
TxN
Block n-2 Block n-1 Block n
find nonce, subject to: hash(preHash, nonce, Tx) < levelHard This assignment takes 18% of the marks (18 marks) of this module. The aim of the assignment is to write a 
Python program, which will implement a simplified version of Bitcoin mining and digital signature schemes as 
shown in the following figure, with additional task of protecting the confidentiality of the signed message (from 
by encrypting/decrypting the signed message (such as with an extra RSA key pair for the validator). 
 
2.1 Task1: Create a RSA public/private key pair with 1024 bits key length [1 mark] 
o The RSA key pairs will be used in Task3 and Task4 of this assignment. 
o The created RSA public {n,e} and private keys {n,d} need to be displayed with the following 
format: 
 
2.2 Task2: Find a nonce with hash algorithm SHA-256, which is a hash value satisfying requirement 
of the 6 least significant bits (LSB) being zero [4 marks]. Produce a figure (or a table) which shows 
the computation time (denoted by T) used to find a valid nonce by your own computer against the 
number of required LSB being zero (denoted by N) changing from 1 to 8 [3 marks]. 
o Hint: you can extend Example 4 in the provided sample program to complete this task. Example 4 
generates only one nonce and check if the nonce is valid. 
o You should try many random integers as nonce (with a loop) until you successfully find a nonce 
that meets the requirement. The only output from this task is the nonce, which needs to be displayed 
with the following format (suppose the found nonce is 12345): 
 
 
o You can use your program to produce the figure/table automatically, or you can record the 
computation times and create the figure/table using other software, then present it to the teaching 
staff members during your demonstration. Not to submit the figure/table to Faser. 
 
2.3 Task3: Digitally sign the nonce and your student number with the RSA private key [3 marks] 
o The message to be signed is a string consisting of the nonce (found with 6 LSB being zero) and 
your student number, which are separated by a space. For example, if the found nonce is 12345 and 
your student number is 54**1, then the message to be signed needs to be a string “12345 54**1” 
o You need to sign the message with RSA key pair generated in Task 1. 
o The outputs of this Task3 include the hashed value of the message and the signature, which need to 
be displayed with the following format. 
 
 
Find a valid 
nonce
Sign message
(nonce, student #)
Verify the digital 
signature
Generate RSA 
keys
Measure 
computation time
Required # of 
LSB zeros
Valid 
nonce
Encrypted message 
& signature
Validation 
outcome
Table or figure Keys
Keys
Public key: 
(n=0x995361030caa5bf308e272fe07f3466c0727b5ac0c41****42fd97dd75ec4a197250c038
8b8711b210b2beb300980**1913e9eb21b22f72c3fe8b62adda13491c6efbf3f4e6c6c60**8da
c7**af2ca0b8067f4550fae82c8ea85d3fc0667f1de7a193f23a1d30e8e7f2894f07ce26b5d94
85df5a29fc265fc217dbbb91065b35, e=0x10001) 
Private key: 
(n=0x995361030caa5bf308e272fe07f3466c0727b5ac0c41****42fd97dd75ec4a197250c038
8b8711b210b2beb300980**1913e9eb21b22f72c3fe8b62adda13491c6efbf3f4e6c6c60**8da
c7**af2ca0b8067f4550fae82c8ea85d3fc0667f1de7a193f23a1d30e8e7f2894f07ce26b5d94
85df5a29fc265fc217dbbb91065b35, 
d=0x24cf1913a7d74042dce7ac6ea30efae19568299bb7c76**09ff20ca2ec9c010011eb23f28
f40aa7562bfdebb4f91aef2c091557cf1b9d7b82651a2663115f1ee0c416b1fec516a83657558
068f1eebffae9f11b2801830acf2b0af4367fcd26ffe4672c5c5165afaeb5eeb81e6497a04192
133**6e124b4ce2a869a16fc998e1) 
 
Valid Nonce: 12345  
 
2.4 Task4: Verify the signature [3 marks] 
o The signature verification is to be achieved by decrypting the digital signature with public key 
{n,e} generated in Task 1 to get the hash value from the signature and compare it to the one 
obtained from hashing the signed message. 
o The process of signature verification needs to output yes or no depending on the verification 
outcome. 
 
2.5 Task5: Protect the confidentiality of the signed message from Task 3 by encrypting/decrypting 
the signed message [4 marks] 
o You should generate another RSA key pair for the validator. 
o The signed message should be encrypted with a key of the validator by the user who signs the 
message. 
o The encrypted signed message should be decrypted with another key of the validator before the 
signature validation by the validator. 
 
3. Sample Program 
We provide a sample python program miningBitcoin_sample.py, which includes most of the needed 
RSA encryption and digital signature functions to complete the above tasks. It can be run from integrated 
development environments (IDLE). It can also be run from the command line like this: 
python mingingBitcoin_sample.py 
 
You should modify the sample python program to complete the tasks. Your own program should have a name 
like cs_bitcoin_registrationnumber.py (replace registrationnumber by your own registration number). For 
example, if your registration number is 1234567, your filename will be: 
cs_bitcoin_1234567.py 
 Your program must run from the command line like this: 
python cs_bitcoin_1234567.py 
The outputs of your program are required to be displayed, following the specified format for marking purposes. 
 
4. How to submit 
Submit your python .py file to Faser by the submission deadline Friday, 13/12/2024. 
 
5. Marking Scheme 
You will be asked by the Professor He or teaching assistants at NWU to demonstrate your work and answer questions 
to ensure it is your own work. Your marks for this assignment will be dependent on the complement and output 
results of your program, and your answers to the questions asked by the teachers. If you are asked to but you don’t 
demonstrate your work, no mark will be given to your assignment work. 
Apart from demonstration of your work to the teaching staff members, it is mandatory for you to submit your program 
file to Faser on time. Otherwise, you may not get any mark for your work on the assignment. 
Your submitted program may be checked and tested by Professor He. If problems such as plagiarism are found from 
the testing, your marks will be reduced. 
 
 請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp



 

掃一掃在手機打開當(dāng)前頁
  • 上一篇:代寫ENGR1010J、代做C/C++設(shè)計編程
  • 下一篇:福建人去菲律賓做生意多嗎(手續(xù)有哪些)
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網(wǎng)頁版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美日韩国产精品一区二区| 青青青在线视频播放| 日本香蕉视频在线观看| 国产色综合一区二区三区| 日韩中文字幕在线| 日韩.欧美.亚洲| 国产精品99久久久久久久久 | 高清视频一区| 久久艳片www.17c.com | 伊人久久大香线蕉av一区| 欧美少妇一级片| 日韩在线播放视频| 日本久久久网站| 国产国产精品人在线视| 午夜精品在线观看| 国产精品69久久| 亚洲一区二区三区视频播放| www国产亚洲精品| 一区二区三区四区五区视频| 国产美女精品久久久| 中文字幕黄色大片| 99精彩视频| 午夜肉伦伦影院| 国产精品91久久久| 日本一区视频在线| 国产黄色激情视频| 日韩久久久久久久久久久久| 日韩专区在线播放| 欧美又大又粗又长| 国产精品美女在线观看| 国内精品视频一区二区三区| 国产精品第1页| 国产乱码一区| 午夜美女久久久久爽久久| 久久免费在线观看| 日韩欧美一区二区在线观看| xxav国产精品美女主播| 黑人中文字幕一区二区三区| 国产精品高清一区二区三区| 国产一区在线免费观看| 久久亚洲国产成人| 成人中文字幕在线观看| 日本欧美精品在线| 国产精品视频精品视频| 精品午夜一区二区| 欧美激情视频网址| 91国产精品电影| 人妻夜夜添夜夜无码av| 国产精品久久久久久久久久尿| 风间由美一区二区三区| 欧美一区二区三区精美影视| 精品国偷自产在线视频99| 国产免费一区二区三区香蕉精| 亚洲第一精品区| zzijzzij亚洲日本成熟少妇| 精品一区久久久久久| 亚洲欧洲日夜超级视频| www.日韩不卡电影av| 超碰免费在线公开| 日本公妇乱淫免费视频一区三区| 国产精品欧美日韩久久| www..com日韩| 日韩视频在线观看视频| 久久成人这里只有精品| 91干在线观看| 精品www久久久久奶水| 制服诱惑一区| 久久久精品视频在线观看| 国产精品一区二区三区免费观看 | 国产一区二区视频免费在线观看| 亚洲国产精品久久久久爰色欲| 久久久精品久久| 99一区二区三区| 激情一区二区三区| 大波视频国产精品久久| 国产精品久久久久久av| 7777精品视频| 精品视频在线观看| 日韩色妇久久av| 在线观看亚洲视频啊啊啊啊| 久久精品国产亚洲精品| 91国产精品91| 国内精品久久久久久久果冻传媒| 午夜免费电影一区在线观看| 精品国产一区二区三区久久久久久 | 91精品久久久久久久| 免费拍拍拍网站| 日本亚洲导航| 中文字幕一区二区三区在线乱码| 久久精品久久久久久国产 免费| 国产精品aaaa| 成人免费观看cn| 精品视频一区二区三区四区| 日日骚一区二区网站| 欧美激情一级精品国产| 国产精品视频999| 国产大片精品免费永久看nba| 国产精选久久久久久| 欧美国产日韩在线播放| 日本一区免费看| 亚洲 欧美 日韩 国产综合 在线 | 国产精品999| 97国产精品久久| 国产精品自产拍在线观看中文| 免费观看国产成人| 奇米888一区二区三区| 日韩av不卡在线播放| 欧美激情亚洲另类| 久久99精品久久久久久青青91| 国产精品视频网址| 日韩中文视频免费在线观看| 久久国产手机看片| 久久免费99精品久久久久久| 91久久综合亚洲鲁鲁五月天| 成人精品一区二区三区电影黑人 | 国产精品高潮呻吟久久av野狼| 久久精品99久久久久久久久| 国产z一区二区三区| 91精品国产高清久久久久久91| 豆国产97在线| 国产伦理一区二区三区| 国产日韩欧美黄色| 国产午夜伦鲁鲁| 国产亚洲黄色片| 国产在线观看欧美| 国产日韩视频在线播放| 国产无套粉嫩白浆内谢的出处| 国产主播一区二区三区四区| 国产主播一区二区三区四区| 国产一区二区片| 国产免费一区二区视频| 国产精品主播视频| y111111国产精品久久婷婷| 国产精品自产拍在线观看中文| 国产久一道中文一区| www.亚洲视频.com| 国产精品91久久| 日韩在线观看你懂的| 久久精品一偷一偷国产| 国产精品成人aaaaa网站| 欧美巨猛xxxx猛交黑人97人| 中文字幕一区二区三区四区五区| 亚洲国产精品123| 欧美一级欧美一级| 青青草一区二区| 国内精品视频久久| 国产精品亚洲天堂| 久久天堂国产精品| 日韩亚洲一区二区| 国产精品污www一区二区三区| 国产精品久久久久久久久久久不卡| 欧美精品做受xxx性少妇| 亚洲国产一区二区精品视频| 日韩欧美三级一区二区| 免费在线观看亚洲视频| 国产日韩欧美视频| 91精品国产精品| 日韩亚洲欧美中文高清在线| 国产精品免费观看久久| 国产精品福利网站| 午夜伦理精品一区| 国产精品专区一| 国产一区二区久久久| 欧美日韩国产综合在线| 欧美精品免费在线观看| 另类专区欧美制服同性| 欧美精品久久久久| 欧美激情区在线播放| 伊人天天久久大香线蕉av色| 午夜精品一区二区三区在线视频 | 精品一卡二卡三卡四卡日本乱码| 成人在线观看a| 国产一区玩具在线观看| 日韩美女中文字幕| 精品国产综合久久| 色综合电影网| 亚洲精品一区二区三| 日韩在线视频线视频免费网站| 91九色在线免费视频| 久久久久久中文| 九九久久国产精品| 激情小说综合网| 影音先锋欧美在线| 国产aaa一级片| 99在线国产| 国语精品中文字幕| 亚洲精品久久久久久一区二区| 精品自在线视频| 精品国内亚洲在观看18黄| 久久综合入口| 91免费视频网站在线观看| 黄色网在线视频| 日韩精品一区二区免费| 午夜在线视频免费观看| 一本色道婷婷久久欧美| 超在线视频97| 欧美成人中文字幕| 亚洲在线观看一区| 婷婷五月综合缴情在线视频| 一级特黄录像免费播放全99|