Tag Info

New answers tagged

1

It's probably the generation of the IV that takes the time, not the 3DES encryption. 3DES encryption itself should indeed at least scale with the size of the plaintext.


1

One option is that your benchmarking code isn't exact enough to show the small differences. With long enough inputs the time should scale linearly with the number of 64-bit blocks. However, with small inputs, like your 1 vs. 125 blocks, it is possible to see the symptoms you describe – scaling decryption time, but approximately constant encryption time. You ...


1

This is both a DES (or any block cipher) and a programming concern. It is not a problem, just something to be aware of. The reason time/character decreases with larger plaintexts is that the initial overhead and memory management takes up the bulk of time with small inputs. With large inputs (megabytes+) the time/char will stabilize to a fairly consistent ...


1

I second the suggestion of a strong password based KDF, e.g. PBKDF2 or scrypt, which you use to derive the encryption key(s) from the user's password. Additionally, use authenticated encryption (e.g. either AES GCM or AES CTR + HMAC). If you can't open the encryption using the key derived from the password they enter, you know the password was wrong. No ...


2

First, using only a single SHA512 to hash the password is not enough. You should use something like bcrypt with a long salt to store user password "hashes". A simple SHA512 can be attacked quite powerful with a dictionary attack, just trying millions of possible passwords and calculating the SHA512 hash for that until one matches. Concerning the encryption ...


2

SafeCurves lists some ways to compare the security of elliptic curves. Their security criteria are split to "ECDLP security" and "ECC security". Failing the former basically means "there is no way to use this curve securely in general" while the latter "it is difficult to implement this curve securely". None of the (few) BouncyCastle-supported curves that ...


2

You may probably use any curve you like, depending on your special requirements (environment, computational aspects, ...) and the curves implemented by your library (see otus answer refering to some concrete security findings related to specific elliptic curves, and how sensible they are to certain attacks). The reason why the curves are pre-computed, is ...



Top 50 recent answers are included