added own file type for crypt+sign, now signing the encrypted result, not the clear message.

using 64bit integers for time vars in key ex/im_ports
This commit is contained in:
TLINDEN
2014-05-06 11:50:28 +02:00
parent 9d2d02221b
commit c66c7ae15c
6 changed files with 55 additions and 21 deletions

View File

@@ -118,10 +118,12 @@ typedef enum _PCP_KEY_TYPES {
#ifndef PCP_CBC
#define PCP_ASYM_CIPHER 5
#define PCP_SYM_CIPHER 23
#define PCP_ASYM_CIPHER_SIG 24
#define PCP_BLOCK_SIZE 32 * 1024
#else
/* CBC mode, use smaller blocks */
#define PCP_ASYM_CIPHER 7
#define PCP_ASYM_CIPHER_SIG 8
#define PCP_SYM_CIPHER 25
#define PCP_BLOCK_SIZE 1 * 1024
#endif

View File

@@ -73,13 +73,19 @@
those cipher numbers become official, I'll use them instead
of my own.
- We use 64 bit integers for times everywhere (ctime, expire, etc),
to be year 2038 safe. Note, that this is a violation of the
RFC spec. However, said RFC have to be modified to fit 2038
anc beyond anyways. This applies for the keyfile ctime as
well for the key sig sub fields containing time values.
- The exported public key packet contains a signature. We're
filling out all required fields. A signature has a variable
number of sig sub packets. We use only these types:
2 = Signature Creation Time (4 byte)
3 = Signature Expiration Time (4 byte)
9 = Key Expiration Time (4 bytes)
2 = Signature Creation Time (8 byte)
3 = Signature Expiration Time (8 byte)
9 = Key Expiration Time (8 bytes)
20 = Notation Data (4 byte flags, N bytes name+value)
27 = Key Flags (1 byte, use 0x02, 0x08 and 0x80

View File

@@ -343,7 +343,7 @@ typedef struct _pcp_stream_t Pcpstream;
/* various helper structs for mgmt.c, used internally only */
struct _pcp_rfc_pubkey_header_t {
uint8_t version;
uint32_t ctime;
uint64_t ctime;
uint8_t cipher;
};