2,520 reputation
524
bio website touset.org
location San Francisco, CA
age 30
visits member for 2 years, 1 month
seen 1 hour ago

Cyclist. Rubyist.


Jul
3
comment SHA256 output to 0-99 number range?
Yes, you are still taking the remaining $2^{256} \equiv 36 \pmod{100}$ outputs and trying to distribute them equally amongst 100 buckets.
Jul
3
comment SHA256 output to 0-99 number range?
The OP is looking for a mechanism "where each number in 0-99 range is equally likely to be picked". The output of your algorithm is easily distinguishable from random, because some digits will be chosen more or less likely than the others due to aliasing introduced by converting to integers.
Jul
3
comment SHA256 output to 0-99 number range?
This only works if he doesn't require integers.
Jul
3
comment Is SHA256 good enough to shrink a key?
Since you have PBKDF2, you can also just do one iteration of that using both the keys as input, and the specified length as output. But SHA-256 works too.
Jul
2
awarded  Curious
Jun
30
comment Pi Message Encryption
@otus This doesn't really solve that issue anyway, since related-key attacks are trivial; even if you wanted to keep the spirit of this approach, you'd want to feed the output through a PRG anyway to avoid close keys effectively becoming two-time pads.
Jun
30
comment Pi Message Encryption
I agree. That said, I think it's important to be clear where this approach falls in the general spectrum of security. This approach will not likely benefit from repeating a cycle of pointing out weaknesses and "patching" them.
Jun
30
comment Pi Message Encryption
Even then, there are catastrophic flaws in the implementation. No use of initialization vectors. No authentication of the ciphertext. Operation on characters rather than bytes. This is something you might use to "encrypt" notes passed around in high school, and no more.
Jun
30
comment Pi Message Encryption
Any sane encryption algorithm shouldn't care about "characters" anyway. It should care about bytes.
Jun
30
comment Pi Message Encryption
This is a poor idea simply because you gain nothing by choosing an offset of $\pi$. Even assuming $\pi$ is unpredictably random, the "key" is the index of the starting digit of pi you wish to use, and to meet modern security expectations, it would need to be at least 128 bits long. But if you already have a 128-bit random key, you're done — you don't need to index into pi to get random digits!
Jun
26
comment Is it possible to get better randomness by using multiple PRNGs?
I must confess I took the assumption about being seeded from individual sources for granted; thanks for pointing it out! Actually, an even better example would be two identical PRNGs seeded from the same TRNG — they would produce the same bit sequence, and thus their XOR would be all zeroes.
Jun
26
comment Is it possible to get better randomness by using multiple PRNGs?
No need to do any kind of complex decision-making logic. Simply XORing PRNG outputs will do; at worst, the result has the same entropy as the most entropic of the inputs. For instance, if one of the inputs is truly random, and the other is completely attacker-controlled, the XOR of the two is still completely random and unpredictable to an attacker.
Jun
25
comment Using PBKDF2 twice with different argument order
You appear to have edited the response, but still only assert that $a = b$ is disastrous. How can an adversary subversively choosing their own password lead to the compromise of other parties' keys, as you claim?
Jun
20
reviewed Reopen RSA: Common modulus attack problem
Jun
20
comment How big an RSA key is considered secure today?
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
Jun
20
reviewed Leave Open Is HMAC padding the same as bcrypt?
Jun
20
answered Is HMAC padding the same as bcrypt?
Jun
18
comment Length-preserving all-or-nothing transform
@fgrieu You're right. I'd originally conceived it as doing CBC a second time over the reversal of the ciphertext, but as D.W. explains in his answer, the entire construct is unnecessary in the first place. Oh well.
Jun
18
comment Using PBKDF2 twice with different argument order
Can it? By what property?
Jun
17
reviewed Close How to calculate inverse affine transform in AES from forward affine transform?