Skip to content

Commit

Permalink
stubs for ML-KEM KEX functions
Browse files Browse the repository at this point in the history
used for C89 compilers
  • Loading branch information
djmdjm committed Sep 9, 2024
1 parent 2735812 commit 509b757
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions kexmlkem768x25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include "includes.h"

#ifdef USE_MLKEM768X25519

#include <sys/types.h>

#include <stdio.h>
Expand All @@ -42,6 +40,8 @@
#include "ssherr.h"
#include "log.h"

#ifdef USE_MLKEM768X25519

#include "libcrux_mlkem768_sha3.h"

int
Expand Down Expand Up @@ -254,4 +254,25 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
sshbuf_free(buf);
return r;
}
#else /* USE_MLKEM768X25519 */
int
kex_kem_mlkem768x25519_keypair(struct kex *kex)
{
return SSH_ERR_SIGN_ALG_UNSUPPORTED;
}

int
kex_kem_mlkem768x25519_enc(struct kex *kex,
const struct sshbuf *client_blob, struct sshbuf **server_blobp,
struct sshbuf **shared_secretp)
{
return SSH_ERR_SIGN_ALG_UNSUPPORTED;
}

int
kex_kem_mlkem768x25519_dec(struct kex *kex,
const struct sshbuf *server_blob, struct sshbuf **shared_secretp)
{
return SSH_ERR_SIGN_ALG_UNSUPPORTED;
}
#endif /* USE_MLKEM768X25519 */

0 comments on commit 509b757

Please sign in to comment.