Free Blockchain Security Training Cryptographic Security Principles Questions and Answers — Questions and Answers
Question 1: Which property of a cryptographic hash function ensures that it is computationally infeasible to find two different inputs that produce the same hash output?
- Pre-image resistance
- Second pre-image resistance
- Collision resistance (Correct answer)
- Non-repudiation
Correct answer: Collision resistance
Collision resistance is the property that makes it computationally infeasible to find any two distinct inputs, x and y, such that H(x) = H(y). This is critical in blockchains to prevent malicious actors from creating a fraudulent transaction or block that has the same hash as a legitimate one.
Question 2: Alice wants to send 1 Ether to Bob. She constructs a transaction and uses her private key to sign it. What is the primary cryptographic guarantee that this digital signature provides to the network?
- The transaction details will remain confidential during transit.
- Only Bob can see the amount of Ether being sent.
- The transaction was authentically created by the owner of Alice's public address and has not been altered. (Correct answer)
- The transaction will be processed faster by the network miners.
Correct answer: The transaction was authentically created by the owner of Alice's public address and has not been altered.
A digital signature in a blockchain transaction provides two key guarantees: authenticity (the transaction was created by the holder of the private key corresponding to the public address) and integrity (the transaction data has not been tampered with since it was signed). It does not provide confidentiality, as transaction data is public.
Question 3: Which of the following cryptographic components, essential to most current blockchain systems, is most directly threatened by the development of large-scale quantum computers running Shor's algorithm?
- SHA-256 hashing algorithm used for block integrity.
- Elliptic Curve Digital Signature Algorithm (ECDSA) used for transaction signing. (Correct answer)
- Merkle Tree data structures for summarizing transactions.
- Proof-of-Work consensus algorithms based on hashing.
Correct answer: Elliptic Curve Digital Signature Algorithm (ECDSA) used for transaction signing.
Shor's algorithm is specifically designed to efficiently solve the discrete logarithm problem and integer factorization. The security of ECDSA is based on the difficulty of the elliptic curve discrete logarithm problem (ECDLP). A sufficiently powerful quantum computer running Shor's algorithm could derive a private key from a public key, breaking ECDSA. Hashing algorithms like SHA-256 are considered more resistant, though their security is somewhat weakened by Grover's algorithm, not Shor's.
Question 4: A blockchain application needs to verify that a user is over 18 without the user having to reveal their actual birthdate. Which cryptographic principle is best suited for this task?
- Multisignature schemes
- Zero-Knowledge Proofs (ZKPs) (Correct answer)
- Shamir's Secret Sharing
- Hashed Time-Lock Contracts (HTLCs)
Correct answer: Zero-Knowledge Proofs (ZKPs)
Zero-Knowledge Proofs (ZKPs) allow a 'prover' to prove to a 'verifier' that a statement is true (e.g., "I am over 18") without revealing any information beyond the validity of the statement itself. This is the exact use case described, preserving the user's privacy by not disclosing the underlying data (their birthdate).
Question 5: What is the primary advantage of using Elliptic Curve Cryptography (ECC) for digital signatures in blockchain systems compared to older algorithms like RSA?
- It offers significantly smaller key sizes for the same level of security. (Correct answer)
- It is completely resistant to attacks from quantum computers.
- It is a symmetric encryption algorithm, making it much faster.
- It allows for the creation of multiple public keys from a single private key.
Correct answer: It offers significantly smaller key sizes for the same level of security.
The main advantage of ECC is its efficiency. It provides the same level of cryptographic security as RSA but with much smaller key sizes. For example, a 256-bit ECC key is roughly equivalent in strength to a 3072-bit RSA key. This is crucial for blockchains, where smaller signatures and public keys reduce transaction size and save valuable block space.
Question 6: In the context of wallet security, what is the primary purpose of using a computationally intensive Key Derivation Function (KDF) like Scrypt or Argon2 when encrypting a seed phrase with a user's password?
- To generate a public key directly from the password.
- To compress the seed phrase into a shorter, more manageable key.
- To make the encryption and decryption process faster for the user.
- To significantly slow down brute-force and dictionary attacks on the password. (Correct answer)
Correct answer: To significantly slow down brute-force and dictionary attacks on the password.
Key Derivation Functions like Scrypt and Argon2 are intentionally designed to be slow and resource-intensive (requiring significant memory and/or CPU time). This makes it prohibitively expensive and time-consuming for an attacker to perform brute-force or dictionary attacks to guess the user's password, even if they have the encrypted file.
Which property of a cryptographic hash function ensures that it is computationally infeasible to find two different inputs that produce the same hash output?