BBSE at TU München | Flashcards & Summaries

# Lernmaterialien für BBSE an der TU München

Greife auf kostenlose Karteikarten, Zusammenfassungen, Übungsaufgaben und Altklausuren für deinen BBSE Kurs an der TU München zu.

TESTE DEIN WISSEN

Storing Bitcoins

Lösung anzeigen
TESTE DEIN WISSEN

Availability, COnvenience, Security

--> Hot storage and cold storage

Hot: immediately available, convenience - on pc/mobile

cold: extra device, security + cold storage does not have to be online to receive coins

brain wallet: stores coins with secret passphrase. No harddrive, no papers, nothing - but, if forgotten--> lost

paper wallet

Lösung ausblenden
TESTE DEIN WISSEN

evolution support patterns code

Lösung anzeigen
TESTE DEIN WISSEN

Problem: code is immutable and evolution difficult

Solution: decoupling business logic from state data. One implements business logic, other serves as raw data storage (-->  contract combined with geter/setter method)

contract DataStorage{

mapping (bytes32 =>uint) unitStore

function getIntValue (byte32 key) public view returns (uint) {

return uintStore[key] ;

funtion SetIntValue(bytes32 key, uint vaue) public {

unitStore[key] = value;

+ searation concerns (low coupling)

+ updating busines logic of a smart contract is straight forward.

+ Migration to nw does not require separate migration

- user has to traust maintenancer

- maintain multiple contracts at once

- Requires proper lifecycle magament

- requires access rights and permissions

Lösung ausblenden
TESTE DEIN WISSEN

Properties Cryptographic hash functions:

Lösung anzeigen
TESTE DEIN WISSEN

1. Hash functions:

a) Compression (hash maps input x of arbitrary length to h(x) fixed bit length

b) Ease of computation: given x and h --> h(x)

2. Cryptographic hash functions:

a) Preimage resistance: for all outputs y it is unfeasible to find solution to h(x)=y (hard and sufficient (no better than random and long enough to be unsolvable (currently))

b) 2nd preimage resistance: given x it is unfeasible to find any second input x´with x!=x´ such that h(x)=h(x´)

c) collision resistance: infeasible to find two different values with sam ehash function

Lösung ausblenden
TESTE DEIN WISSEN

Genesis block

Lösung anzeigen
TESTE DEIN WISSEN

Start f chain

- cannot be spent, based on source code. client searches all blocks, but skips genesis block

- shows height of block in coinbase trasnaction

Lösung ausblenden
TESTE DEIN WISSEN

Application search puzzle

Lösung anzeigen
TESTE DEIN WISSEN

- hash function computes pzzle results, id makes solutions unique, target set y

--> puzzle set must lie withn range = difficulty

computation id is cocatinated with value x and hashed. X changes until puzzle result lies within y (id//x - id//x+1

Lösung ausblenden
TESTE DEIN WISSEN

Concerns signatures:

Lösung anzeigen
TESTE DEIN WISSEN

1) based on entropy: must be truely random or else not safe e.g. nuclear zerfall

2) signatures can only sin small amount of data - sign hash of the message is sufficient, as hash is collision resistant

3) private keys are not recoverable. If lost, no way act under this entity

Appropriate key length. if too short computed in future

Lösung ausblenden
TESTE DEIN WISSEN

Hash pointers and data structures

Lösung anzeigen
TESTE DEIN WISSEN

Hash pointer contains data to a location data enriched with cg hasg.

