Reputation
15,369
Next tag badge:
67/100 score
19/20 answers
Badges
1 23 67
Newest
 Yearling
Impact
~344k people reached

2d
comment Generate RSA-2048 private key for a VERY fast decryption (don't care if it will be unsecure)
Of course, once you've got your certificate approved, you can just configure your server to use $e=1$, too!
Aug
26
comment Can RSA be securely used for “blind decryption”?
I might well be missing a reasonable use case for this protocol, though; it's getting late here and I really should get some sleep. What does seem clear to me, though, is that the ability to use Charlie as a decryption oracle is a major and rather fundamental security issue here.
Aug
25
comment What is matrix branching program?
It might help if you could make your question a bit more specific. Good questions here on Stack Exchange should be reasonably scoped, so that they can be answered in a few pages of text (or less). While I really don't know anything about the subject, I'd guess there's a good chance that "explain matrix branching programs to me" may be too broad a question for this site.
Aug
25
comment Complement of information on software usage
General programming questions are off topic here on Crypto.SE. You may be able to get answers to such questions on Stack Overflow.
Aug
24
comment How can I handle the situation if key size is less than 64 bits in DES?
@poncho: Fair enough. Corrected.
Aug
24
comment Encryption of 8 bit of block data
@SEJPM: That's a very good point. I originally meant to suggest using a MAC for integrity protection, but forgot that while writing the answer. I've corrected that omission now.
Aug
24
comment Encryption of 8 bit of block data
In particular, if random access is needed, using a (conventional, e.g. 128-bit) block cipher in CTR mode as your stream cipher could be a good choice. But do note that CTR mode, like stream ciphers in general, may be insecure if the data can change.
Aug
2
comment Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $
@dylan7: If the two values are equal, you'll need to discard them both, and get two new values. Basically, you're taking in two random values A and B (from any distribution) and returning either 1 (if A > B), 0 (if A < B) or no value (if A = B). Otherwise, you may end up with biased results. For reference, this is basically a variant of von Neumann whitening, extended to non-binary input distributions.
Aug
2
comment Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $
@dylan7: Ah, no. You don't need the mean for anything. What Chris is saying is that you should take two random values, and see which one is greater. Assuming that they're independent and identically distributed, and that they don't happen to be equal, that will give you one unbiased bit. Then take two more values and compare them to get another bit, and so on.
Aug
2
comment Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $
@dylan7: You may have just demonstrated that your pseudo-RNG isn't as random as you think it is. In fact, serial correlation between successive samples is a common flaw in popular LCRNGs.
Aug
2
comment Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $
Note that, for this method to really generate unbiased bits, you'll have to discard both $A$ and $B$ and repeat the process if $A=B$. In fact, such rejection sampling is unavoidable in general: for input distributions having less than 0.5 bits of entropy, there's no way to get an unbiased output bit without sometimes consuming more than two input samples. Also note that this scheme relies on the samples being independent; if subsequent samples may be linked (as they, inevitably, are for PRNGs; good PRNGs try to hide this dependence, more or less successfully), the output can easily be biased.
Aug
2
comment Extend OTP on random data?
@MaartenBodewes: This seems related, at least.
Jun
29
comment Establishing encryption key using shared secret
You might not actually need a hash for authentication either, if you e.g. replace HMAC with CMAC. If you're using public key signatures, though, those probably do require a hash (among other machinery).
Jun
28
comment Establishing encryption key using shared secret
The main advantage of using AES for key derivation is that you're using it for encryption anyway, so it doesn't cost you any extra code to include it. Of course, if you need a hash for something else too, then it indeed becomes just a matter of speed and convenience. That said, AES is likely to win the speed contest too.
Jun
24
comment Why does an algorithm need a keyspace?
@user1688175: $\in$
Jun
23
comment what are the most common stream ciphers algorithms?
If it's not a block cipher in CTR or OFB mode, it's most likely RC4. There are a lot of other interesting stream cipher designs out there, but most of them are rarely seen outside specific niche applications (e.g. tiny embedded ASICs). RC4 is what you'll find in most crypto libraries.
Jun
22
comment Frequency tables for HTML page source
HTML has lots of repetitive strings (e.g. tag names), so you may want to try looking at $n$-gram frequencies for $n\ge2$, or just crib dragging.
May
22
comment HKDF entropy extraction
@StephenTouset: I don't agree. System RNGs have been known to suffer from serious implementation errors (like the Android RNG bug) in the past, not to mention being potentially tempting targets for subversion attacks, and their correct operation is difficult if not impossible for a caller to verify. The safe approach, where possible, is to maintain your own entropy pool, and to treat the system RNG as just another potentially unreliable entropy source for it.
May
22
comment Attacking CBC with predictable but encrypted IV
Based on the known plaintext/ciphertext pair they have, the attacker already knows that $E_K(C_{i-1} \oplus P_i) = C_i$. Thus, they can choose the IV (as long as it's one of the ciphertext blocks they know the plaintext for) by choosing the appropriate nonce.
May
21
comment Elliptic Curve Cryptography Encryption and text representation implementation
This does not appear to answer the question in any meaningful sense.