Fixed incorrect implementation of key stuff: curve25519 and ed25519 keys are now generated separately, the pcp-proprietary "derived key" feature has been dropped.

This commit is contained in:
TLINDEN
2014-01-19 23:54:53 +01:00
parent 691786cc68
commit 79cd096be5
3 changed files with 27 additions and 84 deletions

View File

@@ -45,7 +45,7 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
#define PCP_ME "Pretty Curved Privacy"
#define PCP_KEY_VERSION 4
#define PCP_KEY_VERSION 5
#define PCP_KEY_PRIMITIVE "CURVE25519-ED25519-SALSA20-POLY1305"
#define PCP_KEY_TYPE_MAINSECRET 1

View File

@@ -80,7 +80,7 @@ struct _pcp_key_t {
byte edpub[32];
byte edsecret[64];
byte nonce[24];
byte encrypted[80];
byte encrypted[112]; // both ed+curve encrypted
char owner[255];
char mail[255];
char id[17];
@@ -113,7 +113,7 @@ typedef struct _pcp_pubkey_t pcp_pubkey_t;
void pcp_cleanhashes();
pcp_key_t *pcpkey_new ();
void pcp_keypairs(byte *csk, byte *cpk, byte *esk, byte *epk, byte *seed);
void pcp_keypairs(byte *csk, byte *cpk, byte *esk, byte *epk);
void pcp_ed_keypairs(byte *csk, byte *esk);
char *pcppubkey_get_art(pcp_pubkey_t *k);