TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / wsutil / curve25519.h
blob1eda0200c84f5eb440d92749fdcf0597a0934cab
1 /** @file
2 * NaCl/Sodium-compatible API for Curve25519 cryptography.
4 * Copyright (c) 2018, Peter Wu <peter@lekensteyn.nl>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __CURVE25519_H__
14 #define __CURVE25519_H__
16 #include <wireshark.h>
19 * Computes Q = X25519(n, P). In other words, given the secret key n, the public
20 * key P, compute the shared secret Q. Each key is 32 bytes long.
21 * Returns 0 on success or -1 on failure.
23 WS_DLL_PUBLIC
24 int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
25 const unsigned char *p);
28 * Computes the Curve25519 32-byte public key Q from the 32-byte secret key n.
29 * Returns 0 on success or -1 on failure.
31 WS_DLL_PUBLIC
32 int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
34 #endif /* __CURVE25519_H__ */