1*2d2e44b7Snaddy /* $OpenBSD: crypto_api.h,v 1.2 2018/01/16 21:42:40 naddy Exp $ */ 2f3180929Sderaadt 3f3180929Sderaadt /* 4f3180929Sderaadt * Assembled from generated headers and source files by Markus Friedl. 5f3180929Sderaadt * Placed in the public domain. 6f3180929Sderaadt */ 7f3180929Sderaadt 8f3180929Sderaadt #ifndef crypto_api_h 9f3180929Sderaadt #define crypto_api_h 10f3180929Sderaadt 11f3180929Sderaadt #include <stdint.h> 12f3180929Sderaadt #include <stdlib.h> 13f3180929Sderaadt 14f3180929Sderaadt typedef int32_t crypto_int32; 15f3180929Sderaadt typedef uint32_t crypto_uint32; 16f3180929Sderaadt 17f3180929Sderaadt #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) 18f3180929Sderaadt 19f3180929Sderaadt int crypto_hashblocks_sha512(unsigned char *, const unsigned char *, 20f3180929Sderaadt unsigned long long); 21f3180929Sderaadt 22f3180929Sderaadt #define crypto_hash_sha512_BYTES 64U 23f3180929Sderaadt 24f3180929Sderaadt int crypto_hash_sha512(unsigned char *, const unsigned char *, 25f3180929Sderaadt unsigned long long); 26f3180929Sderaadt 27f3180929Sderaadt int crypto_verify_32(const unsigned char *, const unsigned char *); 28f3180929Sderaadt 29f3180929Sderaadt #define crypto_sign_ed25519_SECRETKEYBYTES 64U 30f3180929Sderaadt #define crypto_sign_ed25519_PUBLICKEYBYTES 32U 31f3180929Sderaadt #define crypto_sign_ed25519_BYTES 64U 32f3180929Sderaadt 33f3180929Sderaadt int crypto_sign_ed25519(unsigned char *, unsigned long long *, 34f3180929Sderaadt const unsigned char *, unsigned long long, const unsigned char *); 35f3180929Sderaadt int crypto_sign_ed25519_open(unsigned char *, unsigned long long *, 36f3180929Sderaadt const unsigned char *, unsigned long long, const unsigned char *); 37f3180929Sderaadt int crypto_sign_ed25519_keypair(unsigned char *, unsigned char *); 38f3180929Sderaadt 39f3180929Sderaadt #endif /* crypto_api_h */ 40