18itpp0 N22
18itpp0 N22
:
18ITPP0
B.TECH. DEGREE– NOVEMBER 2022- EXAMINATIONS
BRANCH:INFORMATION TECHNOLOGY
BLOCKCHAIN TECHNOLOGIES
Duration : 3Hours Maximum: 100 Marks
Answer All Questions
PART – A (5 x 2 = 10) CO Marks
A1. How is a blockchain different from a distributed database? CO3 (2)
A2. Enlist the properties to be satisfied for hash functions. CO2 (2)
A3. State the salient features of zero knowledge protocols. CO1 (2)
A4. State the purpose of the following hyperledger foundation projects CO4 (2)
• Hyperledger burrow
• Hyperledger fabric
• Hyperledger explorer
• Hyperledger Indy
A5. Mention some of the limitations in existing Know Your Customer (KYC) CO5 (2)
applications without blockchain.
PART – B (5 x 6 = 30) CO Marks
B1. Explain the consensus mechanism in bitcoin with appropriate illustrations. CO3 (6)
B2. Explain the process of mining in bitcoin. How is the difficulty parameter set in CO3 (6)
bitcoin?
B3. Write the process of key generation, signing and verification in Elliptic Curve CO1 (6)
Digital Signature Algorithm (ECDSA).
B4. Illustrate the usage of enums in Solidity with an appropriate example. CO4 (6)
B5. Enlist the usage of at least 5 different hyperledger applications CO5 (6)
PART –C (5 x 12 = 60) CO Marks
C1. In an Elliptic Curve Cryptosystem defined as E5(4,4), P1 = (1, 3) and P2 = (0, CO1 (12)
2) Compute the following:
• P1+ P2
• 2P1
• Any two affine points
(OR)
C2. Prove that Fiat Shamir protocol in zero knowledge proof satisfy the following CO1 (12)
properties
• Completeness
• Soundness
• Zero knowledge
C3. In SHA256, Compute the result of one step in Round 1of SHA256 if the contents CO2 (12)
of the registers are A=0x11223344, B=0x55667788, C=0x99AABBCC,
D=0xDDEEFF00, E=0x11223344, F=0x55667788, G=0x99AABBCC,
H=0xDDEEFF00, and the message is 0x12345678 and K1 is 0x9ABCDEF0. The
Boolean functions are defined as:
(OR)
Contd………………..
C4. Tampering of transactions is prevented in bitcoin using Merkle root. Construct CO2 (12)
the merkle root for the following 6 transactions, whose initial values are HA =
0x1234, HB = 0x5678, HC = 0x9ABC, HD=0xDEF0, HE = 0x1234 and HF = 0x1234
And illustrate how tampering is prevented. Write the procedure for verifying the
inclusion of a transaction in a block.
C5. Write a smart contract in solidity to perform banking operations like credit, CO4 (12)
debit, transfer of funds from one account to another. Ensure that the owner of
the account is alone able to debit and transfer funds. Also validate the
availability of sufficient funds before debit and fund transfer.
(OR)
C6. Create a function in solidity by name digitSum(int n),where n>0. Return the CO4 (12)
sum of digit for n. For Example, If n=345 then digitSum() must return 12 i.e.
Create a function in solidity by namedistinct(array, length of array) . This
distinct() will take two arguments - a dynamic uint type array and length of the
array. The distinct() will return the number of distinct elements in an array. For
Example , If array =[4, 2, 3, 4] then distinct() will return 3.
C7. Create a solidity function search(array, length of array,element to search). This CO4 (12)
search() will take three arguments - a dynamic uint type array ,length of the
array, element that we need to search. The search() will return 1 if the element
is found, else return zero.A palindrome number is a number that is same after
reverse. For example 545, 151, 34543 etc. Create a solidity function
palindrome(uint n) . If n is a palindrome then palindrome() returns 1 and n is
not palindrome then palindrome() must return 0. For example, If n=545 then
palindrome() must return 1.
(OR)
C8. Write a smart contract with the structure definition as follows: CO4 (12)
struct Product
{
string pname;
uint pid;
uint pstock;
}
• Create a mapping which stores the address and structure product.
• Write a function to add details to the mapping which can be done only
by the owner of the smart contract.
• Write a function which displays the products with no stock.