Hsh pointers allow to verify data is not changes. (head of hash pointers ensures integrity of blockchain

Lösung ausblenden
TESTE DEIN WISSEN

Examples use cases hash functions

Lösung anzeigen
TESTE DEIN WISSEN

2nd preimage resistance:

want to make shure other party does not tamper with data - want to delete from own storage: -_> save hash of data. after time compare download data with hash, if change --> different

hiding:

secret value r chosen, then given h(r//x) infeasible to find x

1. Combine random number and x -> hash and give to other. Later reveal random number -->  x clear
2. Commitments- commit to value w/ revealing it:
1. Concatinate random and x h(r//x) com: commit(msg, nonce)
2. vErification: verify(com. Msg, nonce)

--> everyone can verify after, if random number and x compute the hash

Lösung ausblenden
TESTE DEIN WISSEN

Bloom filters

Lösung anzeigen
TESTE DEIN WISSEN

Probabilistic data structure, alows to test if element  is in set.

Example newspapaper:

1. Inputs are calculated with cg hash --> basket in filter filled
2. Validation: if filled filter basket returns. Probability depends on number of buckets

--> true /false positives!!! (example apple/lime(grapefruit) false positives, as bucket might be filled by chance already. Ocurence depends on number hash functions

Example new paper: fp not a problem, because irrelevant if misses article he has not read and get another one he has not read.

Lösung ausblenden
TESTE DEIN WISSEN

Sceme with cryto hash for rock pper scissors

Lösung anzeigen
TESTE DEIN WISSEN

Commit/reveal

cocaatinate random + result --> share

end: reveal random and result: has to hash to hash

Lösung ausblenden
TESTE DEIN WISSEN

Unforgeable (signing)

Lösung anzeigen
TESTE DEIN WISSEN

attacker knows pblic key

sees signature on arbitrary amount of messages

--> Undforgeable means, that attacker is not able to create a signature on a message that he has not seen

Lösung ausblenden
TESTE DEIN WISSEN

Messages

Lösung anzeigen
TESTE DEIN WISSEN

Mesages similar to transaction (BUT ONLY SENT BY SC)

AND exist only virtually i.e. are not mined into a block) (Übung: they are result of calculation in block)

-Sender

-Recipient

-Amount of ether to transfer alongside the message

-Optional data field

-STARTGAS value

Contract calls method on another contract VIRTUAL message is sent

Wallet to SC- transaction sent

Lösung ausblenden
• 356131 Karteikarten
• 8247 Studierende
• 335 Lernmaterialien

## Beispielhafte Karteikarten für deinen BBSE Kurs an der TU München - von Kommilitonen auf StudySmarter erstellt!

Q:

Storing Bitcoins

A:

Availability, COnvenience, Security

--> Hot storage and cold storage

Hot: immediately available, convenience - on pc/mobile

cold: extra device, security + cold storage does not have to be online to receive coins

brain wallet: stores coins with secret passphrase. No harddrive, no papers, nothing - but, if forgotten--> lost

paper wallet

Q:

evolution support patterns code

A:

Problem: code is immutable and evolution difficult

Solution: decoupling business logic from state data. One implements business logic, other serves as raw data storage (-->  contract combined with geter/setter method)

contract DataStorage{

mapping (bytes32 =>uint) unitStore

function getIntValue (byte32 key) public view returns (uint) {

return uintStore[key] ;

funtion SetIntValue(bytes32 key, uint vaue) public {

unitStore[key] = value;

+ searation concerns (low coupling)

+ updating busines logic of a smart contract is straight forward.

+ Migration to nw does not require separate migration

- user has to traust maintenancer

- maintain multiple contracts at once

- Requires proper lifecycle magament

- requires access rights and permissions

Q:

Properties Cryptographic hash functions:

A:

1. Hash functions:

a) Compression (hash maps input x of arbitrary length to h(x) fixed bit length

b) Ease of computation: given x and h --> h(x)

2. Cryptographic hash functions:

a) Preimage resistance: for all outputs y it is unfeasible to find solution to h(x)=y (hard and sufficient (no better than random and long enough to be unsolvable (currently))

b) 2nd preimage resistance: given x it is unfeasible to find any second input x´with x!=x´ such that h(x)=h(x´)

c) collision resistance: infeasible to find two different values with sam ehash function

Q:

Genesis block

A:

Start f chain

- cannot be spent, based on source code. client searches all blocks, but skips genesis block

- shows height of block in coinbase trasnaction

Q:

Application search puzzle

A:

- hash function computes pzzle results, id makes solutions unique, target set y

--> puzzle set must lie withn range = difficulty

computation id is cocatinated with value x and hashed. X changes until puzzle result lies within y (id//x - id//x+1

Q:

Concerns signatures:

A:

1) based on entropy: must be truely random or else not safe e.g. nuclear zerfall

2) signatures can only sin small amount of data - sign hash of the message is sufficient, as hash is collision resistant

3) private keys are not recoverable. If lost, no way act under this entity

Appropriate key length. if too short computed in future

Q:

Hash pointers and data structures

A:

Hash pointer contains data to a location data enriched with cg hasg.

Hsh pointers allow to verify data is not changes. (head of hash pointers ensures integrity of blockchain

Q:

Examples use cases hash functions

A:

2nd preimage resistance:

want to make shure other party does not tamper with data - want to delete from own storage: -_> save hash of data. after time compare download data with hash, if change --> different

hiding:

secret value r chosen, then given h(r//x) infeasible to find x

1. Combine random number and x -> hash and give to other. Later reveal random number -->  x clear
2. Commitments- commit to value w/ revealing it:
1. Concatinate random and x h(r//x) com: commit(msg, nonce)
2. vErification: verify(com. Msg, nonce)

--> everyone can verify after, if random number and x compute the hash

Q:

Bloom filters

A:

Probabilistic data structure, alows to test if element  is in set.

Example newspapaper:

1. Inputs are calculated with cg hash --> basket in filter filled
2. Validation: if filled filter basket returns. Probability depends on number of buckets

--> true /false positives!!! (example apple/lime(grapefruit) false positives, as bucket might be filled by chance already. Ocurence depends on number hash functions

Example new paper: fp not a problem, because irrelevant if misses article he has not read and get another one he has not read.

Q:

Sceme with cryto hash for rock pper scissors

A:

Commit/reveal

cocaatinate random + result --> share

end: reveal random and result: has to hash to hash

Q:

Unforgeable (signing)

A:

attacker knows pblic key

sees signature on arbitrary amount of messages

--> Undforgeable means, that attacker is not able to create a signature on a message that he has not seen

Q:

Messages

A:

Mesages similar to transaction (BUT ONLY SENT BY SC)

AND exist only virtually i.e. are not mined into a block) (Übung: they are result of calculation in block)

-Sender

-Recipient

-Amount of ether to transfer alongside the message

-Optional data field

-STARTGAS value

Contract calls method on another contract VIRTUAL message is sent

Wallet to SC- transaction sent

### Erstelle und finde Lernmaterialien auf StudySmarter.

Greife kostenlos auf tausende geteilte Karteikarten, Zusammenfassungen, Altklausuren und mehr zu.

## Das sind die beliebtesten StudySmarter Kurse für deinen Studiengang BBSE an der TU München

Für deinen Studiengang BBSE an der TU München gibt es bereits viele Kurse, die von deinen Kommilitonen auf StudySmarter erstellt wurden. Karteikarten, Zusammenfassungen, Altklausuren, Übungsaufgaben und mehr warten auf dich!