Reputation
11,691
Next tag badge:
97/100 score
18/20 answers
Badges
1 25 57
Newest
 Informed
Impact
~189k people reached

Apr
21
comment Security of KDF1 and KDF2 (hash based KDF's)
This should work as long as the message being hashed has constant length (or at least is prefix free). Else length extensions might bite you.
Apr
21
comment Simple digital signature example with number
Which part did you correct? The only difference I see is that you're using mod n as an operator and mike uses congruence mod n.
Apr
20
comment Diffusion in Shamir's secret sharing scheme
You should insert the questions you're responding to as quotes into your answer. It's a bit hard to follow in its current form.
Apr
20
comment Is there a reason that the N value in scrypt is limited to powers of two?
((UInt64)X[16] * N) >> 32 has similar properties and is relatively cheap on many CPUs. For example on x86 the high word of a 32x32 multiplication ends up in an second register as byproduct of the standard multiplication and thus is easy to compute.
Apr
16
comment How can I convert numbers into prime numbers?
@gurghet With a PRNG I mean a cryptographically secure stream cipher which obviously has keys of at least 128 bits. So I don't know where your 32 bit key space comes from.
Apr
16
comment How can I convert numbers into prime numbers?
Sounds needlessly complicated. I see no advantage over the straight forward approach.
Apr
16
comment How can I convert numbers into prime numbers?
Hashing to primes is easy. Just seed a PRNG with the hash of the input and use it to generate a prime with any standard algorithm.
Apr
15
comment Are there any elliptic curve asymmetric encryption algorithms?
@hunter Why? What do you gain from encrypting the message itself with ECC instead of hybrid encryption? ECIES has a standard asymmetric encryption API. There are a few situations where RSA works but ECIES does not, but they're relatively exotic.
Apr
15
comment What is a 'secret key factory'? What precisely is it doing?
Your example "128 bit key" has only 64 bits once you convert it from hex to bytes.
Apr
14
comment Does AES-128 have the same strength as AES-256 with a padded key?
While simple padding might not cause any immediate weaknesses, I strongly recommend using random keys uniformly distributed over all 256 bits. That's the way AES has been analyzed, that's what's modeled by a PRP (pseudo-random-permutation) helping with security proofs and it avoids concerns over the weak schedule. Use a proper PRF or hash to expand the key not such an ad-hoc scheme.
Apr
14
comment Does AES-128 have the same strength as AES-256 with a padded key?
I wouldn't be confident in too simply paddings since the AES key schedule is relatively weak. Each half of the 256 bit key gets mixed in less often compared with the 128 bit key since AES-256 only as 1.4 times as many rounds, not twice as many. The additional rounds might compensate for the weaker key schedule in padded AES-256 compared with AES-128, but it certainly feels risky. It might be better to simply concatenate the 128 bit key to itself which at least mixes in the key more often.
Apr
14
comment Does AES-128 have the same strength as AES-256 with a padded key?
if you use a good expansion (e.g. SHA256(key)), AES-256 will be stronger against cryptoanalysis since it has 14 rounds instead of just 10. For the same reason AES-256 has lower performance than AES-128.
Apr
12
comment Given a message and signature, find a public key that makes the signature valid (ECDSA)
@DrLecter Can't you simply use the same algorithm, but using $M_2$ as input? I expect to get out some public key, but a public key where the corresponding private key isn't known by the attacker.
Apr
12
comment Given a message and signature, find a public key that makes the signature valid (ECDSA)
See ECDSA Signatures allow recovery of the public key on bitcointalk.org
Apr
12
comment Given a message and signature, find a public key that makes the signature valid (ECDSA)
Check out 4.1.6 Public Key Recovery Operation in Certicom - SEC 1: Elliptic Curve Cryptography
Apr
10
comment Difference between plain AES CTR and “CCM-style” CTR
Unfortunately there isn't one standard CTR mode, different protocols use different ways of combining the counter with the IV and incrementing it.
Apr
10
comment Leak-proof protocol: is such a thing possible?
Another covert channel: timing
Apr
10
comment cryptography and use of python programming language
There are some nice libraries for python, such as SAGE or Charm and it's a high level language so it's good for producing working programs quickly. On the other hand it sucks for high performance and side channel resistant crypto implementations. So it's nice for research but not for production crypto.
Apr
10
comment Why do we encrypt-then mac but sign-then-encrypt?
We should sign followed by authenticated encryption.
Apr
8
comment Multi cipher CTR
@user1028028 Why would you want to do that? It's secure as far as I can tell if all blockciphers are secure, but it's very silly.