diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-08-29 12:08:29 +0200 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-08-31 08:31:46 +0200 |
| commit | 0719ed46d29b0e57cb9128f5396ff894b7456766 (patch) | |
| tree | 1ecd3c8ea9a2367971434d76d7a9125cbdf2740d /src/irmd/oap/tests/oap_test.c | |
| parent | fee337529da2d2b386b241812e176852bd5d4c4c (diff) | |
| download | ouroboros-0719ed46d29b0e57cb9128f5396ff894b7456766.tar.gz ouroboros-0719ed46d29b0e57cb9128f5396ff894b7456766.zip | |
lib: Improve hybrid KEX support
The algorithm was inferred from the key length. That will not always
work as SecP256r1MLKEM768 private key is 2432 bytes, exactly like an
X25519MLKEM768 one.
Raw OAP kex payloads now lead with the algorithm NID in network byte
order, so a peer reads the algorithm from the wire instead of guessing
it from the payload length.
Test if the KEX is hybrid KEM with kex_nid_is_hybrid() based on the
NID range.
The configured algorithm is passed to the raw key loaders. The public
key loader imports the key to validate it, so a corrupt or mismatched
file is reported at load time.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/oap/tests/oap_test.c')
| -rw-r--r-- | src/irmd/oap/tests/oap_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/irmd/oap/tests/oap_test.c b/src/irmd/oap/tests/oap_test.c index b24bb786..3e2bae56 100644 --- a/src/irmd/oap/tests/oap_test.c +++ b/src/irmd/oap/tests/oap_test.c @@ -81,9 +81,9 @@ int mock_load_credentials(void ** pkp, } /* Stub KEM functions - ECDSA tests don't use KEM */ -int load_server_kem_keypair(__attribute__((unused)) const char * name, - __attribute__((unused)) bool raw_fmt, - __attribute__((unused)) void ** pkp) +int load_server_kem_keypair(__attribute__((unused)) const char * name, + __attribute__((unused)) struct sec_config * cfg, + __attribute__((unused)) void ** pkp) { return -1; } |
