Blockchain introduction Flashcards
Digital signatures and hash functions
what is Cryptography?
- Practice and study of techniques for secure communication in the presents of third parties called adversaries
- Cryptocurrencies make heavy use of cryptography, (provides a mechanism for securely encoding the rules of a cryptocurrency system in the system itself.
Digital signatures and hash functions
what is encryption?
process of turning plain text into ciphertext
what is Decryption?
process of turning ciphertext into readable plain text
what is Breaking ciphertext?
working out how to decrypt ciphertext without being given the key.
Public key cryptography:
what is Asymmetric cryptography?
- Key used to decrypt messages, not the same key used to encrypt it
- Uses mathematically linked key pair
> public key: can be shared with everyone
> private key: known only to you
- Uses mathematically linked key pair
Different public-private schemes exist: name 2
- PGP (pretty good privacy) software
- ECDSA: Elliptic curve digital signature algorithm
what is the ECDSA Process:
Use random number as input (remember it):
- Is your private key (256-bit number in hexadecimal)
then, Do ECDSA maths to generate a public key
the Bitcoin address is generated from ESDSA public key :
- Possible destination for BTC payment
- 26-35 alphanumeric characters
- Start with 1,3, or bc1
what is a Hash function:
algorithm that transforms arbitrary amount of input (message) into a fixed size output
> originally developed at IMB in the early 1950s
what is a Hash:
the value returned by hash function
what is a Hash pointer
pointer to where some information is stored together with cryptographic hash of the information at fixed point in time
Hash functions are deterministic - output is determined by input
what are two types of hash functions
> Basic hash function- example:
- input/message: “use first character of the input”
- Hash (“what time is it”)= ‘W’
-Output ‘W’ is called the digest, or hash value, or hash
> Cryptographic hash function:
- Ideal cryptographic hash function has 5 properties, which makes them useful in cryptography and for cryptocurrencies
5 Properties of cryptographic hash functions:
-Deterministic
-Quick to compute
-Cant go backwards (hiding)
-Small input changes makes big output difference
-Hard to create hash clash (collision resistant)
Use of hash functions
- Can be used to prove that two things are the same without revealing the two things (eg. secret prediction that is revealed later)
In bitcoin, cryptographic hashes used in? (5 points)
> bitcoin address = hash of public key
mining process
identifiers for transactions
identifiers for blocks to list them in a chain
ensure that data tampering is immediately evident
Uses of hash functions outside of bitcoin?
Authentication:
> a password protected website would store the hash function of your password, rather than storing the password itself
> a “digital passport” could be a hash function of your fingerprint stored by the Dept. of homeland security.
security:
> if somebody steals the hash function, they cannot invert it to recreate the input data
what does a Decentralised payment system require?
-Perfectly accurate identification of ownership
- Perfectly accurate transfer of ownership
-Fraud proof:
> cannot be spent twice by the same person
> ownership identification cannot be changed retrospectively
what is the problem with Decentralised payment system, and what is the solution
Problem: transaction ordering
Solution: Blocks
- Slowing down data entry process
- Need to agree on order of block, not order of transactions
- Blocks created every 10 minutes on average
what does a bitcoin block consist of ?
Bitcoin block consists of header, transaction count, and block content
Content of block header:
- Block version number (software version)
- 256-bit hash of the previous block header
- 256-bit hash derived from merkle root
- Time stamp
- Current difficulty target
- Nonce <= changeable by miners to solve hash puzzle