CodesInChaos
Reputation
13,606
97/100 score
 Nov 4 comment Square roots, prime factorization Since the OP has now solved the problem, I encourage you to turn the hint into a proper answer that describes the whole solution. Nov 4 comment Can DH_anon really be exploited by an attacker? A client that allows anon DH is still vulnerable to MitM with anon DH even if the server disabled it. (unless perhaps it does something unusual like client certificates or other cryptographic authentication) Nov 4 answered Can DH_anon really be exploited by an attacker? Nov 4 comment RC4 encryption/ decryption with hashing Why new code based on RC4 in 2014? There is a lot of work on getting rid of RC4 because it's potentially weak. Nov 3 reviewed Approve Showing that $2^{N-1}\equiv1\pmod N$ when $N=2^p-1$ for prime $p$ Nov 3 awarded Popular Question Oct 31 comment RSA Decryption given n, e, and phi(n) 1) If there are errors in your first answer, edit it to correct it, instead of posting a new one. 2) I recommend including the essential parts of your code in the answer. An answer in stackexchange should be able to stand on its own, without external resources that might disappear over time. Oct 30 comment RSA Decryption given n, e, and phi(n) Use a big integer library, most programming languages either contain one (at least C# and Python do) or have a readily available third party implementation. (unfortunately the wolfram alpha link above doesn't work, it truncated phi) Oct 30 comment RSA Decryption given n, e, and phi(n) 1) Compute d as the Modular multiplicative inverse of e, i.e. $d=e^-1 \bmod \phi(n)$ using extended euclidean 2) compute $m=c^d \bmod n$ Oct 30 revised Stream Cipher : Never use stream cipher key more than once added 6 characters in body; edited tags Oct 30 comment Why develop new stream ciphers when block ciphers can be trivally made into streams? Comparing dissimilar ciphers like AES and RC4 is pretty difficult. On large modern CPUs AES will be much faster. Oct 30 comment What are these twist attacks with cost $2^{58.4}$ on NIST P-224 curve, and when do they apply? Bernstein likes doing ECDH using x-only ladders without first verifying if the given x value is on the curve or the twist. For example the Curve25519 implementation in NaCl works like that. Oct 30 comment Why is it hard to calculate Logarithm on Diffie Hellman? You compute $g^x \bmod p$ via square-and-multiply in time $(\log(p))^3$, which is feasible for a 1000 bit $p$. The naive algorithms you describe are far too expensive. Oct 30 comment Are there any digital signature algorithms in common use that result in 32-byte signatures? There is a less common scheme called BLS, which produces 32 byte signatures at a 128 bit security level. Oct 30 comment Low exponent attack against RSA You shouldn't rely on secret RSA moduli: Hans-Joachim Knobloch - Breaking Public Keys - How to Determine an Unknown RSA Public Modulus. Oct 30 comment Are there cryptographic hash functions that can be computed using only paper and pen without leaking any information about the plaintext? Is there a textual description of this hash function? I don't want to watch an hour long video for something that almost certainly doesn't meet the requirements of the OP. Learning to keep 60+ bits in mind at the same time is probably possible, but certainly takes quite a bit of effort. Oct 28 comment Why does NTRUEncrypt lack a formal security proof? You can't prove IND-CPA unconditionally. The best you can hope for is a reduction to a common problem like learning-with-errors. You also need to be really careful about the tightness of security reductions. Many proofs are asymptotic or prove an impractically low security level, so even if there is a reduction, it doesn't mean that the scheme is any good. Oct 24 comment What can be learned from the ciphertext of LibSodium's crypto_box_detached()? Three times "no". Oct 24 comment Format Preserving Encryption for 32 or 64 bit plaintext values You might be interested in the AEZ Caesar candidate. Oct 22 comment What is the use of Mersenne Primes in cryptography Some ECC implementation use extension fields with characteristic $2^{127}-1$. One example is snowshoe.