2
$\begingroup$

I'd like to embed 8-bits of information by selecting only keypairs where a hash of the public key begins with those 8-bits. (The expected number of keypairs that will need to be generated is 256, so there is a little extra work required.)

The goal is to be able to determine the source of a keypair, to aid debugging in a distributed system.

Does selecting only keypairs, where a hash of the public key has a particular property, weaken security? (Assume that the hashing function is irreversible.)

If so, how?

$\endgroup$

2 Answers 2

1
$\begingroup$

Does selecting only keypairs, where a hash of the public key has a particular property, weaken security?

No, if the hash used is independent of the public key cryptosystem. Then the selection of private keys made is equivalent to a random selection, and can't harm security. That's even provable.

In theory you'd have to use separate hashes for this selection and other uses. That can be implemented with separate prefixes for multiple uses of the same hash. In practice, if hashing data starting with the public key is nowhere to be found (e.g. because the public key is only hashed as part of a certificate with a non-empty prefix), one is likely OK with just selection from the hash of the public key, as in the question.

$\endgroup$
-1
$\begingroup$

No !!! But more good use a offline generators without internet connection and adding small salt for get addition randomness in private key.

$\endgroup$
1
  • 2
    $\begingroup$ As it stands, you haven't really provided any reason why the answer is "no", only a seemingly unrelated (and confusing - how is a salt generated and used?) recommendation is made. $\endgroup$
    – Maarten Bodewes
    Commented Jul 25, 2020 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.