Reputation
21,541
Next tag badge:
97/100 score
23/20 answers
Badges
4 29 79
Impact
~444k people reached

Jan
24
comment Are there hash algorithms with variable length output?
@BMiner, sometimes some crypto libraries will generate the IV for you and include the IV in the ciphertext. In other words, when you encrypt, you pass in a key and a message, and you get back a ciphertext, where the ciphertext includes the IV somewhere in it. If your library is like that, you need to remove the IV (and make sure that the IV always starts at 0). This gets easier if you implement AES-CTR yourself, so you can force it to start at IV 0 and make sure that the output only includes the generated pseudorandom stream (and not the IV).
Jan
23
revised Initialize a PRNG with a password
added 36 characters in body
Jan
23
comment Initialize a PRNG with a password
@Gilles, in principle, I agree, but passwords almost never have enough entropy (particularly if you need to ask).
Jan
23
revised Initialize a PRNG with a password
deleted 431 characters in body
Jan
23
comment Initialize a PRNG with a password
@Gilles, you are right. My mistake. Thank you.
Jan
23
answered Initialize a PRNG with a password
Jan
23
revised Are there hash algorithms with variable length output?
added 173 characters in body
Jan
23
comment Are there hash algorithms with variable length output?
@BMiner, it depends upon the mode. For CBC mode, this will work as long as you make sure to first remove the IV (since the IV won't be random), and take the first $b$ bits of the remaining ciphertext. I would expect something similar to hold for other reasonable modes too but I haven't thought about it carefully.
Jan
19
comment Is it safe to use RSA as a proof-of-work system?
I think this scheme is broken; see my answer for details.
Jan
19
comment Is it safe to use RSA as a proof-of-work system?
I just realized the proposed scheme seems to be broken. (A key hint comes in the sentence in this answer: "you gave [the client] $d$ and hence the factorization of $n$". However I don't think this answer realized the full implications of this.) Therefore, this answer's conclusion (that the scheme is OK) seems wrong. See my answer for an explanation of the attack and why this proposed scheme should not be used.
Jan
19
revised Is it safe to use RSA as a proof-of-work system?
added 1235 characters in body
Jan
19
revised Is it safe to use RSA as a proof-of-work system?
added 1235 characters in body
Jan
19
answered Is it safe to use RSA as a proof-of-work system?
Jan
19
answered Many time pad attack
Jan
19
comment Is it safe to use RSA as a proof-of-work system?
I should also ask: Why do you want to use RSA in particular, as opposed to any of the many other proof-of-work systems? It is possible there might be other, even better ways to achieve your requirements, depending upon what your requirements may be. I don't know if that interests you or not.
Jan
19
comment Is it safe to use RSA as a proof-of-work system?
There are some math errors in here: $((a^d)^d)^{\cdots}$ is not the same as $a^{kd}$. Rather, it is $a^{d^k}$.
Jan
19
comment Is it safe to use RSA as a proof-of-work system?
"uses the public exponent to sign" - You lost me. In RSA, signing always uses the private exponent, not the public exponent, so I'm not sure what you are referring to here. Can you be more precise about exactly what the process is? Are you calculating $((r^d)^d)^{...} = r^{d^{256}} \bmod n$, where $r$ is the random nonce and $d$ is the private exponent?
Jan
18
comment LFSR for small numbers with large periods
I am voting to close because I do not see this as on-topic for Crypto.SE. It is not clear whether this is being used for cryptographic purposes, but it appears not. Questions about the period of non-cryptographic pseudorandom generators do not fall within what I understand to be the scope/topic of this site. (If this is controversial, we should probably create a question on meta to discuss it further.)
Jan
18
comment LFSR for small numbers with large periods
Thank you for the feedback, @gl3829. I did answer the cryptographic part of the question: see my suggestion in paragraph 3 of my answer, for my answer. Of course, you have to recognize that sometimes the best answer takes a different form that you may have expected or hoped for. By the way, my question stands: What are your security requirements? Are you using this for cryptographic purposes? I don't think we can answer the question suitably without knowing what the security requirements are (if any) for the output of this generator.
Jan
17
answered LFSR for small numbers with large periods