aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/curve25519.h
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06Do not require using wsgcrypt.hJoão Valverde1-2/+1
The reason to use wsgcrypt.h was to wrap it around DIAG_OFF() macros and that should no longer be necessary.
2022-04-20libgcrypt: Require version 1.8.0John Thacker1-4/+0
Libgcrypt 1.8.x is required for a large amount of decryption support and is the current LTS version of libgcrypt. The 1.6 and 1.7 series have been end-of-life since 2017-06-30 and 2019-06-30, respectively. The Linux distributions that have versions of libgcrypt before 1.8.0 are nearing or at end of support (RHEL7, SLES 12, Debian stretch, Ubuntu 16.04LTS) and can be supported by the Wireshark 3.6 LTS release series. Remove an enormous amount of ifdefs based on libgcrypt versions 1.6.0, 1.7.0, and 1.8.0. There will be a second pass for the commons defines HAVE_LIBGCRYPT_AEAD, HAVE_LIBGCRYPT_CHACHA20, and HAVE_LIBGCRYPT_CHACHA20_POLY1305, which are now always defined. The ISAKMP dissector has some comments noting that some workarounds were used for libgcrypt 1.6 that aren't needed with 1.7; perhaps that could be updated now.
2021-11-29Add files with WS_DLL_PUBLIC to DoxygenMoshe Kaplan1-1/+1
Add @file markers for most files that contain functions exported with WS_DLL_PUBLIC so that Doxygen will generate documentation for them.
2019-06-30wsutil: fix build failure of Debian packages on Ubuntu 16.04Peter Wu1-6/+4
The libwsutil symbols file contains two public symbols which depend on Libgcrypt 1.7.0. As the version included with Ubuntu 16.04 is too old, building a Debian package fails due to missing two curve25519 symbols. Add stub implementations as workaround. Change-Id: Ie39e784e9e631750b5269d038772496565b2dce8 Reviewed-on: https://code.wireshark.org/review/33780 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-08wsutil: Add Curve25519 ECDH (X25519) using GcryptPeter Wu1-0/+41
The WireGuard dissector will need X25519 to enable decryption, add a Gcrypt implementation that implements the NaCl/Sodium interface. While inspired by the MPI example in t-cv25519.c, note subtle but important correctness/interoperability fixes: add a check for infinity (gcry_mpi_ec_get_affine) and handle short values from gcry_mpi_print. The last issue is ugly, perhaps the high level API (gcry_pk_decrypt) should be used instead (which < 2% slower than this MPI implementation). (Both issues were found through fuzzing.) As for alternative options, Sodium is superior but would be a new dependency. For some older performance and usability notes (comparing crypto_scalarmult_curve25519_base (note "_base") against others), see https://lists.gnupg.org/pipermail/gcrypt-devel/2018-July/004532.html Performance comparison on Ubuntu 18.04 (i7-3770) between Sodium 1.0.16 against Gcrypt 1.8.3 and Gcrypt 86e5e06a (git master, future 1.9.x) by computing 65536 times X25519(1, 8) via crypto_scalarmult_curve25519: Sodium (sandy2x): 1.4x faster than ref10 Sodium (ref10): 1 (baseline) Gcrypt (git): 5x slower than ref10, 7x slower than sandy2x Gcrypt (1.8.3): 17x ref10, 24x sandy2x (took 65 seconds) Change-Id: Ia54e73cc3cc469a6697554729aff4edd19f55630 Ping-Bug: 15011 Reviewed-on: https://code.wireshark.org/review/28987 Reviewed-by: Anders Broman <a.broman58@gmail.com>