I have a problem with setting 'client public key' in dnscrypt-proxy. For every key that I generate and try to use dnscrtpy-proxy returns an error:

The client key file doesn't seem to contain a supported key format
Client key file [...] could not be used

Description of '--client-key' option says:
Use a client public key for identification. By default, the client uses a randomized key pair in order to make tracking more difficult. This option does the opposite and uses a static key pair, so that DNS providers can offer premium services to queries signed with a known set of public keys. A client cannot decrypt the received responses without also knowing the secret key. The value for this property is the path to a file containing the secret key, encoded as a hexadecimal string. The corresponding public key is computed automatically.

So how I can generate or convert key to hexadecimal string?

Regards, A. Bialy

  • I got the answer at github.com and it sounds: "The client key starts with two bytes describing the key format and the key exchange function. Currently, these two bytes must be 0x01 0x01, for X25519. Then comes the 32 bytes X25519 public key. Given a random secret key generated for a customer, the public key can be obtained using libsodium's crypto_scalamult() function" I do not understand anything :-) – A. Bialy Jun 18 '17 at 13:53
  • Where did you find the quote in your comment? Google searches for the text yield only this page. (The other documentation you posted comes from here) – Scott Jul 2 '17 at 20:35

I see the format seems to be quite particular, but could not find a way to either create the keypair or specs to convert the output of a key-generator into this.

Since the use for a client-key seems to be to enable a provider to identify you, maybe that is something that the dnscrypt-server provider has to give you in the proper format?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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