Reputation
14,899
Next tag badge:
64/100 score
18/20 answers
Badges
1 20 67
Newest
 Nice Answer
Impact
~320k people reached

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.)
Mar
10
comment Known plaintext, unknown 128 bit block cipher
Alas, the one thing the paper does not seem to include is any kind of demonstration that their method actually works. In fact, for modern block ciphers with the same block size, I can fairly confidently assert that it doesn't -- if it did, the authors would be famous. (They do suggest that their program may also use side channel information, so it's somewhat plausible that it could e.g. be able to distinguish DES from Blowfish based on the time needed to encrypt a message; but that'll only work if such timing information is actually available.)
Mar
4
comment Is CBC theoretically harder to brute force when compared with ECB?
You're talking about a scenario where the attacker can obtain many messages encrypted with different keys, and only needs to break one key, right? I agree, ECB is (slightly) weaker than CBC in that case, at least as long as the IVs for CBC are properly chosen (i.e. unpredictable by the attacker).
Mar
4
comment AES mode scheme feedback
For the second part, see crypto.stackexchange.com/questions/3229/…
Mar
4
comment Koblitz encoding a message to a point, what is the “associated auxiliary base parameter”?
That said, I took a closer look at the Kodali & Sarma paper to see which EC cryptosystem they're actually using, and I couldn't make any sense of it -- it looks as if they're effectively just running a symmetric Caesar cipher over an elliptic curve (after first doing ECDH key agreement). If so, that still makes absolutely no sense to me; it's not semantically secure, and anyway they'd be much better off just feeding the ECDH secret (computed over a secure curve, not the tiny one they seem to be using) to a KDF and using it to key a standard symmetric cipher, like normal people do.
Mar
4
comment Koblitz encoding a message to a point, what is the “associated auxiliary base parameter”?
Yeah, sorry, ignore that bit about padding, that was basically a brain fart. I was thinking (if I may use the word) about RSA-like schemes, but EC schemes (like the related discrete logarithm based schemes) generally don't need it, because they have their randomization built in.
Mar
3
comment Predicting Google Authenticator OTP Codes
I think this question would need a lot of editing to be a good question for Crypto.SE. For one thing, it definitely needs to lose the "infinite amount of time" part: almost every cryptosystem is trivially breakable by an attacker with infinite computing time. The real question is, can it be broken by a feasible attacker bound by the known laws of physics? In any case, given the age of the question and the lack of attention it has received, I've simply voted to close it.
Mar
3
comment Vigenere ciphers : Need help for math analysis
On a tangent, the method you describe appears to be equivalent to the autokey cipher (a form of which was actually described in the writings of Blaise de Vigenère, unlike the cipher nowadays commonly bearing his name).
Mar
3
comment How to choose the integer m in the general number field sieve (GNFS)?
While this question would be on topic for Mathematics (as it does not use any crypto-specific terminology), I'd say it's also sufficiently closely related to crypto (seeing as it's essentially about optimizing a cryptanalytic attack on RSA) to be borderline on topic here as well.
Mar
3
comment How to compare between two cryptographic algorithms in terms of security?
@SHdotCom: I've edited your question to clean up the grammar a bit, and to include some information from your comment above. However, if you'd like to see it reopened, it would help if you could edit it yourself to clearly answer Maarten's questions above (and to correct any mistakes I might have accidentally introduced). In particular, based on your comments, and the use of the word "hash" in the original question, I'm assuming that you're specifically asking about hash algorithms, but it would be good for you to explicitly state that.
Mar
3
comment Affine transformation in finite field SubBytes
$0 1 0 1 0 0 1 1 \odot 1 0 0 0 1 1 1 1 = 0 0 0 0 0 0 1 1$; $\ 0 \oplus 0 \oplus 0 \oplus 0 \oplus 0 \oplus 0 \oplus 1 \oplus 1 = 0$ (where $\odot$ denotes bitwise AND, and $\oplus$ denotes XOR). Does that make it any clearer?
Mar
1
comment Why would cryptography fall apart if there were a finite number of primes?
Given that it's quite easy to prove that the number of primes isn't finite, this is sort of like asking "why would cryptography fall apart if 1 + 1 wasn't 2?"
Mar
1
comment How obvious is it to decrypt numerics encrypted with a reused one time pad?
Yes, that's exactly what format-preserving encryption does. Basically, an FPE scheme for, say, dates within a year, is a keyed invertible pseudorandom permutation of the set {1, 2, ..., 365} (plus 366 for leap years; of course, in practice, you'd also want to use the year as a "tweak" for the scheme, so it won't be the same permutation each year). Every time you feed in the same unencrypted date, the same encrypted date will come out; it will just tend to flatten out any long-term monthly / weekly trends, since the dates will be shuffled around (pseudo)randomly.
Feb
17
comment Given infinite unencrypted and encrypted texts, can I find the algorithm?
If the encryption is a one-time-pad, no, you can't. For most practical cryptosystems, assuming you also have infinite computational power, yes (or at least you can find something that is as good as the key for any practical purpose).
Feb
17
comment Crypto++: How to re-generate pseurandom integers in Crypto++
@Maarten: True enough. FWIW, HKDF can generate an endless stream of data, at least if you implement it yourself; perhaps more usefully, even if you're using a pre-built implementation that wants the output length up front, it can still generate arbitrarily many quasi-independent output strings, if you feed it distinct info strings for each output. So, to generate a key X with a rejection sampling scheme, you could ask for keyX/1, then keyX/2, etc., until you get an acceptable output.
Feb
15
comment How to accurately calculate Unicity Distance for English?
Yes, the unicity distance is only as correct as the estimate of plaintext entropy it's based on. It's not possible to assign a single objective unicity distance to a cipher, since it depends on the plaintext entropy, which in turn depends on the distribution of plaintexts being encrypted (and, for practical cryptanalysis, on how much we know about this distribution, and on how good we are at recognizing valid plaintexts). If you use DES to encrypt a stream of random bits (r=8), its unicity distance is infinite; if you use it to encrypt a known constant string (r=0), it's 7 bytes (= 56 bits).
Feb
15
comment How to accurately calculate Unicity Distance for English?
Now, to relate this to decryption, let's say you had the wrong key, and decrypted the first two letters as CH instead of PU; would this be enough for you to tell that the key is wrong? Now, what if, instead, you had already decrypted PUZZ, and got YR as the next two letters? Would you consider that as sufficient evidence to reject the key (or at least assign it a very low probability), even though the first four letters looked plausible enough?
Feb
15
comment How to accurately calculate Unicity Distance for English?
(Quick example: I'm thinking of an English word; which letter does it start with? I bet you didn't guess that it's P! Now, the word continues with U, Z, Z; can you guess the next letter now?)