mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
dammit!
This commit is contained in:
@@ -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) {
|
if(readbytes <= buffer_left(stream->cache) && readbytes <= stream->blocksize) {
|
||||||
/* enough left in current cache */
|
/* 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)) {
|
else if(ps_left(stream) == 1 && readbytes >= buffer_left(stream->cache)) {
|
||||||
return buffer_get_chunk(stream->cache, buf, buffer_left(stream->cache));
|
return buffer_get_chunk(stream->cache, buf, buffer_left(stream->cache));
|
||||||
|
|||||||
21
man/pcp1.pod
21
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
|
If none of -i or -r has been given, encrypt
|
||||||
the message symetrically. This is the same
|
the message symetrically. This is the same
|
||||||
as -m (self-encryption mode).
|
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
|
-m --encrypt-me Sym-Encrypt a message. Specify -I and/or
|
||||||
-O for input/output file. You will be asked
|
-O for input/output file. You will be asked
|
||||||
for a passphrase. No key material will
|
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
|
If used with encryption or singing operation
|
||||||
encode its output. Otherwise encode a plain
|
encode its output. Otherwise encode a plain
|
||||||
file. Use -I and -O respectively, otherwise it
|
file. Use -I and -O respectively, otherwise it
|
||||||
stdin/stdout.
|
uses stdin/stdout.
|
||||||
-Z --z85-decode Decode (dearmor) something from Z85 encoding.
|
-Z --z85-decode Decode (dearmor) something from Z85 encoding.
|
||||||
Use -I and -O respectively, otherwise it
|
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
|
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.
|
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
|
=head2 SIGNATURE FORMAT
|
||||||
|
|
||||||
@@ -799,6 +803,19 @@ secret signing key and S the symmetric key.
|
|||||||
=head2 Z85 ENCODING
|
=head2 Z85 ENCODING
|
||||||
|
|
||||||
B<pcp1> uses Z85 to encode exported keys and armored signatures.
|
B<pcp1> 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={<I&&Z%(pm[09lc5[dx4TZALi/6cjVe)Kx5S}7>}]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
|
=head3 Z85 BACKGROUND
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user