3,685 reputation
1624
bio website
location Wellington, New Zealand
age
visits member for 2 years, 6 months
seen 1 hour ago

I am an undergraduate computer science and mathematics student in New Zealand. My fields of interest are computer graphics, in particular the physics of light transport, and to some extent cryptography, as well as programming and software development in general.


2d
comment Reversing DJB2 Hashes
Hint: I can tell you that the number I'm thinking of is even (0 modulo 2), that's not going to help you know if I'm thinking of 2, 4, or 34857188414. That information is lost when you reduce your input modulo 2^32, only the remainder remains, the original value is lost (yes, forever).
Jul
24
comment Low Public Exponent Attack for RSA
@CGFoX If you had only two congruences then your $n'$ would be on the order of $n^2$ (product of two moduli) and so your $m^3$ would be larger than $n^2$ (by an order of $n$) and you couldn't easily take the cube root without knowing the factorization of the moduli, so it doesn't work.
Jul
23
comment Which algorithm do you recommend for practical use to generate unique passwords for each website?
"If you go this route you are putting all your eggs in one basket. If you forget the master password, you lose all the derived ones. If someone guesses it, they can derive all the others." How is this any different than a password manager exactly? Or do you mean one of those online ones? And, yes, the master password must have quite a lot of entropy if you do this, at least 60 to 80 bits.
Jul
23
comment Which algorithm do you recommend for practical use to generate unique passwords for each website?
You should also consider password compromise (not the master secret, but individual passwords that you need to change for whatever reason). You could append a counter, or some other information that can be easily remembered and updated infrequently, if you don't want to store them, which I imagine is the whole point of the idea.
Jul
18
comment Given $g$, $b$, $g^{ab}$, is finding $g^a$ a hard problem?
@Loi.Luu 4 is in $Z_3$, it's just another representation of $1$. But unless $r$ is the order of $(Z_p)^*$, the math doesn't add up, as fkraiem showed above, and $g^x$ is no longer exponentiation but some other strange operation.
Jul
15
comment Protocol: Coin Flipping over phone
It's not a one-to-one function, though - not even if $n$ is prime. You can see that it maps both $x$ and $-x$ to the same output value, so its range is at most half its domain (exactly half, if $n$ is prime - otherwise, quite a bit less depending on $p$ and $q$).
Jul
11
comment In RSA, why does $p$ have to be bigger than $q$ where $n=p \times q$?
You do realize that since $p \ne q$, one must be greater than the other, right?
Jul
3
comment Exactly two of the four roots must be greater than N/2
@habillqabill If this answers your question, would you consider accepting it by clicking on the check mark on the left?
Jul
3
comment Math to replace s-boxes - Good or bad idea?
I think you will find S-boxes are generally just not arbitrary permutations but often need to fulfill security properties such as resistance against linear/differential cryptanalysis (in the context of the ciphers they are used with) and not all S-boxes can be (reasonably) reached by your first algorithm, which means you also cannot efficiently "invert" the procedure to find $(p, q)$ from an arbitrary S-box, not even for 8-bit ones (perhaps it can be done if you add more degrees of freedom to your formula, but then you run the risk of being too expensive/vulnerable to side channel attacks).
Jul
1
comment Exactly two of the four roots must be greater than N/2
@tylo This is basically what my answer says...
Jul
1
comment Exactly two of the four roots must be greater than N/2
@habillqabill Suppose $n$ is odd. Let $r$ be any integer between $1$ and $n$. Now suppose $r$ is less than $n/2$, then we are done. If $r$ is in fact greater than $n/2$, then $n - r < n/2$ and we are done. Basically, no matter $r$, either $r$ or $n - r$ will be less than $n/2$ (since both will fall on opposite sides of $n/2$). It's a symmetry argument.
Jun
26
comment RSA example-calculation: Public Key = Private Key (e = d)
Note that $e$ cannot be its own inverse unless $e > \sqrt{\varphi(n)}$ (or $\lambda(n)$), or $e = 1$ of course, so in real usage with a normal public exponent $e$ this cannot happen.
Jun
22
comment Modulo settings for successful encryption?
You can emulate mod on a calculator like so: to compute a mod b, compute a/b, round it down, multiply b by the result and subtract a from it. E.g. for 77 mod 8, 77 / 8 = 9.62, so we have 77 mod 8 = 77 - 8 * 9 = 5. Or you can just multiply the fractional part by b, but you tend to run into precision issues quicker doing it that way.
Jun
14
comment Strategy for random CTR initial counter values
@RichieFrame "No message is more than $2^{32}−2$ blocks long"
Jun
11
comment Given $n$ bits, how many “truly random” sequences/numbers can be constructed?
@paul The basic idea of these test suites is to first assume you have access to a uniform bit generator (or a suitably large sample generated by said generator), run statistical tests on it, see how much the results deviate from the expected results, and then conclude after you have reached a statistically significant outcome. They don't measure the "randomness" of the data sample, they simply give confidence towards the hypothesis that "this generator produces uniformly distributed bits". Is this what you mean?
Jun
1
comment How Does Progressive Hashing Work?
It would be difficult to do otherwise, conceptually..
May
31
comment Correct way to read a given permutation cipher?
The first permutation just shifts each letter to the right cyclically. Look at the permutation: (1, 2, 3) => (3, 1, 2). So (1=V, 2=E, 3=N) is mapped to (3=N, 1=V, 2=E), that is, NVE.
May
30
comment Security of the iterated Hill Cipher
Note: the first two papers are behind a paywall.
May
27
comment Want to use ECC but am clueless
This is off-topic as it as about security software recommendation rather than actual cryptography. But I think you should really rethink your problem - generally end users should not concern themselves with which algorithms are being used to secure their data, just that it is, so a general purpose tool will probably serve you better (and it may or may not use elliptic curve technology), otherwise you are probably only going to find hobby, proof-of-concept tools that are probably flawed and insecure...
May
20
comment Common password derivation function for different encryption methods
Don't both bcrypt and PBKDF2 let you choose an arbitrary output length? In that case what's wrong with simply choosing the key length of the block cipher to use next?