Manfred Kaiser
210a983349
added option to disable trivial auth methods ( #128 )
...
* added option to disable trivial auth methods
* rename argument to match with other ssh clients
* fixed trivial auth detection for pubkeys
2021-08-19 23:37:14 +08:00
Matt Johnston
282fc81981
Get client fuzzer building and starting (fails straight away)
...
--HG--
branch : fuzz
2020-10-18 12:17:39 +08:00
Matt Johnston
d277f140ba
merge rsa-sha256
2020-05-26 00:24:02 +08:00
Vladislav Grishenko
61267f8503
CBC mode cleanup ( #95 )
...
* Fix CBC mode can't be fully disabled
* Fix CBC mode can't be the only mode
2020-05-25 23:55:13 +08:00
Vladislav Grishenko
d3d0d60076
Add Chacha20-Poly1305, AES128-GCM and AES256-GCM support ( #93 )
...
* Add Chacha20-Poly1305 authenticated encryption
* Add general AEAD approach.
* Add chacha20-poly1305@openssh.com algo using LibTomCrypt chacha and
poly1305 routines.
Chacha20-Poly1305 is generally faster than AES256 on CPU w/o dedicated
AES instructions, having the same key size.
Compiling in will add ~5,5kB to binary size on x86-64.
function old new delta
chacha_crypt - 1397 +1397
_poly1305_block - 608 +608
poly1305_done - 595 +595
dropbear_chachapoly_crypt - 457 +457
.rodata 26976 27392 +416
poly1305_process - 290 +290
poly1305_init - 221 +221
chacha_setup - 218 +218
encrypt_packet 1068 1270 +202
dropbear_chachapoly_getlength - 147 +147
decrypt_packet 756 897 +141
chacha_ivctr64 - 137 +137
read_packet 543 637 +94
dropbear_chachapoly_start - 94 +94
read_kex_algos 792 880 +88
chacha_keystream - 69 +69
dropbear_mode_chachapoly - 48 +48
sshciphers 280 320 +40
dropbear_mode_none 24 48 +24
dropbear_mode_ctr 24 48 +24
dropbear_mode_cbc 24 48 +24
dropbear_chachapoly_mac - 24 +24
dropbear_chachapoly - 24 +24
gen_new_keys 848 854 +6
------------------------------------------------------------------------------
(add/remove: 14/0 grow/shrink: 10/0 up/down: 5388/0) Total: 5388 bytes
* Add AES128-GCM and AES256-GCM authenticated encryption
* Add general AES-GCM mode.
* Add aes128-gcm@openssh.com and aes256-gcm@openssh.com algo using
LibTomCrypt gcm routines.
AES-GCM is combination of AES CTR mode and GHASH, slower than AES-CTR on
CPU w/o dedicated AES/GHASH instructions therefore disabled by default.
Compiling in will add ~6kB to binary size on x86-64.
function old new delta
gcm_process - 1060 +1060
.rodata 26976 27808 +832
gcm_gf_mult - 820 +820
gcm_add_aad - 660 +660
gcm_shift_table - 512 +512
gcm_done - 471 +471
gcm_add_iv - 384 +384
gcm_init - 347 +347
dropbear_gcm_crypt - 309 +309
encrypt_packet 1068 1270 +202
decrypt_packet 756 897 +141
gcm_reset - 118 +118
read_packet 543 637 +94
read_kex_algos 792 880 +88
sshciphers 280 360 +80
gcm_mult_h - 80 +80
dropbear_gcm_start - 62 +62
dropbear_mode_gcm - 48 +48
dropbear_mode_none 24 48 +24
dropbear_mode_ctr 24 48 +24
dropbear_mode_cbc 24 48 +24
dropbear_ghash - 24 +24
dropbear_gcm_getlength - 24 +24
gen_new_keys 848 854 +6
------------------------------------------------------------------------------
(add/remove: 14/0 grow/shrink: 10/0 up/down: 6434/0) Total: 6434 bytes
2020-05-25 23:50:25 +08:00
Matt Johnston
701d43b859
send and handle SSH_MSG_EXT_INFO only at the correct point
...
- other fixes for rsa pubkey auth
- only include ext-info handling when rsa pubkey auth is compiled
2020-05-24 14:16:58 +08:00
Matt Johnston
5acee497bf
ext-info handling for server-sig-algs
...
only client side is handled
2020-05-19 00:31:41 +08:00
Matt Johnston
972d723484
split signkey_type and signature_type for RSA sha1 vs sha256
2020-05-17 23:58:31 +08:00
Matt Johnston
7dc2f36c3e
use sigtype where appropriate
2020-04-06 23:18:26 +08:00
Matt Johnston
fa116e983b
Rename EPKA -> Plugin
2019-05-15 21:59:45 +08:00
fabriziobertocci
8c6aaf8d36
External Public-Key Authentication API ( #72 )
...
* Implemented dynamic loading of an external plug-in shared library to delegate public key authentication
* Moved conditional compilation of the plugin infrastructure into the configure.ac script to be able to add -ldl to dropbear build only when the flag is enabled
* Added tags file to the ignore list
* Updated API to have the constructor to return function pointers in the pliugin instance. Added support for passing user name to the checkpubkey function. Added options to the session returned by the plugin and have dropbear to parse and process them
* Added -rdynamic to the linker flags when EPKA is enabled
* Changed the API to pass a previously created session to the checkPubKey function (created during preauth)
* Added documentation to the API
* Added parameter addrstring to plugin creation function
* Modified the API to retrieve the auth options. Instead of having them as field of the EPKASession struct, they are stored internally (plugin-dependent) in the plugin/session and retrieved through a pointer to a function (in the session)
* Changed option string to be a simple char * instead of unsigned char *
2019-05-15 21:43:57 +08:00
François Perrad
7efe873d73
use a full prototype ( #56 )
2018-02-20 23:13:42 +08:00
Matt Johnston
802dace05e
include config.h for options.h. don't need to include options.h when
...
includes.h brings it in
2018-02-18 11:22:13 +08:00
Matt Johnston
a1aa161527
make signal flags volatile, simplify handling
2018-02-14 23:06:01 +08:00
Matt Johnston
4b021ae6f0
Remove none cipher
2018-02-09 23:40:23 +08:00
Matt Johnston
32a28d0d9c
Convert #ifdef to #if, other build changes
2016-05-04 15:33:40 +02:00
Francois Perrad
3e20c442de
fix empty C prototypes
2016-03-16 22:41:20 +08:00
Matt Johnston
79b43270a7
A few minor style fixes
2015-12-15 22:09:55 +08:00
Konstantin Tokarev
960364d953
Client: kill proxy command when exiting application.
2015-12-03 16:22:29 +03:00
Mike Frysinger
5f97d0fbbc
fix build when ENABLE_CLI_INTERACT_AUTH is disabled
...
The session.h defines clientsession.cipher_none_after_auth only when
ENABLE_CLI_INTERACT_AUTH is defined, but cli-session.c will always
try to set that member. export cipher_none_after_auth all the time.
2015-10-21 22:39:31 +08:00
Matt Johnston
ce59260ee9
Fix problem where auth timeout wasn't checked when waiting for ident
2015-08-03 21:59:40 +08:00
Gaël PORTAY
947d2697cf
Turn sshsession's remoteident attribute into char *
2015-05-05 20:39:14 +02:00
Gaël PORTAY
7928d83b02
Turn cleantext()'s dirtytext argument into char *
2015-05-05 20:39:13 +02:00
Matt Johnston
275611fbaa
Make main socket nonblocking. Limit writequeue size.
2015-03-20 23:36:42 +08:00
Matt Johnston
f782cf375a
Fix pubkey auth after change to reuse ses.readbuf as ses.payload
...
(4d7b4c5526c5)
--HG--
branch : nocircbuffer
2015-03-01 23:02:06 +08:00
Matt Johnston
579463933b
A bit of a bodge to avoid memcpy if zlib is disabled
...
--HG--
branch : nocircbuffer
2015-03-01 00:57:21 +08:00
Matt Johnston
31e379c300
merge from default
...
--HG--
branch : fastopen
2015-02-28 09:06:40 +08:00
Matt Johnston
1809f741cb
Add more ATTRIB_NORETURN annotations, from Thorsten Horstmann
2015-02-24 22:36:20 +08:00
Thorsten Horstmann
fdb7ffa864
DROPBEAR_ prefix for include guards to avoid collisions
2015-02-24 20:43:01 +08:00
Matt Johnston
364a53577e
Move generic network routines to netio.c
...
--HG--
branch : fastopen
2015-02-20 23:16:38 +08:00
Matt Johnston
76a3eb393c
In theory TFO should work. Needs platform cleanup and testing
...
--HG--
branch : fastopen
2015-02-19 00:32:00 +08:00
Matt Johnston
755c1458f0
async connections working
...
--HG--
branch : fastopen
2015-02-18 22:46:15 +08:00
Matt Johnston
8795d733ec
work in progress for async connect
...
--HG--
branch : fastopen
2015-02-18 00:05:27 +08:00
Matt Johnston
6d2d3669f3
Make keepalive handling more robust, this should now match what OpenSSH does
2014-08-19 23:08:56 +08:00
Matt Johnston
10eb218fb0
Don't send SSH_MSG_UNIMPLEMENTED for keepalive responses
2014-08-13 21:48:47 +08:00
Matt Johnston
0e7409c7ff
Make sure the check_close() handler runs when a server child process exits
2014-07-28 23:23:49 +08:00
Matt Johnston
da57dd13c5
Set tcp priority as follows:
...
if (connecting || ptys || x11) tos = LOWDELAY;
else if (tcp_forwards) tos = 0;
else tos = BULK;
TCP forwards could be either lowdelay or bulk, hence the default priority.
2014-07-16 22:53:32 +08:00
Matt Johnston
f1826ea389
Fix auth timeout regression
2014-07-09 22:02:22 +08:00
Matt Johnston
c884e5000e
Make -K keepalive behave like OpenSSH's ServerAliveInterval
2014-07-09 00:15:20 +08:00
Matt Johnston
e767bbb41f
Add new monotonic_now() wrapper so that timeouts are unaffected by
...
system clock changes
2014-03-13 23:50:09 +08:00
Matt Johnston
55a0c5068f
requirenext doesn't need two values
2014-01-23 22:25:52 +08:00
Matt Johnston
61cecbb337
DROPBEAR_CLI_AUTH_IMMEDIATE fixed, now enabled by default
2014-01-17 21:39:27 +08:00
Matt Johnston
de1deaf0bd
use oldstyle comments
2013-11-14 22:03:30 +08:00
Matt Johnston
0162c116da
curve25519
...
--HG--
branch : ecc
2013-11-08 23:11:43 +08:00
Matt Johnston
04518e9e80
merge in HEAD
...
--HG--
branch : ecc
2013-05-21 12:09:35 +08:00
Matt Johnston
ef151888fb
requirenext fixup for firstkexfollows
2013-04-14 23:16:16 +08:00
Matt Johnston
c6bdc810ab
ecc kind of works, needs fixing/testing
...
--HG--
branch : ecc
2013-04-07 01:36:42 +08:00
Matt Johnston
7f42096d0f
Take transmit and receive keys into use separately
2013-04-04 00:18:50 +08:00
Matt Johnston
1a16da38d5
merge kexguess branch
2013-04-03 00:49:24 +08:00
Matt Johnston
78fbed8c3e
Don't usually need to recalculate dh_e for the repeated kexdh_init packet
...
--HG--
branch : kexguess
2013-04-03 00:32:55 +08:00