Cryptography Fundamentals
- 34Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
34 questions
- 1Cryptography is the study of techniques for secret communication or_____.
Hint
Think about the Greek roots: 'crypto' means hidden, and 'graphy' means writing.
Answer
secret writing
- 2The Greek word 'kryptos', from which cryptography derives, means_____.
Hint
Consider what 'cryptic' means in everyday language.
Answer
hidden
- 3Node.js's built-in crypto module is built on top of the open-source library_____.
Hint
This is a widely used library that implements SSL/TLS and cryptographic algorithms.
Answer
OpenSSL
- 4The function that returns a list of all available cipher algorithms in Node.js is_____.
Hint
Think about naming: 'get' + something related to ciphers.
Answer
getCiphers()
- 5AES stands for Advanced_____Standard.
Hint
The full name includes a word that means 'encoding'.
Answer
Encryption
- 6In AES-256-CBC, the '256' refers to the key size in_____.
Hint
This is a unit of digital information.
Answer
bits
- 7In CBC mode, the first block of plaintext is XORed with an_____before encryption.
Hint
This value is random and ensures different ciphertexts even for identical plaintexts.
Answer
initialization vector
- 8Using the same key and IV for every encryption would allow an attacker to detect_____.
Hint
Think about what Eve could observe if the same plaintext always produced the same ciphertext.
Answer
patterns
- 9To create a cipher object for encryption in Node.js, you call crypto._____.
Hint
The function name includes 'create' and ends with 'iv' to indicate it requires an IV.
Answer
createCipheriv
- 10The method on a Cipher object that processes plaintext in chunks and returns ciphertext is_____.
Hint
This method can be called multiple times for streaming data.
Answer
update
- 11A key derivation function (KDF) is designed to be slow on purpose to thwart_____attacks.
Hint
This type of attack tries many passwords systematically.
Answer
brute-force
- 12Using a KDF without a salt allows Eve to use pre-computed_____to quickly guess passwords.
Hint
These are precomputed tables of hash values for common passwords.
Answer
rainbow tables
- 13The scrypt KDF in Node.js is called using crypto._____.
Hint
The function name matches the algorithm name exactly.
Answer
scrypt
- 14Using Math.random() for cryptography is insecure because it is not_____.
Hint
The MDN documentation explicitly warns against this for security purposes.
Answer
cryptographically secure
- 15The crypto function that returns a buffer filled with random bytes of a given size is_____.
Hint
Think 'random' + 'bytes'.
Answer
randomBytes
- 16The function that generates a random integer in a given range is crypto._____.
Hint
It returns an integer between min and max (inclusive).
Answer
randomInt
- 17The problem of securely sharing a symmetric key over an insecure channel is known as the_____problem.
Hint
This was a major challenge before public-key cryptography.
Answer
key distribution
- 18The Diffie-Hellman key exchange allows Alice and Bob to derive a shared_____without exchanging it directly.
Hint
They end up with the same secret value that can be used as a symmetric key.
Answer
key
- 19In Diffie-Hellman, the function createDiffieHellman creates an object that generates a prime, generator, and_____keys.
Hint
Each party has a pair of keys: one secret and one shared.
Answer
public and private
- 20The variant of Diffie-Hellman that uses elliptic curves for smaller keys is called_____.
Hint
It stands for Elliptic Curve Diffie-Hellman.
Answer
ECDH
- 21RSA is an example of_____encryption, where different keys are used for encryption and decryption.
Hint
This contrasts with symmetric encryption, which uses the same key.
Answer
asymmetric
- 22In RSA, anyone can encrypt a message using the recipient's_____key.
Hint
This key is intended to be widely distributed.
Answer
public
- 23The Node.js function to generate an RSA key pair is crypto._____.
Hint
It generates both public and private keys asynchronously.
Answer
generateKeyPair
- 24To encrypt with RSA in Node.js, you call crypto._____.
Hint
The function name indicates which key is used.
Answer
publicEncrypt
- 25Digital signatures provide_____β assurance that a message came from a specific sender.
Hint
This property ensures the identity of the sender.
Answer
authentication
- 26To create a digital signature, Alice uses her_____key.
Hint
Only Alice possesses this key.
Answer
private
- 27The function to verify a signature in Node.js is crypto._____.
Hint
It checks if the signature matches the data and public key.
Answer
verify
- 28HMAC (Hash-based Message Authentication Code) is used for signing in_____cryptography.
Hint
HMAC uses a shared secret key, not a key pair.
Answer
symmetric
- 29A digital certificate binds a public key to an entity's_____.
Hint
The certificate serves as a form of ID for the key holder.
Answer
identity
- 30The four components of a certificate are subject, issuer, claim, and_____.
Hint
This is what makes the certificate tamper-evident.
Answer
signature
- 31Before a certificate is signed, the data to be signed is called a certificate signing_____.
Hint
Abbreviated as CSR.
Answer
request
- 32In Node.js, certificates can be parsed using the_____class.
Hint
The class name follows the standard format for certificates.
Answer
X509Certificate
- 33The hierarchy of certificates ends with a_____certificate that is inherently trusted by the system.
Hint
This certificate is self-signed and embedded in the OS or browser.
Answer
root
- 34In the browser, the equivalent of Node.js crypto module is the Web Crypto_____.
Hint
It provides similar cryptographic functions for client-side JavaScript.
Answer
API

Ask anything
We've read this whole study set, so questions about it get the best answers.