test: Add WireGuard protocol integration tests
- X25519 RFC 7748 test vector verification
- ChaCha20-Poly1305 AEAD encryption/decryption
- BLAKE2s HMAC verification
- Key derivation testing
- Full DH exchange simulation
- Packet encryption/decryption flow
- Memory zeroizing verification
All 15 tests pass ✅
This commit is contained in:
@@ -27,7 +27,31 @@ extern "C" {
|
||||
* - Session keys (sending/receiving)
|
||||
* - Cookie state for DoS protection
|
||||
*/
|
||||
typedef struct se050_wireguard_session se050_wireguard_session_t;
|
||||
typedef struct se050_wireguard_session {
|
||||
/* Local keys */
|
||||
uint8_t private_key[32];
|
||||
uint8_t public_key[32];
|
||||
|
||||
/* Peer keys */
|
||||
uint8_t peer_public_key[32];
|
||||
|
||||
/* Handshake state */
|
||||
uint8_t handshake_secret[32];
|
||||
uint8_t chain_key[32];
|
||||
uint8_t sending_key[32];
|
||||
uint8_t receiving_key[32];
|
||||
uint64_t sending_nonce;
|
||||
uint64_t receiving_nonce;
|
||||
|
||||
/* Cookie state */
|
||||
uint8_t cookie_secret[32];
|
||||
uint64_t cookie_timestamp;
|
||||
uint8_t last_mac1[16];
|
||||
|
||||
/* State flags */
|
||||
int is_initiator;
|
||||
int handshake_complete;
|
||||
} se050_wireguard_session_t;
|
||||
|
||||
/* =========================================================================
|
||||
* Session Management
|
||||
|
||||
Reference in New Issue
Block a user