File: crypto_kem_sntrup761_libntruprime.c

package info (click to toggle)
tinyssh 20250501-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,388 kB
  • sloc: ansic: 20,245; sh: 1,582; python: 1,449; makefile: 913
file content (26 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "haslibntruprime.h"
#ifdef HASLIBNTRUPRIME

#include <ntruprime.h>
#include "crypto_kem_sntrup761.h"

int crypto_kem_sntrup761_libntruprime_keypair(unsigned char *pk,
                                              unsigned char *sk) {
    sntrup761_keypair(pk, sk);
    return 0;
}

int crypto_kem_sntrup761_libntruprime_enc(unsigned char *c, unsigned char *k,
                                          const unsigned char *pk) {
    sntrup761_enc(c, k, pk);
    return 0;
}

int crypto_kem_sntrup761_libntruprime_dec(unsigned char *k,
                                          const unsigned char *c,
                                          const unsigned char *sk) {
    sntrup761_dec(k, c, sk);
    return 0;
}

#endif