Reputation
14,571
Next tag badge:
62/100 score
18/20 answers
Badges
1 16 64
Newest
 Good Answer
Impact
~305k people reached

Apr
9
comment Should I use ECB or CBC encryption mode for my block cipher?
Let's not expand this answer too much, though -- the fact that it's so short is what lets it be shown in our site tour.
Apr
9
comment KDFs for symmetric encryption master key & serial number
@RichieFrame: Might as well use HKDF-SHA512, so you can say you're using a real standardized KDF. (HKDF is basically just a standardized answer to "How do I use HMAC as a KDF?")
Apr
9
comment What do I use as the encryption key and initialization vector in AES cfb128
Does this answer your question? crypto.stackexchange.com/questions/3965/…
Apr
8
comment Any efficient text-based steganographic schemes?
Hi, Manish, and welcome to Crypto Stack Exchange. I took a quick look at your scheme, and it looks pretty clever. On the other hand (and with no fault on your part implied), your answer did make me start to wonder if this question might not be a bit too broad for a Q&A site like this one; while your project seems interesting enough, we'd really rather not see dozens of other people following your example and also coming here to post links to their own steganography tools. Thus, I've decided to vote to close this question; we'll see if other people here agree.
Mar
28
comment How can I do a brute force (ciphertext only) attack on an CBC-encrypted message?
... Essentially, this holds whenever the ciphertext we're trying to decrypt is longer than the unicity-distance of the cipher.
Mar
28
comment How can I do a brute force (ciphertext only) attack on an CBC-encrypted message?
@RenéG: If there are only $2^{24}$ possible keys, as in the question above, the it's very unlikely that any of those keys would, just by chance, decrypt an 11-byte ciphertext to "black white". (The details depend on the cipher, but for, say, a modern additive stream cipher, the probability of this happening is about one in $2^{64}$, or about one in 18 quintillion (= billion billion).) Indeed, since there are far fewer than $2^{64}$ 11-character combinations of English words, it's extremely unlikely that a wrong key would decrypt your ciphertext to anything that looks like English.
Mar
21
comment Is it safe to prefix the a key with a known value?
@CodesInChaos: I would. HMAC does have its quirks (like the ability to easily construct equivalent keys of different length), but it's still a secure MAC with keys of any length (even if the nominal security level is capped by the hash output length), as long as they have enough entropy to resist brute force attacks. (That said, if you're using multiple HMAC keys derived from each other, you should probably ensure that they're all the same length, or otherwise that they cannot be equivalent. Using a proper KDF to derive your keys from a single master key is generally enough.)
Mar
19
comment Deciphering text encrypted with a changing cipher
@Paŭlo: Specifically, it's equivalent to the rarely used shift-register variant of CFB, where the encryption unit is smaller than a full cipher block. There are security proofs for that variant, too, although the IV requirements are slightly stricter. (Also, just noticed that my link was broken; fixed.)
Mar
16
comment decrypt a saml 2.0 response having aes 128 and rsa
The modulus and exponent together make up an RSA public key. You're right, you presumably don't need them for decryption, but at least you can check that they match the private key you have.
Mar
14
comment How do you break encryption on a message?
Your questions seems really broad, perhaps too broad to be answered well on a Q&A site like this. What you really need is an introductory book on cryptography and cryptanalysis. Here's a few choices to get you started.
Mar
12
comment Beginner question about secure communication with one user using DES
Is that really the exact question asked? I suppose the users could implement a Diffie-Hellman key exchange, if that's allowed, and then derive a DES (or better yet, triple-DES) key from the DH result. But without some kind of a prior shared secret (or asymmetric key pair), there's no way for the users to know they're talking with each other, and not with some middle-man.
Mar
12
comment Implementing modular reductions (n*n)
Reduce modulo $n$, subtract remainder from input, divide by $n$, reduce again? You now effectively have the last two base-$n$ digits of the input.
Mar
11
comment Repair AES-128 decrypted file
Can you tell us the exact openssl command you used? In particular, which cipher mode did you use, and did you use a salt?
Mar
11
comment Encrypt-then-MAC: Do I need to authenticate the IV?
Congrats for hitting the Hot Network Questions list, by the way. :)
Mar
11
comment Is the 1st Encrypted Block Less Secure Than Subsequent Ones?
Related: crypto.stackexchange.com/questions/5421/…
Mar
11
comment Composing two one-way functions such that the result is not a one-way function
Ps. If you really must have two distinct one-way functions, you could always, say, use $1^{n/2}$ instead of $0^{n/2}$ for one of them.
Mar
11
comment Is $f(x)\oplus x$ a one-way function?
Just FYI, I borrowed your construction for a (community wiki) answer to a related question.
Mar
10
comment Encryption scheme that allows compare ciphertexts based on the clear text
I've voted to close this as a duplicate (since the literal answer to your question is basically "this is called order-preserving encryption"), but +1 for a well-asked question.
Mar
10
comment Known plaintext, unknown 128 bit block cipher
Ps. Related, possibly duplicate: crypto.stackexchange.com/questions/997/…
Mar
10
comment Key length requirement in a simple XOR implementation
Yes, it should work, because of the % klen part. (Exercise: what does that part actually do?) You could've also simply tried it yourself on some test data. (In any case, I'm voting to close this question as off topic, since it's really more about basic programming rather than cryptography. It would be a better fit for Stack Overflow.)