#4927·libzmq

sould curve_publickey be required on clients?

Author: minrkCreated Aug 14, 2026Updated Aug 14, 2026

Currently, CURVE clients must set CURVE_SECRETKEY and CURVE_PUBLICKEY, whereas CURVE servers only need to set CURVE_SECRETKEY.

Given that we have zmq_curve_public to derive the public key from the private key, setting secretkey is providing enough information in both cases, which it seems ought to make the CURVE_PUBLICKEY sockopt redundant.

Proposal:

In setsockopt, if curve_publickey is not set, when setting curve_secretkey also set curve_publickey with zmq_curve_public. This should be fully backward-compatible (explicitly setting curve_publickey will always have the exact same effect, whether to correct values or incorrect), and setting curve_publickey should become unnecessary in all cases, not just curve servers, going forward.