From db125d7e79e7a48cdce34dd446a5824e929cc189 Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Thu, 27 Feb 2014 20:02:15 +0100 Subject: [PATCH] dammit! --- VERSION | 2 +- libpcp/pcpstream.c | 2 +- man/pcp1.pod | 21 +++++++++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index ee1372d..f477849 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.2 +0.2.2 \ No newline at end of file diff --git a/libpcp/pcpstream.c b/libpcp/pcpstream.c index e6d82a7..525ae02 100644 --- a/libpcp/pcpstream.c +++ b/libpcp/pcpstream.c @@ -121,7 +121,7 @@ size_t ps_read_cached(Pcpstream *stream, void *buf, size_t readbytes) { */ if(readbytes <= buffer_left(stream->cache) && readbytes <= stream->blocksize) { /* enough left in current cache */ - return buffer_get_chunk(stream->cache, buf, buffer_left(stream->cache)); + return buffer_get_chunk(stream->cache, buf, readbytes); } else if(ps_left(stream) == 1 && readbytes >= buffer_left(stream->cache)) { return buffer_get_chunk(stream->cache, buf, buffer_left(stream->cache)); diff --git a/man/pcp1.pod b/man/pcp1.pod index 3e7e4f4..30e68c2 100644 --- a/man/pcp1.pod +++ b/man/pcp1.pod @@ -130,6 +130,7 @@ Pretty Curved Privacy - File encryption using eliptic curve cryptography. If none of -i or -r has been given, encrypt the message symetrically. This is the same as -m (self-encryption mode). + Add -z to ascii armor the output using Z85. -m --encrypt-me Sym-Encrypt a message. Specify -I and/or -O for input/output file. You will be asked for a passphrase. No key material will @@ -167,10 +168,10 @@ Pretty Curved Privacy - File encryption using eliptic curve cryptography. If used with encryption or singing operation encode its output. Otherwise encode a plain file. Use -I and -O respectively, otherwise it - stdin/stdout. + uses stdin/stdout. -Z --z85-decode Decode (dearmor) something from Z85 encoding. Use -I and -O respectively, otherwise it - stdin/stdout + uses stdin/stdout @@ -695,6 +696,9 @@ secret key, R is the recipient list, L is the number of recipients, T is the filetype header, I is a block of input with a size of 32k, N is a nonce (new per block) and S the symmetric key. +The encrypted output maybe Z85 encoded. In this case the Z85 +encoding will be done blockwise with blocks of 16k bytes. The +decoded content inside will be as described above. =head2 SIGNATURE FORMAT @@ -799,6 +803,19 @@ secret signing key and S the symmetric key. =head2 Z85 ENCODING B uses Z85 to encode exported keys and armored signatures. +Comments in encoded files are surrounded by the tilde character. +We're using the tilde because it's not part of the Z85 base +charset. Sample: + + ~~~ Header ~~~ + ~ Version: 1 ~ + 246ge]+yn={}]Xi3*N3Xx34Y^0rz:r.5j + v#6Sh/m3XKwy?VlA+h8ks]9:kVj{D[fd7]NA]T-(ne+xo!W5X5-gIUWqM + ~~~ Footer ~~~ + +Multiple tildes can be used as long as their number is uneven. + +This is a proprietary PCP extension. =head3 Z85 BACKGROUND