mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
changed asym decryption to pbp scheme, compatibility untested yet, but works pcp-internally already
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "defines.h"
|
||||
#include "mem.h"
|
||||
#include "key.h"
|
||||
#include "keyhash.h"
|
||||
|
||||
size_t pcp_sodium_box(unsigned char **cipher,
|
||||
unsigned char *cleartext,
|
||||
|
||||
@@ -65,6 +65,15 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
|
||||
// sigs
|
||||
#define PCP_SIG_VERSION 2
|
||||
|
||||
// crypto file format stuff
|
||||
#define PCP_ASYM_CIPHER 5
|
||||
#define PCP_BLOCK_CIPHER 23
|
||||
#define PCP_BLOCK_SIZE 32 * 1024
|
||||
#define PCP_BLOCK_SIZE_IN (PCP_BLOCK_SIZE) + 16 + crypto_secretbox_NONCEBYTES
|
||||
#define PCP_ASYM_RECIPIENT_SIZE ((crypto_secretbox_KEYBYTES + crypto_box_ZEROBYTES) - crypto_box_BOXZEROBYTES) + crypto_secretbox_NONCEBYTES
|
||||
//#define PCP_ASYM_ADD_SENDER_PUB
|
||||
|
||||
// error handling
|
||||
extern char *PCP_ERR;
|
||||
extern byte PCP_ERRSET;
|
||||
extern int PCP_EXIT;
|
||||
|
||||
Reference in New Issue
Block a user