… | |
… | |
71 | |
71 | |
72 | #define HKDF_XTR_HASH EVP_sha512 |
72 | #define HKDF_XTR_HASH EVP_sha512 |
73 | #define HKDF_PRF_HASH EVP_sha256 |
73 | #define HKDF_PRF_HASH EVP_sha256 |
74 | |
74 | |
75 | #define HKDF_SALT 32 |
75 | #define HKDF_SALT 32 |
76 | #define IKM_SIZE 32 |
|
|
77 | |
76 | |
78 | #define RSA_KEYLEN (RSABITS >> 3) |
77 | #define RSA_KEYLEN (RSABITS >> 3) |
79 | |
78 | |
80 | #define AUTH_DIGEST ENABLE_AUTH |
79 | #define AUTH_DIGEST ENABLE_AUTH |
81 | #define AUTH_SIZE (HASH_SIZE (AUTH_DIGEST)) |
80 | #define AUTH_SIZE (HASH_SIZE (AUTH_DIGEST)) |
82 | #define AUTH_TTL 12 // challenge bytes timeout after n seconds of non-use |
81 | #define AUTH_TTL 12 // challenge bytes timeout after n seconds of non-use |
83 | |
82 | |
84 | #define CIPHER ENABLE_CIPHER |
83 | #define CIPHER ENABLE_CIPHER |
85 | #define CIPHER_KEYSIZE (KEY_SIZE (CIPHER)) |
84 | #define CIPHER_KEYSIZE (KEY_SIZE (CIPHER)) |
86 | |
85 | |
87 | #define MAC_DIGEST ENABLE_DIGEST |
86 | #define MAC_DIGEST ENABLE_HMAC |
88 | #define MAC_KEYSIZE HASH_SIZE (ENABLE_DIGEST) // number of bits used for the HMAC key |
87 | #define MAC_KEYSIZE HASH_SIZE (ENABLE_HMAC) // number of bits used for the HMAC key |
89 | |
88 | |
90 | #define WINDOWSIZE 512 // sliding window size |
89 | #define WINDOWSIZE 512 // sliding window size |
91 | #define MAX_SEQNO (0xfffffff0U - WINDOWSIZE * 8) |
90 | #define MAX_SEQNO (0xfffffff0U - WINDOWSIZE * 8) |
92 | |
91 | |
93 | // hdr seq len hmac MAC MAC |
92 | // hdr seq len hmac MAC MAC |