Hashing, salting and peppering, AES, RSA, HMAC, digital signatures, key rotation, certificate management and the ASP.NET Core Data Protection API.
-
What is the difference between hashing, encryption and encoding? Give a .NET example of each, and explain why storing SHA256(password) is not proper password hashing.
Distinguishes hashing, encryption and encoding by purpose and reversibility, with .NET APIs for each, and explains why a fast hash like SHA-256 is unsafe for passwords.
Junior
Theory
Cryptography
Β· π 2 follow-ups
-
How should an ASP.NET Core application store user passwords? Explain salts, peppers and work factors, compare PBKDF2, bcrypt and Argon2id, describe what Identity's PasswordHasher does, and how you would upgrade a database of old SHA-1 or MD5 hashes without forcing every user to reset.
Covers secure password storage: per-user salts, optional pepper, tunable work factors, PBKDF2 vs bcrypt vs Argon2id, Identity's versioned PasswordHasher and migrating legacy hashes by wrapping and rehash-on-login.
Intermediate
Security
Cryptography
Β· π 2 follow-ups Β· π 1 real-world
-
Show how you would encrypt and decrypt sensitive values in .NET with AesGcm. Explain the key and nonce sizes, why reusing a nonce with the same key is catastrophic, what authenticated encryption gives you over AES-CBC, and how you would store the output.
Covers symmetric authenticated encryption with System.Security.Cryptography.AesGcm: 256-bit keys, 96-bit nonces, 128-bit tags, the consequences of nonce reuse, associated data, the stored payload format and when to use Data Protection or Key Vault instead.
Mid-Level
Coding
Cryptography
Β· π 2 follow-ups Β· π 1 real-world
-
Explain asymmetric cryptography with RSA and ECDSA. What is the difference between encrypting and signing with a key pair, which key sizes and curves are acceptable today, why padding such as OAEP and PSS matters, and when would you use asymmetric rather than symmetric cryptography in a .NET system?
Covers public-key cryptography in .NET: RSA vs ECDSA/ECDH, encrypt-with-public vs sign-with-private, key sizes and curves, OAEP and PSS padding versus PKCS#1 v1.5, hybrid encryption and where asymmetric keys appear in real systems.
Mid-Level
Theory
Cryptography
Β· π 3 follow-ups Β· π 1 real-world
-
Write code to verify an incoming webhook signed with HMAC-SHA256, for example from Stripe or GitHub. Explain what HMAC guarantees, why you must compare signatures in constant time with CryptographicOperations.FixedTimeEquals, why you must hash the raw request body, and how you prevent replay.
Covers HMAC-based webhook verification in ASP.NET Core: keyed integrity and authenticity, computing HMACSHA256 over the raw body, constant-time comparison, timestamp checks against replay, and secret rotation.
Intermediate
Coding
Cryptography
Β· π 2 follow-ups
-
How do digital signatures and X.509 certificates work together? Explain what a certificate contains, how a chain of trust is validated, how you would sign and verify a token or document in .NET, and why .NET 9 introduced X509CertificateLoader to replace the X509Certificate2 constructors.
Covers digital signatures and X.509 in .NET: certificate fields, chain building and revocation, signing documents and tokens with certificate keys, X509Chain validation, and the move to X509CertificateLoader (SYSLIB0057) in .NET 9 and later.
Mid-Level
Theory
Cryptography
Β· π 2 follow-ups Β· π 1 real-world
-
How do you manage and rotate encryption keys in an Azure-hosted .NET system? Explain Key Vault keys versus secrets, envelope encryption with data keys and key-encryption keys, how to rotate a key without downtime using key ids, and when you would need an HSM or Managed HSM.
Covers key management for .NET on Azure: Key Vault keys vs secrets vs certificates, envelope encryption (DEK/KEK), key versioning and zero-downtime rotation, re-encryption strategies, HSM tiers, access control and auditing.
Senior
Theory
Cryptography
Β· π 3 follow-ups Β· π 1 real-world
-
What is the ASP.NET Core Data Protection API? Explain what uses it (cookies, antiforgery, TempData), how the key ring works, purposes and IDataProtector, key lifetime and rotation, and how you persist and protect keys when an app runs on several instances, for example with Azure Blob Storage and Key Vault.
Covers ASP.NET Core Data Protection: the consumers that depend on it, the key ring and automatic 90-day rotation, purpose strings, time-limited protectors, default key storage locations, and production configuration with PersistKeysToAzureBlobStorage, ProtectKeysWithAzureKeyVault and SetApplicationName.
Mid-Level
Theory
Cryptography
Β· π 2 follow-ups Β· π 1 real-world
-
After every deployment of your ASP.NET Core app, all users are logged out, and with three instances behind a load balancer you see intermittent antiforgery errors and 'The key {guid} was not found in the key ring' in the logs. How do you diagnose and fix it?
A debugging walk-through for unshared ASP.NET Core Data Protection keys: recognising the symptoms in cookies, antiforgery and OIDC, reading the Data Protection logs, finding where keys are stored per host, and fixing it with a shared, protected key ring and a fixed application name.
Senior
Debugging
Cryptography
Β· π 2 follow-ups Β· π 1 real-world
-
How do you manage TLS and signing certificates for .NET services in Azure and Kubernetes? Cover automated renewal, App Service managed certificates versus Key Vault certificates, cert-manager on AKS, getting a renewed certificate to running apps without a restart, monitoring expiry, the move to much shorter certificate lifetimes, and what post-quantum cryptography means for your plans.
Covers certificate lifecycle at scale: inventory, automated issuance and renewal (App Service managed certificates, Key Vault issuers, cert-manager/ACME), distributing renewed certificates, expiry monitoring, the CA/Browser Forum schedule to 47-day TLS certificates, and post-quantum readiness with ML-KEM and ML-DSA in .NET 10.
Senior
Theory
Cryptography
Β· π 3 follow-ups Β· π 1 real-world