"Correct, it's only for source code and config files and perhaps
sending by email."

For email you would always use Base64 , there is no efficiency gain due to
the header costs and every system uses it.

For source and config , it would only apply to older languages , most
modern languages have all strings/chars as Unicode / UTF8 regardless so
have no  issue with Z85  , and this is really no issue because you convert
it to a byte[] and reuse the byte[] ..  Keys tend to be reusued all the
time so having it as Unicode or Base64 presents no real issue  for most
scenarios as the source is immediately converted to byte[] which is then
reused. The conversion cost is trivial compared to loading it from config
on disk.

I also dont understand the issue with Base64  , not a single standard ,
well the whole interenet uses it in html and email so there must be a
common standard and being 3 bytes  when you convert it to a byte[]    you
know the actual key length from the protocol and can discard the rest .

Which means to me the scope for Base256 is very narrow.
Performance benefit   , not really - Not config from files  ( IO is the big
cost) , and you wouldnt really hard code keys anyway ,
Languages C and C++ only
Stylistic
whats wrong with this  in code ..
  char client_public [] =
base64ToByteArray("Yne@$w-vo<fVvi]a<NY6T1ed:M$fCG*[IaLV{hID")
, 32);
    char client_secret [] = base64ToByteArray("
 "D:)Q[IlAW!ahhC2ac:9*A}h:p?([4%wOTJ%JR%cs" , 32);
    char server_public [] = base64ToByteArray(""rq:rM>}U?@Lns47E1%kR.o@n%
FcmmsL/@{H8]yf7" , 32);
    char server_secret [] = base64ToByteArray("
"JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6" , 32);

C# and Java config files are loaded with Base64 keys which are loaded into
the model  as byte[] .

I could see some use in HTML but if you wanted things efficient and fast
you wouldnt use HTML  and its worth noting that base 64 probably compresses
better in a html page or when using arithmetic encoding  .


On Sun, Jun 30, 2013 at 1:32 AM, Pieter Hintjens <p...@imatix.com> wrote:

> On Sat, Jun 29, 2013 at 2:01 PM, Sebastian Lauwers
> <sebastian.lauw...@gmail.com> wrote:
>
> > Any specific reason to create Z85 instead of going with Base64, which
> > doesn't present the escape characters drawback that Ascii85 has? I
> > understand that there's a few percent difference in terms of efficiency,
> > but, other than that?
>
> The added efficiency was one reason; the other is that Base85 uses
> groups of 4 bytes which fits our 32-byte keys better.
>
> > Also, to be clear, the format would only be used as a means to represent
> > binary data in source files, and would not be sent over the wire,
> correct?
>
> Correct, it's only for source code and config files and perhaps
> sending by email.
>
> > I couldn't find the reference implementation in the rfc repository, the
> src
> > folder only seems to contain an implementation for rfc27.
>
> It should be in the libzmq master now. I've got a commit ready to push
> to the rfc repo but haven't finished it.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to