CBSE Architectural and Design Security 3 — Questions and Answers
Question 1: A blockchain application must comply with GDPR's right to erasure. Which architectural approach best satisfies this requirement without breaking chain immutability?
- Store personal data directly in transaction payloads
- Store only a hash on-chain while keeping personal data in an erasable off-chain store (Correct answer)
- Encrypt personal data with a key that cannot be deleted
- Use a private blockchain so data can be edited retroactively
Correct answer: Store only a hash on-chain while keeping personal data in an erasable off-chain store
Hashing a pointer on-chain while storing erasable personal data off-chain allows deletion of the actual data while preserving audit trail integrity.
Question 2: What is the primary security function of a blockchain oracle in a smart contract architecture?
- Encrypting private keys for external accounts
- Providing authenticated real-world data to on-chain contracts (Correct answer)
- Generating randomness for consensus leader election
- Validating block headers across sidechains
Correct answer: Providing authenticated real-world data to on-chain contracts
Oracles act as trusted data bridges, feeding external facts (prices, events) into smart contracts that cannot natively access off-chain information.
Question 3: Which attack exploits the fact that a smart contract reads its own balance during execution and that balance can be manipulated before the call completes?
- Front-running
- Reentrancy (Correct answer)
- Integer overflow
- Timestamp dependency
Correct answer: Reentrancy
Reentrancy allows an external malicious contract to repeatedly call back into the victim contract before its state is updated, draining funds.
Question 4: In a blockchain network, what does 'finality' mean from a security design perspective?
- Transactions are encrypted after a set number of blocks
- A confirmed transaction cannot be reversed or altered by any subsequent event (Correct answer)
- The smart contract bytecode is frozen after deployment
- Peer nodes have all downloaded the full chain history
Correct answer: A confirmed transaction cannot be reversed or altered by any subsequent event
Finality guarantees that once a transaction achieves a sufficient confirmation depth or BFT commit, it is irreversible—critical for settlement security.
Question 5: A developer proposes storing AES-encrypted sensitive data on a public blockchain with the decryption key held by the user. What is the primary long-term architectural risk?
- High gas costs for large encrypted payloads
- Quantum computing advances could decrypt historically stored ciphertext (Correct answer)
- Nodes will refuse to store non-native token data
- Key rotation is impossible because data is immutable
Correct answer: Quantum computing advances could decrypt historically stored ciphertext
Ciphertext stored permanently on-chain could be decrypted by future quantum computers, exposing sensitive data years after it was written.
Question 6: Which design pattern prevents a malicious contract from consuming all available gas in a loop when processing an unbounded array of user records?
- Pull-over-push payment pattern
- Batch processing with gas limit checks per iteration (Correct answer)
- Proxy upgrade pattern
- Circuit breaker pattern
Correct answer: Batch processing with gas limit checks per iteration
Checking remaining gas inside each loop iteration and halting gracefully prevents out-of-gas failures from unbounded on-chain iteration.
Question 7: In a consortium blockchain, which trust model assumption is most appropriate when selecting a Byzantine Fault Tolerant (BFT) consensus algorithm?
- All nodes are honest and cooperative
- Up to f = (n-1)/2 nodes may be malicious or faulty
- Up to f = (n-1)/3 nodes may be malicious or faulty (Correct answer)
- No nodes will ever crash but some may behave incorrectly
Correct answer: Up to f = (n-1)/3 nodes may be malicious or faulty
Classical BFT protocols like PBFT tolerate up to f Byzantine (arbitrarily malicious) nodes when n ≥ 3f+1, meaning fewer than one-third can be adversarial.
A blockchain application must comply with GDPR's right to erasure.
Which architectural approach best satisfies this requirement without breaking chain immutability?