Reputation
Next tag badge:
89/100 score
20/20 answers
Badges
1 30 60
Newest
 Yearling
Impact
~205k people reached

Dec
22
comment Forgery Attack Against RSA Digital Signature
First of all, I want to emphasize that this is textbook RSA, not RSA as it's used in practice. For real RSA signatures an important step of signing is a collision resistant one-way hash. When using such a scheme, finding a message for a given x is practically impossible.
Dec
20
comment How to use HKDF to combine two keys
@user10988 Hashing is better than xor-ing, for the same reason that HKDF is better than xor-ing. HKDF with a constant salt is a hash.
Dec
19
comment Is a Mersenne-twister cryptographically secure if I truncate the output?
You're a beginner who has no experience in cipher design and cryptoanalysis. You're inventing your own stream cipher which has seen no cryptoanalysis and hope that it's secure. Why do you think that's a good idea?
Dec
19
comment Is a Mersenne-twister cryptographically secure if I truncate the output?
Why do you want to use a MT when there are plenty of strong and fast standard CSPRNGs? AES-CTR can output gigabytes of data per second on a modern CPU. What can be simpler than calling a function "Give me n cryptographically secure bytes*?
Dec
18
comment What is the difference between CSPRNG and PRNG?
Sadly we actually had two separate questions suggesting your trivially broken example as a secure stream cipher. A simple block cipher based on the SHA-256 hash function and Is it feasible to build a stream cipher from a cryptographic hash function?
Dec
18
comment What is the difference between CSPRNG and PRNG?
PRNG encompasses all pseudo random number generators, from the horrible rand call in c, over suitable for simulations but not security ones like the mersenne twister, to the most secure cryptographic PRNG. CSPRNGs are simply the subset of PRNGs which are secure. Every stream cipher, including AES-CTR can act as CSPRNG. Depending on the context, one might also include the proper seeding in the scope, which is far more complex than the actual data generation.
Dec
18
comment Why are the lower 3 bits of curve25519/ed25519 secret keys cleared during creation?
The group order is a multiple of 8. Setting the lowest bits zero, sets the scalar to a multiple of 8, ensuring that the points are in the prime-order subgroup without the small subgroup interfering.
Dec
17
comment Calculation of time to crack SHA-256 hash
@JMCF125 Salts are not required to be secret. They should be unique. A username is not ideal since it allows multi target attacks against different versions of the same user's password, or against the same username on different websites. But in the context of this question I'd assume it's unique.
Dec
17
comment RSA exhibits symmetrical properties — is it possible to form a cryptanalytic attack?
FIPS.186-4 is long. You should reference the relevant section(s).
Dec
17
comment Diffie-Hellman on additive group
But if you use addition modulo a prime, that's a bad idea, since the discrete logarithm problem in that group is easy.
Dec
17
comment Diffie-Hellman on additive group
Additive vs. multiplicative is only a difference in notation. Replace multiplication with addition and exponentiation with scalar multiplication.
Dec
17
revised Diffie-Hellman on additive group
added 6 characters in body; edited title
Dec
17
comment Calculation of time to crack SHA-256 hash
Since you're using a salt (the username), multi-target attacks don't work and thus it doesn't matter if there are one or one million hashes in the db.
Dec
16
comment Is AES still secure considering all this NSA/Snowden scandal?
Related question: AES timing attacks
Dec
16
comment Is AES still secure considering all this NSA/Snowden scandal?
It is possible to implement constant time AES. Either using the AES-NI instructions (extremely fast) or using bitslicing. For parallelizable modes like CTR, bitslicing is relatively fast. Those constant time implementations are gaining popularity, but are still in the minority.
Dec
16
comment Combining two hashing functions
As far as non cryptographic uses are concerned, a cryptographic hash is a perfect.
Dec
15
comment Are IVs and salts the same and usable for each other uses?
If you use a new PBKDF2 salt for each message, you don't need an IV for the actual cipher. But an IV for the cipher can't offer everything you gain from salting PBKDF2. But often it's useful to not compute PBKDF2 per message, in which case a per message IV is needed again.
Dec
15
comment Difference between implicit signature and explicit signature
What exactly do you mean by an implicit signature? I couldn't find a good definition.
Dec
15
comment Game traffic encryption AES CTR + HMAC
@Reid GCM needs 16 byte tags. If you truncate the tag, its security crumbles.
Dec
15
comment Game traffic encryption AES CTR + HMAC
Your main problem is that you don't want security, only obfuscation. Any moderately talented reverser will be able to extract the AES key with standard AES implementations.