1ZMQ_CURVE(7) 0MQ Manual ZMQ_CURVE(7)
2
3
4
6 zmq_curve - secure authentication and confidentiality
7
9 The CURVE mechanism defines a mechanism for secure authentication and
10 confidentiality for communications between a client and a server. CURVE
11 is intended for use on public networks. The CURVE mechanism is defined
12 by this document: http://rfc.zeromq.org/spec:25.
13
15 A socket using CURVE can be either client or server, at any moment, but
16 not both. The role is independent of bind/connect direction.
17
18 A socket can change roles at any point by setting new options. The role
19 affects all zmq_connect and zmq_bind calls that follow it.
20
21 To become a CURVE server, the application sets the ZMQ_CURVE_SERVER
22 option on the socket, and then sets the ZMQ_CURVE_SECRETKEY option to
23 provide the socket with its long-term secret key. The application does
24 not provide the socket with its long-term public key, which is used
25 only by clients.
26
27 To become a CURVE client, the application sets the ZMQ_CURVE_SERVERKEY
28 option with the long-term public key of the server it intends to
29 connect to, or accept connections from, next. The application then sets
30 the ZMQ_CURVE_PUBLICKEY and ZMQ_CURVE_SECRETKEY options with its client
31 long-term key pair.
32
33 If the server does authentication it will be based on the client’s long
34 term public key.
35
37 The standard representation for keys in source code is either 32 bytes
38 of base 256 (binary) data, or 40 characters of base 85 data encoded
39 using the Z85 algorithm defined by http://rfc.zeromq.org/spec:32.
40
41 The Z85 algorithm is designed to produce printable key strings for use
42 in configuration files, the command line, and code. There is a
43 reference implementation in C at
44 https://github.com/zeromq/rfc/tree/master/src.
45
47 For test cases, the client shall use this long-term key pair (specified
48 as hexadecimal and in Z85):
49
50 public:
51 BB88471D65E2659B30C55A5321CEBB5AAB2B70A398645C26DCA2B2FCB43FC518
52 Yne@$w-vo<fVvi]a<NY6T1ed:M$fCG*[IaLV{hID
53
54 secret:
55 7BB864B489AFA3671FBE69101F94B38972F24816DFB01B51656B3FEC8DFD0888
56 D:)Q[IlAW!ahhC2ac:9*A}h:p?([4%wOTJ%JR%cs
57
58 And the server shall use this long-term key pair (specified as
59 hexadecimal and in Z85):
60
61 public:
62 54FCBA24E93249969316FB617C872BB0C1D1FF14800427C594CBFACF1BC2D652
63 rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7
64
65 secret:
66 8E0BDD697628B91D8F245587EE95C5B04D48963F79259877B49CD9063AEAD3B7
67 JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6
68
70 zmq_z85_encode(3) zmq_z85_decode(3) zmq_setsockopt(3) zmq_null(7)
71 zmq_plain(7) zmq(7)
72
74 This page was written by the 0MQ community. To make a change please
75 read the 0MQ Contribution Policy at
76 http://www.zeromq.org/docs:contributing.
77
78
79
800MQ 4.3.4 01/21/2023 ZMQ_CURVE(7)