ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/global.h
(Generate patch)

Comparing gvpe/src/global.h (file contents):
Revision 1.28 by root, Wed Jul 17 04:36:03 2013 UTC vs.
Revision 1.33 by root, Fri Sep 20 11:57:03 2013 UTC

65 */ 65 */
66 66
67#define PROTOCOL_MAJOR 1 67#define PROTOCOL_MAJOR 1
68#define PROTOCOL_MINOR 0 68#define PROTOCOL_MINOR 0
69 69
70#define SERIAL_SIZE 16
71
70#define SEED_SIZE 64 // how many octets to seed rng with 72#define SEED_SIZE 64 // how many octets to seed rng with
73
74#define RSA_OAEP_SIZE 41
71 75
72#define HKDF_XTR_HASH EVP_sha512 76#define HKDF_XTR_HASH EVP_sha512
73#define HKDF_PRF_HASH EVP_sha256 77#define HKDF_PRF_HASH EVP_sha256
74 78
75#define HKDF_SALT 32 79#define HKDF_SALT 24 // how many bytes for the hkdf salt
76#define IKM_SIZE 32
77 80
78#define RSA_KEYLEN (RSABITS >> 3) 81#define RSA_KEYLEN (RSABITS >> 3)
79 82
80#define AUTH_DIGEST ENABLE_AUTH 83#define AUTH_DIGEST ENABLE_AUTH
81#define AUTH_SIZE (HASH_SIZE (AUTH_DIGEST)) 84#define AUTH_SIZE (HASH_SIZE (AUTH_DIGEST))
82#define AUTH_TTL 12 // challenge bytes timeout after n seconds of non-use 85#define AUTH_TTL 12 // challenge bytes timeout after n seconds of non-use
83 86
84#define CIPHER ENABLE_CIPHER 87#define CIPHER ENABLE_CIPHER
85#define CIPHER_KEYSIZE (KEY_SIZE (CIPHER)) 88#define CIPHER_KEYSIZE (KEY_SIZE (CIPHER))
89#define CIPHER_IKMSIZE (CIPHER_KEYSIZE * 3 / 2) // randomness in rsa challenge
86 90
87#define MAC_DIGEST ENABLE_DIGEST 91#define MAC_DIGEST ENABLE_HMAC
88#define MAC_KEYSIZE HASH_SIZE (ENABLE_DIGEST) // number of bits used for the HMAC key 92#define MAC_KEYSIZE HASH_SIZE (ENABLE_HMAC) // number of bits used for the HMAC key
93#define MAC_IKMSIZE (MAC_KEYSIZE * 3 / 2) // randomness in rsa challenge
89 94
90#define WINDOWSIZE 512 // sliding window size 95#define WINDOWSIZE 512 // sliding window size
91#define MAX_SEQNO (0xfffffff0U - WINDOWSIZE * 8) 96#define MAX_SEQNO (0xfffffff0U - WINDOWSIZE * 8)
92 97
93// hdr seq len hmac MAC MAC 98// hdr seq len hmac MAC MAC
97#define ICMP_OVERHEAD (IP_OVERHEAD + 4) 102#define ICMP_OVERHEAD (IP_OVERHEAD + 4)
98#define UDP_OVERHEAD (IP_OVERHEAD + 20) // size of a (normal) ip + udp header (wrong, but don't care) 103#define UDP_OVERHEAD (IP_OVERHEAD + 20) // size of a (normal) ip + udp header (wrong, but don't care)
99#define TCP_OVERHEAD (IP_OVERHEAD + 22) // size of a (normal) ip + tcp header + packetlength 104#define TCP_OVERHEAD (IP_OVERHEAD + 22) // size of a (normal) ip + tcp header + packetlength
100#define MAX_OVERHEAD UDP_OVERHEAD // the max. overhead of any protocol (ok, tcp doesn't count) 105#define MAX_OVERHEAD UDP_OVERHEAD // the max. overhead of any protocol (ok, tcp doesn't count)
101#define ETH_OVERHEAD 14 // the size of an ethernet header 106#define ETH_OVERHEAD 14 // the size of an ethernet header
102#define MAXSIZE (MAX_MTU + VPE_OVERHEAD) // slightly too large, but who cares 107#define MAXSIZE (MAX_MTU + IP_OVERHEAD) // slightly too large, but who cares
103 108
104#define PKTCACHESIZE 16 // the size of the memory pool for packets 109#define PKTCACHESIZE 16 // the size of the memory pool for packets
105 110
106extern char *confbase; // directory in which all config files are 111extern char *confbase; // directory in which all config files are
107extern char *thisnode; // config for current node (TODO: remove) 112extern char *thisnode; // config for current node (TODO: remove)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines