Cryptography and Hashing Flashcards
7 cards from real CBCP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Cryptography and Hashing flashcards as text
What is the birthday paradox's significance in evaluating collision resistance of a hash function with an n-bit output?
Answer: A collision can be found with approximately 2^(n/2) operations due to probabilistic birthday math
The birthday paradox shows that collision probability becomes significant after roughly 2^(n/2) hashes, halving the effective security level compared to n bits.
Which protocol uses a commit-reveal scheme based on cryptographic hashing to prevent front-running in decentralized applications?
Answer: Commit-Reveal scheme
Commit-reveal schemes require a participant to first submit a hash of their choice, then reveal the plaintext later, preventing others from copying the answer before the reveal.
What is the purpose of key stretching algorithms like PBKDF2, bcrypt, or scrypt in blockchain wallet security?
Answer: To make brute-force attacks slower by deliberately increasing computational cost
Key stretching algorithms apply many iterations of hashing to slow down computation, making brute-force or dictionary attacks on passwords prohibitively expensive.
In a Merkle proof, what does a verifier need to confirm that a specific transaction is included in a block?
Answer: Only the transaction hash and a set of sibling hashes along the Merkle path
A Merkle proof requires only the target transaction's hash and the sibling hashes at each tree level, enabling efficient inclusion verification without downloading all transactions.
What differentiates a deterministic wallet from a non-deterministic (random) wallet in terms of key management?
Answer: Deterministic wallets derive all keys from a single seed, enabling full backup with one phrase
Deterministic wallets use a master seed to derive all private keys hierarchically, so a single seed phrase backs up every key in the wallet.
Which elliptic curve does Bitcoin use for its ECDSA digital signatures?
Answer: secp256k1
Bitcoin uses the secp256k1 curve, chosen for its efficiency and lack of potentially backdoored NIST-selected parameters.
What is a length-extension attack, and which hash functions are vulnerable to it?
Answer: Computing H(message || padding || extension) without knowing the original message; affects MD5, SHA-1, SHA-256 but not SHA-3
Length-extension attacks exploit the Merkle-Damgård construction to append data to a message and compute a valid hash without knowing the secret prefix; SHA-3's sponge construction is immune.