99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                日韩亚洲欧美成人一区| 色欧美乱欧美15图片| 中文字幕在线免费不卡| 精品成人a区在线观看| 欧美sm美女调教| 国产精品久线在线观看| 欧美高清在线一区| 亚洲一区在线播放| 日本最新不卡在线| 激情文学综合网| 99精品视频免费在线观看| 欧美日韩一区二区在线视频| 欧美成人vps| 国产精品久久毛片| 亚洲与欧洲av电影| 精品写真视频在线观看| 欧美亚洲综合色| 久久亚洲二区三区| 亚洲成人免费电影| 国产成人精品影视| 欧美一级日韩一级| 亚洲柠檬福利资源导航| 极品少妇一区二区三区精品视频| 99久久久国产精品免费蜜臀| 91精品国产综合久久精品图片 | 欧美日韩国产成人在线免费| 国产亚洲一区二区三区在线观看| 青青青伊人色综合久久| 欧美亚一区二区| 亚洲一二三四在线| 欧美视频一区二区在线观看| 日韩理论片一区二区| av综合在线播放| 国产精品国产自产拍在线| 成人午夜精品一区二区三区| 久久天天做天天爱综合色| 蜜臀精品久久久久久蜜臀 | 91农村精品一区二区在线| 日韩欧美色综合| 青青青伊人色综合久久| 欧美xxxx在线观看| 成人福利视频网站| 亚洲中国最大av网站| 91精品国产免费久久综合| 国产一区二区三区四| 欧美成人精品福利| 91在线码无精品| 日韩和欧美一区二区三区| 国产亚洲成年网址在线观看| 日韩欧美卡一卡二| 天天av天天翘天天综合网色鬼国产| 国产真实精品久久二三区| 国产精品1区2区3区在线观看| 青青青伊人色综合久久| 日韩影院免费视频| 日本特黄久久久高潮| 麻豆视频一区二区| 精品一区二区三区免费| 日韩亚洲欧美在线| 成人app在线| 日本午夜一区二区| 欧美国产精品v| 欧美乱妇15p| 国产91精品露脸国语对白| 亚洲一区视频在线观看视频| 欧美日韩中文另类| 国产精品123| 丝袜美腿成人在线| 亚洲欧美一区二区久久| 欧美一区二区三区四区五区| 粗大黑人巨茎大战欧美成人| 日韩高清在线电影| 亚洲综合图片区| 欧美高清在线一区二区| 日韩欧美电影一二三| 欧美一区二区成人6969| 欧美在线不卡一区| 99久久99久久免费精品蜜臀| 色婷婷av一区二区三区大白胸| 欧美丰满少妇xxxbbb| 91精品久久久久久久99蜜桃 | 欧美天堂一区二区三区| 久久国产精品露脸对白| 亚洲精品ww久久久久久p站| 性感美女久久精品| 一区二区三区四区蜜桃| 国产精品国产自产拍高清av| 亚洲素人一区二区| 精品成人在线观看| 中文字幕亚洲欧美在线不卡| 国产蜜臀97一区二区三区| 国产精品福利av| 亚洲国产cao| 久久精品国产99| 成人黄色电影在线| 日韩欧美国产三级电影视频| 国产日韩视频一区二区三区| 亚洲精品成a人| 国产一区二区三区四| 国产精品青草久久| 国产精一区二区三区| 欧美性色aⅴ视频一区日韩精品| 精品日韩在线一区| 久久精品国产**网站演员| 欧美性受xxxx黑人xyx| 91精品国产麻豆国产自产在线| 亚洲激情成人在线| 一本大道久久a久久综合婷婷| 无吗不卡中文字幕| 国产精品三级电影| 欧美另类z0zxhd电影| 高清不卡一区二区| 久久99久久精品| 亚洲免费资源在线播放| 91美女视频网站| 亚洲综合成人在线| 精品久久久久久亚洲综合网| 九九热在线视频观看这里只有精品| 7777精品久久久大香线蕉 | 欧美在线色视频| 亚洲一区二区欧美激情| 日韩一级黄色大片| 国产成人综合亚洲91猫咪| 亚洲视频一区在线观看| 在线不卡中文字幕| 成人丝袜视频网| 奇米精品一区二区三区在线观看| 久久综合色鬼综合色| 欧美日韩视频在线观看一区二区三区 | 福利91精品一区二区三区| 亚洲欧美aⅴ...| 日韩精品一区二区三区老鸭窝| 精品一区二区三区视频| 亚洲黄色av一区| 久久综合狠狠综合久久综合88| 色综合中文字幕国产 | 国产白丝网站精品污在线入口| 亚洲福利一二三区| 亚洲精品国产a久久久久久| 欧美一区二区三区电影| 91丝袜国产在线播放| 紧缚捆绑精品一区二区| 视频一区在线播放| 亚洲一二三四在线观看| 国产精品高潮呻吟| 国产精品久久久久久亚洲毛片| 久久综合九色综合欧美就去吻| 欧美日韩精品一区二区在线播放| 国产黄色91视频| 国产精品一区二区久久不卡| 五月婷婷久久丁香| 亚洲成人精品一区二区| 国产精品不卡在线| 亚洲精品成人a在线观看| |精品福利一区二区三区| 国产女同性恋一区二区| 久久九九久久九九| 精品人在线二区三区| 欧美精品一区二区三区久久久| 欧美一区二区三区喷汁尤物| 欧美日韩在线精品一区二区三区激情 | 91麻豆精东视频| 色综合视频在线观看| 欧美自拍丝袜亚洲| 国产日韩精品一区二区三区| 成人免费一区二区三区视频 | 国产精品久久三区| 一区二区在线免费观看| 韩国欧美一区二区| 欧美日本在线一区| 一区二区三区**美女毛片| 国产精品自在欧美一区| 欧美精品九九99久久| 一二三四区精品视频| 99视频一区二区| 亚洲视频你懂的| 欧美视频一区二| 亚洲一区免费在线观看| 欧美日韩精品免费观看视频| 亚洲国产精品影院| 欧美日韩在线观看一区二区| 欧美日韩成人综合天天影院 | 亚洲精品日产精品乱码不卡| 蜜桃精品在线观看| 欧美午夜理伦三级在线观看| 国产欧美日韩另类视频免费观看| 日韩激情视频网站| 欧美日韩一级二级| 亚洲三级在线免费| 91丨porny丨在线| 一区在线观看视频| 成人av在线资源网站| 亚洲青青青在线视频| 国产凹凸在线观看一区二区| 久久众筹精品私拍模特| 久久99精品国产| 欧美成人艳星乳罩| 国产91精品免费| 中文字幕一区二区三区av| 在线免费观看日本欧美|