[zeromq-dev] RFC 32 - Z85
Pieter Hintjens
ph at imatix.com
Fri Jun 28 22:40:36 CEST 2013
Hi all,
I've pushed a new RFC[1], which defines a format Z85 for encoding
binary as text.
The reason for making this is that it's painful to use Base256
(binary) keys, since you can't exchange them by email or put them into
code except with manual reformatting.
Z85 uses a Base85 encoding taken from Ascii85[2] and fixed so that
it's safe to use in code, config files, command lines, and web UIs.
The assumption is that we'll be sending CurveZMQ public keys to each
other a lot and using them in code.
Here's what it looks like in code (from tests/test_security_curve.cpp):
char server_secret [] = "JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6";
rc = zmq_setsockopt (server, ZMQ_CURVE_SECRETKEY, server_secret, 40);
There's a reference implementation of Z85[3] which is also on a pull
request for libzmq.
Any critique or questions welcome of course, this is a draft.
-Pieter
[1] http://rfc.zeromq.org/spec:32
[2] http://en.wikipedia.org/wiki/Ascii85
[3] https://github.com/zeromq/rfc/tree/master/src
More information about the zeromq-dev
mailing list