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:
km
2026-03-28 15:11:26 +09:00
parent 90be06ead1
commit 77c3258494
3 changed files with 294 additions and 46 deletions
+25 -1
View File
@@ -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