Files
pcp/tests/static.h
git@daemon.de e033df7156 changed z85 padding (incompatible to previous pcp versions!):
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.
2014-07-31 16:41:20 +02:00

54 lines
1.5 KiB
C

size_t secret_a_len = 32;
unsigned char secret_a[32] = {
0x58, 0x08, 0xc7, 0x3b, 0xfb, 0xc5, 0x85, 0xe2,
0x00, 0xbb, 0x75, 0x31, 0x05, 0xb1, 0xed, 0xb9,
0x8b, 0xc8, 0xf5, 0x05, 0x23, 0xf5, 0xda, 0x8d,
0x46, 0xca, 0xb1, 0x3c, 0xb4, 0xe2, 0xaa, 0x65
};
size_t public_a_len = 32;
unsigned char public_a[32] = {
0x5d, 0x55, 0x3b, 0xf1, 0xa9, 0xf9, 0xaa, 0x69,
0x2c, 0x21, 0x9f, 0x90, 0x02, 0xd7, 0xab, 0x3d,
0x6c, 0xce, 0xa3, 0xb3, 0x5a, 0x23, 0xd9, 0x92,
0x9f, 0x0a, 0x6c, 0xee, 0x8c, 0x59, 0x7a, 0x3a
};
size_t secret_b_len = 32;
unsigned char secret_b[32] = {
0xa8, 0xce, 0x93, 0x86, 0xff, 0xa9, 0x16, 0xdc,
0x88, 0x2a, 0xd3, 0xab, 0x30, 0x25, 0x9c, 0xf0,
0x6e, 0x5e, 0x4e, 0x83, 0x7d, 0x96, 0xa1, 0x08,
0x18, 0x44, 0x30, 0x68, 0x9b, 0xb7, 0xd0, 0x5f
};
size_t public_b_len = 32;
unsigned char public_b[32] = {
0x71, 0xb3, 0x81, 0xa1, 0x16, 0xfd, 0x37, 0x3d,
0xff, 0xd6, 0xb3, 0xb3, 0xd3, 0x8e, 0xe0, 0xaa,
0xb6, 0xf9, 0x01, 0xf8, 0xe7, 0xfc, 0xc3, 0x6a,
0x7a, 0xfe, 0xab, 0x09, 0x52, 0x22, 0x45, 0x63
};
size_t message_len = 12;
unsigned char message[12] = {
0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f,
0x72, 0x6c, 0x64, 0x00
};
size_t nonce_len = 24;
unsigned char nonce[24] = {
0xf9, 0x40, 0x18, 0xd2, 0xdc, 0xf6, 0xab, 0x80,
0xfb, 0xe0, 0x77, 0x59, 0x21, 0xaa, 0xd5, 0xa6,
0xd3, 0xe1, 0x8b, 0xc4, 0xbd, 0x22, 0xee, 0xbc
};
size_t cipher_len = 28;
unsigned char cipher[28] = {
0x74, 0x81, 0x08, 0x7c, 0xf6, 0x45, 0xd0, 0x99,
0x58, 0x79, 0xbb, 0x84, 0x40, 0x0a, 0x13, 0x8a,
0x73, 0x1a, 0x2b, 0x4f, 0x13, 0x57, 0x15, 0xfb,
0x07, 0x7e, 0x06, 0x88
};