1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
binary1248 4858467199 wincng: fix DH_GEX_MAXGROUP set higher than supported
In 1c3a03ebc3 #493,
`LIBSSH2_DH_GEX_MAXGROUP` was introduced to specify
crypto-backend-specific modulus sizes. Unfortunately, the max size for
the wincng DH modulus was defined to 8192, probably because this is the
value most other backends support.

According to Microsoft documentation [1], `BCryptGenerateKeyPair`
currently only supports up to 4096-bit keys when the selected algorithm
is `BCRYPT_DH_ALGORITHM`. Requesting larger keys when calling
`BCryptGenerateKeyPair` in `_libssh2_dh_key_pair` always results in
`STATUS_INVALID_PARAMETER` being returned and ultimately key exchange
failing.

When attempting to connect to any server that offers 8192 bit DH, this
causes key exchange to always fail when using the wincng backend.
Reducing `LIBSSH2_DH_GEX_MAXGROUP` to 4096 fixes the issue.

[1] https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgeneratekeypair

Closes #1372
2024-04-29 17:07:31 +02:00
2024-04-14 01:52:11 +00:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2024-04-26 22:58:55 +02:00
2023-10-03 13:46:22 +00:00
2019-08-02 16:38:08 -07:00
2023-12-17 15:15:34 +00:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-08-18 11:20:58 +00:00
2011-04-04 13:31:33 +02:00
2023-08-18 11:20:58 +00:00
2023-08-18 11:20:58 +00:00
2024-04-14 03:26:48 +00:00

libssh2 - SSH2 library

libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license.

Web site

Mailing list

BSD Licensed

Web site source code

Installation instructions:

Description
libssh2 - это библиотека, реализующая протокол SSH2, доступная по пересмотренной лицензии BSD
Readme 18 MiB
Languages
C 84.8%
M4 3.6%
CMake 3.5%
Shell 2.6%
Perl 1.9%
Other 3.3%