summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh_api.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* highly polished whitespace, mostly fixing spaces-for-tab and baddjm2021-04-031-3/+3
| | | | indentation on continuation lines. Prompted by GHPR#185
* make ssh->kex->session_id a sshbuf instead of u_char*/size_t anddjm2021-01-271-5/+1
| | | | | use that instead of global variables containing copies of it. feedback/ok markus@
* remove global variable used to stash compat flags and use thedjm2021-01-271-2/+2
| | | | purpose-built ssh->compat variable instead; feedback/ok markus@
* Update/replace the experimental post-quantim hybrid key exchangedjm2020-12-291-3/+3
| | | | | | | | | | | | | | | | | | method based on Streamlined NTRU Prime (coupled with X25519). The previous sntrup4591761x25519-sha512@tinyssh.org method is replaced with sntrup761x25519-sha512@openssh.com. Per the authors, sntrup4591761 was replaced almost two years ago by sntrup761. The sntrup761 implementaion, like sntrup4591761 before it, is public domain code extracted from the SUPERCOP cryptography benchmark suite (https://bench.cr.yp.to/supercop.html). Thanks for Daniel J Bernstein for guidance on algorithm selection. Patch from Tobias Heider; feedback & ok markus@ and myself (note this both the updated method and the one that it replaced are disabled by default)
* make ssh_free(NULL) a no-opdjm2020-12-041-1/+4
|
* use the new variant log macros instead of prepending __func__ anddjm2020-10-181-10/+10
| | | | appending ssh_err(r) manually; ok markus@
* support for user-verified FIDO keysdjm2020-08-271-5/+5
| | | | | | | | | | | | | | | FIDO2 supports a notion of "user verification" where the user is required to demonstrate their identity to the token before particular operations (e.g. signing). Typically this is done by authenticating themselves using a PIN that has been set on the token. This adds support for generating and using user verified keys where the verification happens via PIN (other options might be added in the future, but none are in common use now). Practically, this adds another key generation option "verify-required" that yields a key that requires a PIN before each authentication. feedback markus@ and Pedro Martelletto; ok markus@
* free kex in ssh_packet_close; ok djm semariemarkus2020-07-011-4/+2
|
* Refactor signing - use sshkey_sign for everything, including the newdjm2019-10-311-4/+5
| | | | | | | | | | | U2F signatures. Don't use sshsk_ecdsa_sign() directly, instead make it reachable via sshkey_sign() like all other signature operations. This means that we need to add a provider argument to sshkey_sign(), so most of this change is mechanically adding that. Suggested by / ok markus@
* Plug mem leaks on error paths, based in part on github pr#120 fromdtucker2019-09-131-15/+19
| | | | David Carlier. ok djm@.
* fixes for !WITH_OPENSSL compilation; ok dtucker@djm2019-09-061-1/+8
|
* lots of things were relying on libcrypto headers to transitivelydjm2019-09-061-1/+6
| | | | | include various system headers (mostly stdlib.h); include them explicitly
* merge kexkem[cs] into kexgendjm2019-01-211-17/+17
| | | | from markus@ ok djm@
* use KEM API for vanilla ECDHdjm2019-01-211-3/+3
| | | | from markus@ ok djm@
* use KEM API for vanilla DH KEXdjm2019-01-211-11/+11
| | | | from markus@ ok djm@
* use KEM API for vanilla c25519 KEXdjm2019-01-211-3/+3
|
* Add support for a PQC KEX/KEM: sntrup4591761x25519-sha512@tinyssh.orgdjm2019-01-211-1/+3
| | | | | | | | | using the Streamlined NTRU Prime 4591^761 implementation from SUPERCOP coupled with X25519 as a stop-loss. Not enabled by default. introduce KEM API; a simplified framework for DH-ish KEX methods. from markus@ feedback & ok djm@
* remove last references to active_statedjm2019-01-191-7/+8
| | | | with & ok markus@
* move client/server SSH-* banners to buffers under ssh->kex and factordjm2018-12-271-55/+70
| | | | | | | | | | | out the banner exchange. This eliminates some common code from the client and server. Also be more strict about handling \r characters - these should only be accepted immediately before \n (pointed out by Jann Horn). Inspired by a patch from Markus Schmidt. (lots of) feedback and ok markus@
* remove compat20/compat13/compat15 variablesdjm2017-04-301-2/+1
| | | | ok markus@
* move SSH_MSG_NONE, so we don't have to include ssh1.h; ok deraadt@markus2016-05-041-3/+1
|
* add support for additional fixed DH groups fromdjm2016-05-021-1/+7
| | | | | | | | | | | draft-ietf-curdle-ssh-kex-sha2-03 diffie-hellman-group14-sha256 (2K group) diffie-hellman-group16-sha512 (4K group) diffie-hellman-group18-sha512 (8K group) based on patch from Mark D. Baushke and Darren Tucker ok markus@
* implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures (user and host auth)markus2015-12-041-8/+8
| | | | | based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt; with & ok djm@
* Revise hostkeys@openssh.com hostkey learning extension.djm2015-02-161-3/+4
| | | | | | | | | | The client will not ask the server to prove ownership of the private halves of any hitherto-unseen hostkeys it offers to the client. Allow UpdateHostKeys option to take an 'ask' argument to let the user manually review keys offered. ok markus@
* avoid more fatal/exit in the packet.c paths that ssh-keyscandjm2015-01-301-2/+3
| | | | uses; feedback and "looks good" markus@
* correctly match ECDSA subtype (== curve) for offered/recevieddjm2015-01-261-7/+9
| | | | | | | | host keys. Fixes connection-killing host key mismatches when a server offers multiple ECDSA keys with different curve type (an extremely unlikely configuration). ok markus, "looks mechanical" deraadt@
* add experimental api for packet layer; ok djm@markus2015-01-191-0/+525