mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
now we padd with zeroes as usual but append 4 bytes to the raw input, the last one indicates the pad count. It's always present, even if no padding occurred (the pad blob will then read 0000). This fixes the issue of earlier versions where trailing zeroes in the original input (between block boundaries) have been removed. Since we now add the pad counter, we know how many zeroes to remove. If the original chunk already ended with zeroes they will left untouched. Re-created all test keys/data to match the change. Also, the pcp_z85_encode() function now haves another flag doblock. If set to 1, the function does the 72 chars per line block creation itself, otherwise it just returns the z85 string without any newlines added. Required by pcpstream class.
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
key++: normalize id and lc()
|
|
|
|
allow signing using an alternate secret key, like in pcpdecrypt()
|
|
|
|
malloc() new pointers in functions only if not NULL, e.g. pcp_gennonce()
|
|
|
|
check pub key count in pcp.c before calling verify signature, croak if count==0
|
|
|
|
Update pod key format spec.
|
|
|
|
vault checksum: add keysigs as well
|
|
|
|
enable formats for secret key exports as well
|
|
|
|
Add newlines to headers in define.h, so strlen() later catches the whole length.
|
|
|
|
Check is_utf8 license.
|
|
also found in https://gd.meizo.com/_files/lpc/ext/utf8.c
|
|
|
|
Symmetric decrypt mode tries to open vault
|
|
|
|
pcp_find_primary_secret() makes a copy ???
|
|
|
|
c++ destructor double free mess
|
|
|
|
cpptest 0 uses same Context for encryptor and decryptor,
|
|
must be another one for the latter!
|
|
|
|
Python binding, e.g.:
|
|
py % cdll.LoadLibrary("libsodium.so.8")
|
|
<CDLL 'libsodium.so.8', handle 800776c00 at 80192a3d0>
|
|
py % nacl = CDLL("libsodium.so.8")
|
|
py % hash = create_string_buffer('\000' * 64)
|
|
py % hash
|
|
<ctypes.c_char_Array_65 object at 0x80182c560>
|
|
py % hash.raw
|
|
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x...
|
|
py % key = create_string_buffer('a' * 32)
|
|
py % nacl.crypto_hash_sha256(pointer(hash), pointer(key), 32)
|
|
0
|
|
py % hash.raw
|
|
';\xa3\xf5\xf4;\x92`&\x83\xc1\x9a\xeeb\xa2\x03B\xb0\x84\...
|
|
py %
|
|
|
|
after new z85 padding scheme: write z85 blocksize to output
|
|
as well? if a reader doesn't know the blocksize it won't be
|
|
able to decode it properly. Or no issue? Not sure yet...
|