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

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

CE235編程代寫、代做python程序設計
CE235編程代寫、代做python程序設計

時間: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



 

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

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

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    高清欧美性猛交xxxx| 国产一级不卡毛片| 国产精品爽黄69| 亚洲激情免费视频| 在线视频一区观看| 亚洲精品视频一二三| 午夜精品在线观看| 日韩中文字幕二区| 亚洲一区三区电影在线观看| 亚洲一二三区在线| 五月婷婷综合色| 日韩一级免费在线观看| 日韩免费在线视频| 欧美精彩一区二区三区| 精品少妇一区二区三区在线| 国产一二三四区在线观看| 国产精品揄拍一区二区| 91精品在线一区| 国产成人综合一区| 久久精品国产精品亚洲| 国产精品对白一区二区三区| 欧美精品在线极品| 亚洲va欧美va国产综合久久| 亚洲精品在线免费看| 亚洲av首页在线| 欧美又大又粗又长| 国产在线视频欧美| 91精品久久久久久久久青青 | 成人精品在线观看| 久久人妻无码一区二区| 久久久久北条麻妃免费看| 久久久久国产精品免费网站| 视频一区在线免费观看| 男人添女人下部高潮视频在观看| 色综合久久88| 亚洲国产另类久久久精品极度| 日本高清一区| 国产在线一区二| 久久er99热精品一区二区三区| 久久福利网址导航| 欧美一级免费播放| 国内精品小视频在线观看| 99免费在线观看视频| 久久久国产精品一区| 亚洲综合精品伊人久久| 欧美午夜性视频| 粉嫩av一区二区三区免费观看| 久艹在线免费观看| 久久91亚洲精品中文字幕奶水| 欧美一级免费视频| 国产欧美精品一区二区三区| 国产福利视频在线播放| 精品国产日本| 日本999视频| 成人国产精品日本在线| 日韩视频―中文字幕| 中文字幕久精品免| 国模精品系列视频| 久久久久久久久91| 亚洲在线色站| 国产欧美一区二区视频| 国产精品色婷婷视频| 天天爱天天做天天操| 国产女人精品视频| 久久久久久久久久久久av| 欧美极品欧美精品欧美视频| 欧美尤物一区| 91精品国产91久久久久久久久| 国产精品久久久久久久久电影网| 日本免费一级视频| av一区观看| 欧美日韩福利电影| 国产综合在线视频| 久久久www成人免费精品张筱雨| 午夜精品久久久久久久久久久久 | 久久99精品久久久久子伦| 伊人天天久久大香线蕉av色| 国产中文欧美精品| 国产精品久久国产精品99gif| 欧美精品尤物在线| 日韩在线观看成人| 欧美一级大片视频| 久久精视频免费在线久久完整在线看| 日韩手机在线观看视频| 久久精品日产第一区二区三区乱码| 亚洲自拍欧美色图| 97色在线观看免费视频| 国产精品大全| 黄色国产小视频| 国产精品久久波多野结衣| 国产中文字幕二区| 色综合久久天天综线观看| 国产美女三级视频| 亚洲影院色在线观看免费| 91精品国产91久久久久久| 午夜一区二区三区| 久久精品国产精品青草色艺 | 精品人伦一区二区三区| 国产精品露脸自拍| 国产在线精品一区免费香蕉| 国产精品夫妻激情| 国产狼人综合免费视频| 亚洲熟妇av日韩熟妇在线| 久久久人人爽| 欧美一区观看| 免费不卡欧美自拍视频| 99亚洲国产精品| 日本中文字幕一级片| 国产成人精品一区二区三区福利| 精品一区二区日本| 在线一区亚洲| 久久久久中文字幕2018| 欧美精品久久久久久久自慰| 精品乱码一区| 国产精品10p综合二区| 日本午夜在线亚洲.国产| 久久久国产成人精品| 国产欧美精品日韩| 少妇特黄a一区二区三区| 国产精品视频yy9099| 成人av在线天堂| 日本高清视频一区| 久久艳片www.17c.com| 91精品国产亚洲| 欧美日韩高清在线一区| 在线观看免费91| 色妞欧美日韩在线| 国产日韩精品推荐| 日韩av播放器| 国产精品大全| 国产精品av免费| 欧美韩国日本在线| 亚洲免费久久| 国产精品欧美激情| 国产精品ⅴa在线观看h| 国产中文字幕在线免费观看| 日韩在线视频在线观看| 久久夜色撩人精品| 国产福利视频一区| 国产日韩精品久久| 日韩免费观看av| 综合一区中文字幕| 国产精品久久久影院| 久久婷婷开心| 成人精品一区二区三区电影免费| 日韩免费观看av| 在线免费观看一区二区三区| 精品久久久av| 久久资源av| 国产欧美日韩精品丝袜高跟鞋| 日韩视频在线观看视频| 欧美激情乱人伦一区| 久久久国产精彩视频美女艺术照福利| 99热国产免费| 国产视频99| 欧美国产一区二区在线| 欧美一级淫片播放口| 欧美日本中文字幕| 久久精品视频va| 久久99精品久久久久久水蜜桃 | 日韩视频在线一区| 97公开免费视频| 国产午夜精品一区| 黄网站欧美内射| 日韩欧美视频一区二区| 天天久久人人| 亚洲国产欧洲综合997久久| 欧美激情一区二区三区在线视频观看| 国产精品欧美日韩一区二区| 久久99精品久久久久久久久久| 99在线精品免费视频| 国产精品一区在线免费观看| 欧美交换配乱吟粗大25p| 日本wwww视频| 日韩精品不卡| 日韩久久久久久久久久久久久| 色阁综合av| 日本中文字幕成人| 日韩av在线一区二区三区| 少妇大叫太大太粗太爽了a片小说| 亚洲最大av网| 亚洲永久激情精品| 亚洲直播在线一区| 亚洲 国产 日韩 综合一区| 欧美精品videos| 国产精品久久久久久久久久久久冷 | 欧美日韩精品免费看| 日韩欧美亚洲精品| 欧美在线日韩在线| 欧美一级二级三级九九九| 欧美日韩国产免费一区二区三区| 欧洲午夜精品久久久| 欧美在线国产精品| 国内自拍欧美激情| 精品一区二区三区无码视频| 国产一区二区丝袜| 国产特级淫片高清视频| 国产欧美一区二区三区另类精品| 国产精选一区二区| 99在线免费视频观看|