![]() |
The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
|
Known-answer tests for the EAP-PSK (RFC 4764) cryptographic primitives. More...
Include dependency graph for eap_psk_tests.c:Go to the source code of this file.
Macros | |
| #define | TEST_ASSERT_OR_RETURN(_cond) |
Functions | |
| static void | test_cmac_rfc4493 (void) |
| AES-CMAC vectors from RFC 4493 Section 4. | |
| static void | test_derive_ak_kdk (void) |
| AK/KDK derivation matches hostap's implementation. | |
| static void | test_derive_keys (void) |
| TEK/MSK/EMSK derivation matches hostap's implementation. | |
| static void | test_header (uint8_t header[EAP_PSK_HEADER_LEN], uint8_t code, uint16_t eap_len, uint8_t flags) |
| static void | test_macs (void) |
| MAC_P and MAC_S match hostap's implementation. | |
| static void | test_pchannel_decrypt (void) |
| Protected channel decryption round-trips, and rejects tampering. | |
| static void | test_pchannel_encrypt (void) |
| Protected channel encryption matches hostap, for both message directions. | |
Variables | |
| static uint8_t const | expect_ak [EAP_PSK_AK_LEN] |
| static uint8_t const | expect_emsk [EAP_PSK_EMSK_LEN] |
| static uint8_t const | expect_kdk [EAP_PSK_KDK_LEN] |
| static uint8_t const | expect_mac_p [EAP_PSK_MAC_LEN] |
| static uint8_t const | expect_mac_s [EAP_PSK_MAC_LEN] |
| static uint8_t const | expect_msg3_cipher = 0x8f |
| static uint8_t const | expect_msg3_tag [EAP_PSK_TAG_LEN] |
| static uint8_t const | expect_msg4_cipher = 0xcc |
| static uint8_t const | expect_msg4_tag [EAP_PSK_TAG_LEN] |
| static uint8_t const | expect_msk [EAP_PSK_MSK_LEN] |
| static uint8_t const | expect_tek [EAP_PSK_TEK_LEN] |
| static char const | test_id_p [] = "bob@example.com" |
| static char const | test_id_s [] = "FreeRADIUS" |
| TEST_LIST | |
| static uint8_t const | test_psk [EAP_PSK_PSK_LEN] |
| static uint8_t const | test_rand_p [EAP_PSK_RAND_LEN] |
| static uint8_t const | test_rand_s [EAP_PSK_RAND_LEN] |
Known-answer tests for the EAP-PSK (RFC 4764) cryptographic primitives.
RFC 4764 publishes no test vectors, so verification is done in two layers:
Definition in file eap_psk_tests.c.
| #define TEST_ASSERT_OR_RETURN | ( | _cond | ) |
Definition at line 46 of file eap_psk_tests.c.
|
static |
AES-CMAC vectors from RFC 4493 Section 4.
Definition at line 147 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
AK/KDK derivation matches hostap's implementation.
Definition at line 205 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
TEK/MSK/EMSK derivation matches hostap's implementation.
Definition at line 217 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
MAC_P and MAC_S match hostap's implementation.
Definition at line 230 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
Protected channel decryption round-trips, and rejects tampering.
Definition at line 272 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
Protected channel encryption matches hostap, for both message directions.
Definition at line 249 of file eap_psk_tests.c.
Here is the call graph for this function:
|
static |
Definition at line 75 of file eap_psk_tests.c.
|
static |
Definition at line 97 of file eap_psk_tests.c.
|
static |
Definition at line 79 of file eap_psk_tests.c.
|
static |
Definition at line 107 of file eap_psk_tests.c.
|
static |
Definition at line 111 of file eap_psk_tests.c.
|
static |
Definition at line 122 of file eap_psk_tests.c.
|
static |
Definition at line 123 of file eap_psk_tests.c.
|
static |
Definition at line 127 of file eap_psk_tests.c.
|
static |
Definition at line 128 of file eap_psk_tests.c.
|
static |
Definition at line 87 of file eap_psk_tests.c.
|
static |
Definition at line 83 of file eap_psk_tests.c.
|
static |
Definition at line 70 of file eap_psk_tests.c.
|
static |
Definition at line 69 of file eap_psk_tests.c.
| TEST_LIST |
Definition at line 312 of file eap_psk_tests.c.
|
static |
Definition at line 57 of file eap_psk_tests.c.
|
static |
Definition at line 65 of file eap_psk_tests.c.
|
static |
Definition at line 61 of file eap_psk_tests.c.
1.9.8