Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
curve25519.h
Go to the documentation of this file.
1
13#ifndef __CURVE25519_H__
14#define __CURVE25519_H__
15
16#include <wireshark.h>
17
18/*
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.
22 */
23WS_DLL_PUBLIC
24int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
25 const unsigned char *p);
26
27/*
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.
30 */
31WS_DLL_PUBLIC
32int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
33
34#endif /* __CURVE25519_H__ */