1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
Files
libssh2/src/Makefile.inc
Michael Buckley 492bc543bb Implement chacha20-poly1305@openssh.com
Probably the biggest and potentially most controversial change we have
to upstream.

Because earlier versions of OpenSSL implemented the algorithm before
standardization, using an older version of OpenSSL can cause problems
connecting to OpenSSH servers. Because of this, we use the public domain
reference implementation instead of the crypto backends, just like
OpenSSH does.

We've been holding this one for a few years. We were about to upstream
it around the same time as aes128gcm landed upstream, and the two
changes were completely incompatible. Honestly, it took me weeks to
reconcile these two implementations, and it could be much better.

Our original implementation changed every crypt method to decrypt the
entire message at once. the AESGCM implementation instead went with this
firstlast design, where a firstlast paramater indicates whether this is
the first or last call to the crypt method for each message. That added
a lot of bookkeeping overhead, and wasn't compatible with the chacha
public domain implementation.

As far as I could tell, OpenSSH uses the technique of decrypting the
entire message in one go, and doesn't have anything like firstlast.
However, I could not get out aes128gcm implementation to work that way,
nor could I get the chacha implementation to work with firstlast, so I
split it down the middle and let each implementation work differently.
It's kind of a mess, and probably should be cleaned up, but I don't have
the time to spend on it anymore, and it's probably better to have
everything upstream.

Fixes #584
Closes #1426
2024-08-06 10:56:23 +02:00

63 lines
1.5 KiB
Makefile

# Copyright (C) The libssh2 project and its contributors.
# SPDX-License-Identifier: BSD-3-Clause
CSOURCES = \
agent.c \
bcrypt_pbkdf.c \
channel.c \
comp.c \
chacha.c \
cipher-chachapoly.c \
crypt.c \
crypto.c \
global.c \
hostkey.c \
keepalive.c \
kex.c \
knownhost.c \
mac.c \
misc.c \
packet.c \
pem.c \
poly1305.c \
publickey.c \
scp.c \
session.c \
sftp.c \
transport.c \
userauth.c \
userauth_kbd_packet.c \
version.c
HHEADERS = \
chacha.h \
channel.h \
cipher-chachapoly.h \
comp.h \
crypto.h \
crypto_config.h \
libgcrypt.h \
libssh2_priv.h \
libssh2_setup.h \
mac.h \
mbedtls.h \
misc.h \
openssl.h \
os400qc3.h \
packet.h \
poly1305.h \
session.h \
sftp.h \
transport.h \
userauth.h \
userauth_kbd_packet.h \
wincng.h
EXTRA_DIST = \
agent_win.c \
blowfish.c \
libgcrypt.c \
mbedtls.c \
openssl.c \
os400qc3.c \
wincng.c