fixed crypt+sign, now the sig contains the encrypted recipient list as well and is encrypted itself

This commit is contained in:
git@daemon.de
2014-02-05 13:09:20 +01:00
parent 5707ecbf9c
commit a89b16a15c
5 changed files with 138 additions and 38 deletions

View File

@@ -113,10 +113,25 @@ struct _pbp_pubkey_t {
char name[1024];
};
typedef struct _pcp_key_t pcp_key_t;
typedef struct _pcp_pubkey_t pcp_pubkey_t;
typedef struct _pbp_pubkey_t pbp_pubkey_t;
/*
encrypted recipient list, required for crypt+sign
contains the encrypted recipients and the secret
key required for signing the message+recipients.
*/
struct _pcp_rec_t {
size_t ciphersize;
byte *cipher;
pcp_key_t *secret;
pcp_pubkey_t *pub;
};
typedef struct _pcp_rec_t pcp_rec_t;
#define PCP_RAW_KEYSIZE sizeof(pcp_key_t) - sizeof(UT_hash_handle)
#define PCP_RAW_PUBKEYSIZE sizeof(pcp_pubkey_t) - sizeof(UT_hash_handle)