加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

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

時間:2024-12-11  來源:合肥網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++設計編程
  • 下一篇:福建人去菲律賓做生意多嗎(手續有哪些)
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产99精品一区| 中文无码久久精品| 亚洲激情午夜| 一区二区三区在线免费看| 久久中文欧美| 欧美激情欧美| 欧洲激情视频| 亚洲日本va| 国产精品一区二区精品| 国产黄色精品| 93在线视频精品免费观看| 欧州一区二区| 国产精品一线| 亚洲人和日本人hd| 亚洲精品裸体| 成人在线中文| 中文字幕在线视频网站| 女同性一区二区三区人了人一| 日本最新不卡在线| 成人日韩视频| 日本aⅴ精品一区二区三区| 二吊插入一穴一区二区| 免费不卡在线视频| 日韩一区二区久久| 激情综合久久| 久久婷婷丁香| 国产精品欧美大片| 午夜视频在线观看精品中文| 综合精品久久| 三级成人在线视频| 精品自拍视频| 青青久久精品| 蜜臀国产一区| 国产伦久视频在线观看| 免费观看成人av| 国产亚洲激情| 最新亚洲一区| 亚洲欧洲日本一区二区三区| 成人av动漫在线观看| 欧美日韩一区二区三区视频播放| 国产精品色在线网站| 中文字幕视频精品一区二区三区| 日韩最新在线| 久久丁香四色| 日韩欧洲国产| 中文字幕av一区二区三区四区| 少妇精品久久久一区二区| 国产精品羞羞答答在线观看| 亚洲人metart人体| 亚洲一区二区日韩| 精品一区二区三区亚洲| 国色天香久久精品国产一区| 欧美日韩国产一区二区在线观看| 国产999精品在线观看| 综合久久伊人| 欧美国产中文高清| 日韩a级大片| 一区二区中文字幕在线观看| 97se亚洲| 亚洲高清二区| 99国产精品私拍| 日韩影院在线观看| 毛片电影在线| 成人在线视频免费看| 麻豆精品国产91久久久久久| 欧美激情日韩| 日本少妇精品亚洲第一区| 中文字幕av一区二区三区四区| 精品视频99| 激情久久五月| 老**午夜毛片一区二区三区| 久草在线资源站手机版| 欧美综合影院| 亚洲天堂一区二区三区四区| 国产精品一区二区av日韩在线 | 午夜久久免费观看| 久久午夜影视| 国产亚洲一区二区手机在线观看| 亚洲国产99| 国产亚洲字幕| 免费福利视频一区| 91久久视频| 日韩久久久久| 亚洲乱码久久| 日本99精品| 五月激情综合| 日韩理论在线| 综合天堂av久久久久久久| 日韩av中文字幕一区二区三区| 色狠狠久久av综合| 久久亚洲视频| 国产情侣一区| 久久久久毛片免费观看| 免费黄色成人| 亚洲v.com| 亚洲伦理久久| 久久精品二区三区| 色婷婷亚洲mv天堂mv在影片| 久久精品亚洲| 午夜久久av| 国产视频一区三区| 久久69成人| 精品国产亚洲一区二区在线观看 | 黄色欧美在线| 美日韩精品视频| 久久精品国产999大香线蕉| 国产最新精品| 欧美va亚洲va日韩∨a综合色| 国产va在线视频| 欧美国产日本| 婷婷国产精品| 日韩国产专区| 亚洲区小说区图片区qvod| 天天揉久久久久亚洲精品| 日韩中文视频| 日韩电影在线一区二区三区| 狠狠入ady亚洲精品| 欧美成人家庭影院| 国内精品偷拍| 亚洲第一av| 日本一区二区乱| 蜜桃av综合| 综合在线视频| 性欧美欧美巨大69| 成人国产精选| 精品国产一区探花在线观看 | 日韩一区二区三区精品视频第3页| 午夜激情久久| 日韩精品欧美精品| 久久视频一区| 国产a亚洲精品| 国产成人tv| 日韩理论电影大全| 欧美2区3区4区| 手机在线电影一区| 国产一区二区三区91| 美女精品一区| 国产精品2区| 亚洲一区亚洲| 国产a久久精品一区二区三区 | 热三久草你在线| 日韩成人在线看| 国产h片在线观看| 97se亚洲| 99久久久国产精品免费调教网站| 高清日韩中文字幕| 日韩精品免费观看视频 | 亚洲精品国模| 国产精品成久久久久| 日韩母乳在线| av资源网在线播放| 97人人澡人人爽91综合色| 亚洲精品一级二级| 群体交乱之放荡娇妻一区二区| 91成人在线| 欧美成人亚洲| 成人乱码手机视频| 日韩影院在线观看| 91欧美极品| 国产精品亚洲成在人线| 亚洲二区免费| 欧美激情一区| 色婷婷热久久| 国产成人精品亚洲线观看| 成人在线中文| 狠狠噜噜久久| 日韩成人精品视频| 免费污视频在线一区| 精品一区在线| 国产成人三级| 丝袜美腿诱惑一区二区三区| 亚洲高清不卡| 国产专区精品| 精品极品在线| 一区二区自拍| 日韩激情精品| 欧美亚洲三区| 日本一区二区在线看| 欧美91在线| 99国内精品久久久久| 日韩精品2区| 91成人超碰| 日韩av一区二区三区四区| 韩国精品视频在线观看| 日韩五码在线| 狠狠一区二区三区| 亚洲欧洲专区| 四虎精品永久免费| 丝袜美腿亚洲色图| 精品日产乱码久久久久久仙踪林| 国产精品mv在线观看| 伊人久久综合一区二区| 欧美99久久| 蜜桃精品视频| 一区二区中文| 国产极品久久久久久久久波多结野| 夜夜夜久久久| 精品三级在线观看视频| 国产精品日本一区二区三区在线 | 成人午夜在线|