12,688 reputation
11353
bio website vyznev.net
location Helsinki, Finland
age
visits member for 3 years, 4 months
seen 18 hours ago

I'm a PhD student in biomathematics, working on stochastic individual-based models of evolution in spatially structured populations. My other interests include cryptography, programming games and puzzles, photography and graphic design.


I'm the main author and maintainer of the Stack Overflow Unofficial Patch (SOUP), a user script for browsers with GreaseMonkey-compatible user script support (Firefox, Chrome, Opera, possibly Safari) that fixes or works around a number of outstanding issues with the Stack Exchange user interface.

I tend to answer a lot more questions than I ask. Some answers I'm rather proud of:

CC-Zero Please consider any (original) code I post to Stack Overflow and other Stack Exchange sites to be released under CC-Zero unless stated otherwise. You may do whatever you want with it and don't have to credit me in any way, although of course that would be nice.


Sep
4
comment Using one-way hash functions as the encryption method
Bob could send both two separate keys to Alice, but generally, secure key distribution is the hard part of symmetric-key encryption. If Bob can send, say, 1024 key bits to Alice, they're better off using it all as $K_1$, and deriving $K_2$ from it as I suggested, than they'd be splitting it into two 512-bit keys. As for key reuse, yes, both keys can be reused for multiple messages. The important part in the modified scheme is that $K_1$ is only used to HMAC plaintext, while $K_2$ is only user to HMAC ciphertext. That's why two keys are needed.
Sep
3
comment Using one-way hash functions as the encryption method
For each word, I suggested HMACing the previous 16 bytes (i.e. 512 bits) of the ciphertext (i.e. the part of the ciphertext encoding the previous word). You could HMAC more of the preceding ciphertext, but there's no real advantage to it. As for the hash and the key length, hiding the choice of the hash only adds at most a few bits of strength. That hardly makes up for the fact that it makes the security of your scheme harder to study. And you can use a longer key if you want, but 128 bits is enough to thwart any plausible brute force attacks using computers based on known physics.
Sep
3
comment Using one-way hash functions as the encryption method
@jj57: Having an Enigma machine just tells you how the scheme works, not what key was used to encrypt a given message. A modern, secure encryption scheme would not have been affected in any way by an attacker obtaining an encryption device, or even a detailed schematic of one. See Kerckhoffs' principle for details.
Sep
2
comment Is it possible to translate a piece of language into your own without knowing the language?
Ps. Obligatory Wikipedia link: en.wikipedia.org/wiki/Decipherment
Sep
2
comment Is it possible to translate a piece of language into your own without knowing the language?
Although it's kind of close, I don't think this question is really on topic for Cryptography Stack Exchange. You might have better luck with it on the History or Linguistics Stack Exchange sites. (That said, if someone else thinks it's on topic here and wants to answer it, I could change my mind.)
Sep
2
comment Initialization vector in symmetric-key encryption
Related: Encryption with “constant” initialization vector considered harmful
Sep
1
comment How to renew keys for a statically-encrypted database
Actually, I see no fundamental reason why you couldn't replace, say, the last byte in the SIV tag with a key identifier, provided that you ignored that byte when verifying message authenticity. It would slightly decrease the nominal strength of the S2V (i.e. authenticity) part of SIV, but not significantly. Of course, the resulting scheme would no longer be standard SIV, which might be a concern. (It's always nice to be able to say that you're using a standard encryption method.)
Aug
31
comment Why is the complexity of RSA-1024 80 bit and not 86 bit?
@user129789: Essentially, yes.
Aug
30
comment Why is the complexity of RSA-1024 80 bit and not 86 bit?
@poncho: That's correct. What I was driving at was more that, if the $o(1)$ term (assuming it's not just a mistake) was significant for typical values of $n$, one would expect it to be included explicitly in the formula, or at least to be mentioned in the article.
Aug
29
comment The security of an encrypt-and-MAC
This seems very similar to this recent question. The only real difference I can see is that the other question explicitly specifies that k1 = RC4(k2).
Aug
29
comment The security of an encrypt-and-MAC
It's not necessarily that impractical: you can derive the unique encryption and MAC keys from a master key and some nonce (e.g. a message number) using a KDF. Sure, changing the key for each message is probably slightly slower than using the same key for all of them, but then, if you're using HMAC you're presumably not aiming to squeeze every last bit of performance from your hardware anyway. (If you are, consider using a universal hashing based MAC instead.)
Aug
27
comment RC4 system pitfalls
Your description seems to be missing some possibly relevant details. For instance, what key is used for the HMAC? Is the HMAC output also encrypted, and if so, how? And how are the segment lengths transmitted?
Aug
26
comment The specification of modern, non-communicating cipher machinery
I agree with @owlstead, and have voted to close this question as essentially unanswerable. There might be a meaningful and practical question hidden behind it, but if you want it answered, you'll have to be more explicit about what it is. As currently written, I'm fairly sure the only kind of literature such questions have been considered in is science fiction and fantasy. (And for that, we have another Stack Exchange site.)
Aug
26
comment Lagrange Interpolation for finite field GF(2^8), for Secret Reconstruction
Is the result you're getting actually 104, not 14? Because that's what you should be getting if you calculate 17 × 3 + 34 × 3 + 61 in GF(2^8). The reason you're not getting 10 is that the points (1,17), (2,34) and (3,61) do not satisfy y = 5x² + 2x + 10 in GF(2^8). To make the reconstruction work in GF(2^8), you need to calculate the shares in that field too; see poncho's second answer for details.
Aug
26
comment Lagrange Interpolation for finite field GF(2^8), for Secret Reconstruction
If you're using operator overloading to implement Galois field arithmetic, remember that you need to overload addition and subtraction too. And don't forget to overload the non-assignment versions of the operators, either.
Aug
25
comment Generating an IV for ESP 3DES-CBC
@JuanAndrés: For details on the "fixed IV trick", see crypto.stackexchange.com/questions/5421/…. Basically, it's just a clever way to perform both the NIST-recommended IV derivation and the actual CBC encryption using a single call to a CBC encryption function.
Aug
23
comment Is it theoretically possible to construct a string that contain its own hash value?
@Mys_721tx: If you have a practical chosen-prefix preimage attack on the hash, then you can use it to find such a string: just choose a prefix equal to the desired hash value. I'm not familiar with the attacks on MD4, but most attacks on Merkle-Damgård style hashes do tend to allow chosen prefixes. That said, AFAIK the best known preimage attacks on MD4 aren't really that practical yet: the Laurent attack still needs about $2^{102}$ compression function computations to find a full preimage.
Aug
22
comment Is it theoretically possible to construct a string that contain its own hash value?
@RickyDemer: Thanks, fixed.
Aug
22
comment How resilient to attackers with extreme resources available is this encryption method?
I believe the reason why the answers you're getting are so all over the place is that you haven't defined the scenario fully. In particular, are you trying to implement a secure communication channel or secure file storage? If the latter, what exactly is the authentication part used for; who's authenticating what to whom, and for what purpose? What kind of resources do the legitimate users and/or servers have? Can your users securely store random encryption keys? Can they store random 256-bit keys at all, even insecurely?
Aug
22
comment Multiple parties must encrypt and get the same result
Are the hashes (and the 8 digits stored in plain) public information, or can you keep them hidden on your own servers and only allow on-line existence queries? That would significantly affect the options you'll have.