9,467 reputation
12346
bio website github.com/CodesInChaos
location Frankfurt, Germany
age
visits member for 3 years
seen 2 hours ago

Aug
9
comment why AKS is so slow in practice?
@nightcracker While primality testing isn't cryptography per-se, it's close enough for me to consider it on-topic here.
Aug
9
comment Alice's forgetful banking
If the server successfully impersonates a legitimate server(the OP's assumption is that this is possible) they learn the public key of the client. Knowing the public key allows a password guessing attack, which is only partially mitigated by using a good password hash. With socialist millionaire only signup and not login are vulnerable to this.
Aug
9
comment Alice's forgetful banking
Problem with SRP is that an attacker who impersonates a server learns the password hash, enabling offline search. I'd look into socialist millionaire or something similar protocols.
Aug
9
comment Alice's forgetful banking
Can't you simply use the username for the lookup followed by a zero knowledge proof for the password hash?
Aug
8
comment why DES encryption uses different modes like ECB,OFB?
Without a mode you can encrypt exactly 8 bytes in a deterministic way. If you want to do anything more, you need a mode.
Aug
7
comment Any problems with this secure time synchronization scheme?
@Thomas Why? 1) Then nonce serves as a challenge, else an attacker could simply return an old signed time. The nonce is an essential part of this scheme. 2) A signature scheme may or may not be randomized. I don't see how that matters here.
Aug
7
comment Allowing the user to choose the hashing formula at the registration
@hunter The "no header" approach is an essential part of TrueCrypt's design. It aims at plausible deniability by making encrypted files indistinguishable from random data. AFAIK TrueCrypt needs to try all combinations of cipher and KDF, but it starts with the most common one.
Aug
7
comment Allowing the user to choose the hashing formula at the registration
@hunter No, TrueCrypt needs to try them all since its files have no unencrypted header. IMO it's a good example of what not to do. They could have simply hardcoded PBKDF-2-HMAC-SHA-512 with 100'000 iterations and it would have been far stronger that what they have ATM.
Aug
7
comment Allowing the user to choose the hashing formula at the registration
TrueCrypt is funny that way. It allows the user to pick from Whirlpool, SHA-2 and RIPEMD160, but uses far too few iterations of PBKDF2. A decent iteration count (or even scrypt) would have gained far more than the choice of hash function.
Aug
7
comment Allowing the user to choose the hashing formula at the registration
Just choose one secure scheme, such as scrypt with good parameters.
Aug
6
comment Swapping Key and IV in AES? Safe?
At what granularity do you need your irreversibility? 1 byte? 16 bytes? 1 KB? Larger blocks increase performance, but it's possible to go backwards to the beginning of the block.
Aug
6
comment salting with password hash to improve security?
@e-sushi The difference is that you used it as a close reason, whereas I just commented. Linking to similar questions on other se sites is fine, but it's generally not considered a valid close reason.
Aug
5
comment Is AES-XTS considered safe to encrypt multiple files with the same keys?
Encrypting the same plaintext block twice at the same position leads to identical ciphertext block. That's already quite a big leak.
Aug
5
comment salting with password hash to improve security?
Duplicate on security.stackexchange: When hashing passwords, is it ok to use the hashed password as the salt?
Aug
5
comment Discrete log problem with modulus prime
DL is hard for prime moduli as long as $n-1$ has certain properties. We typically use primes for Diffie-Hellman or DSA.
Aug
5
comment Why Elliptic curve cryptography are not popular in practice
"RSA [...] can be implemented using the technique of Elliptic curves" Generally you don't implement an RSA equivalent on elliptic curves. I think it doesn't offer a real advantage of normal RSA. Typically we use Diffie-Hellman or DSA (and some very similar algorithms) on elliptic curves.
Aug
5
comment Finite fields in elliptic curve
$a$ needs to be an integer (which can be reduced modulo the curve order). There is no operation that multiplies two curve points, and dividing two curve points is prohibitively expensive (requires computing the discrete logarithm)
Aug
2
comment Converting Ed25519 public key to a Curve25519 public key
You can add github.com/nightcracker/ed25519/blob/master/src/key_exchange.c to your project. It should be compatible with the rest of your implementation. It takes an Ed25519 public key, converts it to montgomery, and then computes a scalar multiplication. Don't forget to add a hashing step in the end, preferably one that's compatible with NaCl. That's what I do in my C# port.
Aug
2
comment Converting Ed25519 public key to a Curve25519 public key
In my own application I chose to use Ed25519 public keys in the public API, even for key-exchange. Then convert the public key to montgomery during key-exchange. That's slightly more expensive, but makes the API nicer since there is only one kind of public key visible to the consumer. I also think that it's possible to convert the key-exchange to use Ed25519 natively, removing the performance penalty, but didn't get around to investigating that yet.
Jul
31
comment Why elgamal is still discussed
I don't get your point about ECC. EC-DH vs. EC-ElGamal is no different from DH vs. ElGamal on finite fields. Personally I use EC-DH as much as possible, only falling back to signatures or RSA when absolutely necessary.