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