[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 00/20] Add chacha20-poly1305 support


Add chacha20-poly1305 support.

This is a rebase of https://git.libssh.org/users/aris/libssh.git/log/?h=chacha20
done by fidencio.

Some additional fixes are included, to make the tests pass, to compile under
Windows/Visual Studio and to make chacha20 be part of the default methods.

Alberto Aguirre (7):
  cmake: Avoid replicating torture_pki_ed25519 target
  packet_crypt: Avoid setting keys every time
  torture_packet: Use explicit_bzero
  torture_packet: Set encryption/decryption keys
  kex: Add chacha20 to default methods
  chacha: Use standard types
  chacha: Use #pragma pack

Aris Adamantiadis (11):
  cmake: add WITH_PACKET_DEBUG option
  packet: add more debugging
  buffer: ssh_buffer_allocate function
  ChaCha and Poly1305 implementations from OpenSSH
  cmake: detect "bounded" compiler attribute
  chacha: packet encryption
  chacha: packet decryption
  libgcrypt: make it compatible with chacha20
  tests: test for chacha20-poly1305@xxxxxxxxxxx
  tests: packet encryption unit testing
  tests: send more packets of various sizes

Jon Simons (2):
  pkd: add passes for chacha20-poly1305@xxxxxxxxxxx cipher
  pkd: move chacha20-poly1305@xxxxxxxxxxx tests to OPENSSHONLY section

 ConfigureChecks.cmake             |  10 ++
 DefineOptions.cmake               |   1 +
 config.h.cmake                    |   8 ++
 include/libssh/buffer.h           |   1 +
 include/libssh/chacha.h           |  44 ++++++++
 include/libssh/crypto.h           |  10 ++
 include/libssh/libcrypto.h        |   1 +
 include/libssh/libgcrypt.h        |   1 +
 include/libssh/packet.h           |   5 +-
 include/libssh/poly1305.h         |  23 ++++
 include/libssh/wrapper.h          |   3 +-
 src/CMakeLists.txt                |   3 +
 src/buffer.c                      |  31 ++++++
 src/chachapoly.c                  | 160 ++++++++++++++++++++++++++++
 src/dh.c                          |   4 +
 src/external/chacha.c             | 216 ++++++++++++++++++++++++++++++++++++++
 src/external/poly1305.c           | 157 +++++++++++++++++++++++++++
 src/kex.c                         |  10 +-
 src/libcrypto.c                   |  12 ++-
 src/libgcrypt.c                   |  15 +++
 src/packet.c                      | 143 +++++++++++++------------
 src/packet_crypt.c                | 128 +++++++++++++---------
 src/wrapper.c                     |  78 ++++++++++----
 tests/client/torture_algorithms.c |  21 +++-
 tests/pkd/pkd_hello.c             |  10 +-
 tests/unittests/CMakeLists.txt    |   1 +
 tests/unittests/torture_packet.c  | 205 ++++++++++++++++++++++++++++++++++++
 27 files changed, 1151 insertions(+), 150 deletions(-)
 create mode 100644 include/libssh/chacha.h
 create mode 100644 include/libssh/poly1305.h
 create mode 100644 src/chachapoly.c
 create mode 100644 src/external/chacha.c
 create mode 100644 src/external/poly1305.c
 create mode 100644 tests/unittests/torture_packet.c

-- 
2.14.1


Follow-Ups:
[PATCH 01/20] cmake: add WITH_PACKET_DEBUG optionAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 02/20] packet: add more debuggingAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 03/20] buffer: ssh_buffer_allocate functionAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 05/20] cmake: detect "bounded" compiler attributeAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 04/20] ChaCha and Poly1305 implementations from OpenSSHAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 06/20] chacha: packet encryptionAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 08/20] libgcrypt: make it compatible with chacha20Alberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 07/20] chacha: packet decryptionAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 09/20] tests: test for chacha20-poly1305@xxxxxxxxxxxAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 11/20] tests: send more packets of various sizesAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 10/20] tests: packet encryption unit testingAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 12/20] pkd: add passes for chacha20-poly1305@xxxxxxxxxxx cipherAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 13/20] pkd: move chacha20-poly1305@xxxxxxxxxxx tests to OPENSSHONLY sectionAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 14/20] cmake: Avoid replicating torture_pki_ed25519 targetAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 15/20] packet_crypt: Avoid setting keys every timeAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 16/20] torture_packet: Use explicit_bzeroAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 17/20] torture_packet: Set encryption/decryption keysAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 18/20] kex: Add chacha20 to default methodsAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 20/20] chacha: Use #pragma packAlberto Aguirre <albaguirre@xxxxxxxxx>
[PATCH 19/20] chacha: Use standard typesAlberto Aguirre <albaguirre@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org