zmq_curve.txt 2.8 KB

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