Limited Offer Get 25% off — use code BESTW25
No AI No Plagiarism On-Time Delivery Free Revisions
Claim Now
Prices start at $5 per page · plagiarism-free papers · free revisions for 14 days 24/7 support: support@bestwriters.com
Uncategorized

CSCI301 Contemporary Topics in Security

  • Posted
  • Authoradmin
  • Length572 words
  • Reading time3 min
Write My Assignment FREE

1
CSCI301 Contemporary Topics in Security
This material is copyrighted. It must not be
distributed without permission from
Jongkil Kim
Assignment 2
Due: 11:55 pm 8 May 2020
Total Mark: 100 (17% of Final Mark)
General Instructions: Please read the following instructions carefully.
Let we have a blockchain system, which uses “Pay-to-Pubkey-Hash”
transaction mechanism of Bitcoin. The followings are the transaction records
of blocks 100 and 101 in the ledger.

“Input”:
“Previous tx”:
“f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6”,
“Index”: 0,
“scriptSig”:
[“304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d
10″,
“90db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c
6b241501″]
,
“Output”:
“Value”: 500,
“scriptPubKey”: “OP_DUP OP_HASH160 [A] OP_EQUALVERIFY OP_CHECKSIG”

“Input”:
“Previous tx”: “[B]”,
“Index”: 0,
“scriptSig”: [ “[C]”, “[D]”]
,
“Output”:
“Value”: 500,
“scriptPubKey”: “OP_DUP OP_HASH160
404371705fa9bd789a2fcd52d2c580b65d35549d OP_EQUALVERIFY OP_CHECKSIG”

Figure 1. The transaction record in block 100
Figure 2. The transaction record in block 101
2
CSCI301 Contemporary Topics in Security
This material is copyrighted. It must not be
distributed without permission from
Jongkil Kim
Let you, who is the valid redeemer in block 100, want to send 500 Satoshi to the
send to someone whose account number is “404371…”.
Q1. Create your account key pair using ecdsa python package.
Q2. Compute [A], [B], [C] and [D] using the key you generated in Q1 to become a
valid redeemer in those blocks. The descriptions of those are as follows:
[A]: The SHA1 hash value of your public key
[B]: The SHA256 hash value of block 100
[C]: The ECDSA signature* of the hash value [B]**
[D]: The verification key (i.e., public key) of the user
All answers must be written in hexadecimal notation.
Q3. Write a program to check the validity of the redeemer in the above blocks.
Your program must be compatible with “Pay-to-Pubkey-Hash” algorithm of
Bitcoin and have to handle operations in the script written in blocks 100 and 101
in the correct order.
Q4. “Pay-to-Pubkey-Hash” algorithm uses a stack when it executes operations in
a script, print out the values in the stack after executing each operation in Q3.
*You can use ecdsa python package for ECDSA signature. Please visit
https://github.com/warner/python-ecdsa for the further information of the
package. Use NIST192p curve which is a default curve of the ecdsa package.
You can install python3 version of the package using the following command:
$ pip3 install ecdsa
** This is slightly different from the original transaction of Bitcoin, but we use
this to simplify the task.
Submission
Write programs that satisfy the above requirements. Make a folder named
Assignment2 and include


Your signing and verification keys in file(s) (Q1) [10 marks]
Completed blocks 100 and 101 (Q2). Programs used to complete blocks
100 and 101.
Program code for Q3 and Q4
[30 marks]
[50 marks]

A short report that 1) gives all necessary information to run your
programs (e.g., the other python packages for your code) and 2) explain
expected outcomes (with screenshots) of each program. (No need to
explain more.) [10 marks]

Compress the Assignment2 folder using a zip program to create
yourSurname_Assignment2.zip.
Use Moodle to upload your zip file.

The post CSCI301 Contemporary Topics in Security appeared first on My Assignment Online.

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

✓ Native UK, USA & Australia writers ✓ Deadline from 3 hours ✓ 100% Plagiarism-Free — Turnitin included ✓ Unlimited free revisions ✓ Free to submit — compare quotes

admin

Academic writer and editor at BestWriters.

Get your paper off your plate tonight

Post your instructions for free. Prices start at $5 per page.

Place an order