1 /* $OpenBSD: crypto_api.h,v 1.9 2024/09/02 12:13:56 djm Exp $ */
4 * Assembled from generated headers and source files by Markus Friedl.
5 * Placed in the public domain.
18 typedef int8_t crypto_int8
;
19 typedef uint8_t crypto_uint8
;
20 typedef int16_t crypto_int16
;
21 typedef uint16_t crypto_uint16
;
22 typedef int32_t crypto_int32
;
23 typedef uint32_t crypto_uint32
;
24 typedef int64_t crypto_int64
;
25 typedef uint64_t crypto_uint64
;
27 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len))
28 #define small_random32() arc4random()
30 #define crypto_hash_sha512_BYTES 64U
32 int crypto_hash_sha512(unsigned char *, const unsigned char *,
35 #define crypto_sign_ed25519_SECRETKEYBYTES 64U
36 #define crypto_sign_ed25519_PUBLICKEYBYTES 32U
37 #define crypto_sign_ed25519_BYTES 64U
39 int crypto_sign_ed25519(unsigned char *, unsigned long long *,
40 const unsigned char *, unsigned long long, const unsigned char *);
41 int crypto_sign_ed25519_open(unsigned char *, unsigned long long *,
42 const unsigned char *, unsigned long long, const unsigned char *);
43 int crypto_sign_ed25519_keypair(unsigned char *, unsigned char *);
45 #define crypto_kem_sntrup761_PUBLICKEYBYTES 1158
46 #define crypto_kem_sntrup761_SECRETKEYBYTES 1763
47 #define crypto_kem_sntrup761_CIPHERTEXTBYTES 1039
48 #define crypto_kem_sntrup761_BYTES 32
50 int crypto_kem_sntrup761_enc(unsigned char *cstr
, unsigned char *k
,
51 const unsigned char *pk
);
52 int crypto_kem_sntrup761_dec(unsigned char *k
,
53 const unsigned char *cstr
, const unsigned char *sk
);
54 int crypto_kem_sntrup761_keypair(unsigned char *pk
, unsigned char *sk
);
56 #define crypto_kem_mlkem768_PUBLICKEYBYTES 1184
57 #define crypto_kem_mlkem768_SECRETKEYBYTES 2400
58 #define crypto_kem_mlkem768_CIPHERTEXTBYTES 1088
59 #define crypto_kem_mlkem768_BYTES 32
61 #endif /* crypto_api_h */