Commit Graph

45 Commits

Author SHA1 Message Date
Russ Magee 492c7290b0 Much improved tunnel state management: server-side mostly working, client-side re-Accept() -> svr re-Dial() still required 2018-11-01 22:14:44 -07:00
Russ Magee a425afe9b6 Tunnels working again to basic level w/o re-connect or re-dial 2018-11-01 18:52:01 -07:00
Russ Magee 081d88b9ad tunnel setup stubs moved into Conn Read()/Write() handling 2018-10-31 20:11:00 -07:00
Russ Magee 8ee0aea0b4 (non-working) begin of total tunnel redesign 2018-10-31 09:15:28 -07:00
Russ Magee fcbdb77c79 Cleaned up error handling in hkexnet.Conn.Read() a bit 2018-10-30 21:07:42 -07:00
Russ Magee e75ed159f6 two-way tunnel traffic working. Hangup/re-dial on server side needs work 2018-10-28 21:46:29 -07:00
Russ Magee 632f24354b Tunnel rough work-in-progress; data sent (wrong length) and CSOTunClose handling needs work, but it's a start... 2018-10-28 19:17:47 -07:00
Russ Magee 1e6da733a2 Work on setup for tunnels
Signed-off-by: Russ Magee <rmagee@gmail.com>
2018-10-27 01:51:40 -07:00
Russ Magee 48b0c41f62 Prototyped TunEndpoint struct, data flow commentary 2018-10-26 20:31:57 -07:00
Russ Magee 2f83d488d6 Pushed logging into sub-package to preserve windows client build
Signed-off-by: Russ Magee <rmagee@gmail.com>
2018-10-26 16:05:01 -07:00
Russ Magee 871f1e0dfa Moved CSE (extended err types) back up out of UNIX shell status space 2018-10-25 22:49:08 -07:00
Russ Magee 752dbf6080 logging now uses syslog 2018-10-25 22:14:18 -07:00
Russ Magee 4cb535fcc9 Added support for cryptMTv1
Signed-off-by: Russ Magee <rmagee@gmail.com>
2018-10-24 00:16:34 -07:00
Russ Magee 3991fc5065 Added keymat expansion for smallest KEX modes
Signed-off-by: Russ Magee <rmagee@gmail.com>
2018-10-19 13:51:57 -07:00
Russ Magee 798661a0cf kex-spurious-failures branch:
-Modified KyberDialSetup()/KyberAcceptSetup() to use []byte for reading/writing
ciphertext to avoid errors caused by leading zero bytes (big.Int can't explicitly
represent these)

-TODO: Consider the same for HerraduraKEx HKexDialSetup()/HKexAcceptSetup()
2018-10-18 20:44:23 -07:00
Russ Magee a060ae39b1 HMAC portion made into symbolic const 2018-10-14 00:20:30 -07:00
Russ Magee 5d9a110d57 Added more (explicit) sizes for all KEX algs 2018-10-12 16:16:49 -07:00
Russ Magee 231ede1734 KYBER768 KEM works. :O 2018-10-10 21:12:38 -07:00
Russ Magee 4c286ae6c1 Set up to handle Kyber768 KEM 2018-10-08 21:31:11 -07:00
Russ Magee 103070d00a Made padding size random [max/2, max); use of improved goutmp host lookup 2018-10-02 21:23:45 -07:00
Russ Magee 1485e8392e Removed moving avg chaff in favour of random-padding 2018-10-01 20:35:50 -07:00
Russ Magee 06ee94da03 Added HMAC_SHA512 2018-09-30 00:19:25 -07:00
Russ Magee cd9f7914e0 Dial() and Accept() again conform to net.Dial(), net.Accept() return signature 2018-09-29 12:15:53 -07:00
Russ Magee e57d97d3e6 Changed many funcs to take *hkexnet.Conn to allow tracking of packets sent, total bytes sent and experimental moving avg chaff 2018-09-26 22:57:36 -07:00
Russ Magee b810fa7f4a tightened up some const types 2018-09-17 23:07:04 -07:00
Russ Magee 8b0b833d6e Split hkexsh and hkexnet consts into separate files 2018-09-17 17:27:13 -07:00
Russ Magee 19697d5164 Remote exit status now reflected in client->server copies 2018-09-16 17:14:50 -07:00
Russ Magee 140523dabb -Refactored HerraduraKEx negotiation into subroutine (anticipation of future multi-KEx support) 2018-09-11 00:04:38 -07:00
Russ Magee bee0bececf -Bumped version to 0.2pre to reflect protocol break w/0.1pre
-Added design principle note (no downgrade attack-enabling protocol features)
2018-09-10 20:28:41 -07:00
Russ Magee dcb42d43f1 -BREAKING CHANGE: pre-KEx byte sent for KEx alg (default and only for now: KEX_HERRADURA) 2018-09-10 20:22:09 -07:00
Russ Magee b33e9de139 -Moved taunting of failed logins to client-side
-Added byte auth pass/fail stage prior to shell/copy session start
2018-09-06 16:23:57 -07:00
Russ Magee 9ff35a69fe -Converted exit status to uint32 (0-255: UNIX exit codes), above for OOB (out-of-band) status
-Failed auth for shell logins now returns extended code CSEBadAuth to client
2018-09-06 13:50:56 -07:00
Russ Magee db1b494d00 Fixed shell (interative & non-) exit status after cp status fixes 2018-09-06 00:16:44 -07:00
Russ Magee a6979298fd Steps toward getting remote cp(tar) status back to client 2018-09-05 21:58:55 -07:00
Russ Magee 963d1c8eb2 Some comment/dead test code cleanup 2018-09-05 20:36:32 -07:00
Russ Magee b419b2e002 File copy remote close signal to ensure completed tar pipe data 2018-09-04 22:24:16 -07:00
Russ Magee 0586f306c0 Removed debug time.Sleep 2018-09-02 21:50:25 -07:00
Russ Magee 7295492aa3 hkexcp: fixed copy chunked payload logic (now 2*32-1 MAX_PAYLOAD_LEN w/chunking) 2018-09-02 19:58:13 -07:00
Russ Magee 52ea229118 Fixed errors in copy scatter/gather logic. Added block-chunking to hc.Write() to allow
writes of larger data blocks
TODO: copies of files > hc.Read() block size fails w/incomplete tarfile (last partial block
likely incorrectly written or client exits before data is flushed?)
2018-09-01 10:20:33 -07:00
Russ Magee 5859131678 Continuing groundwork for cp mode - refactor main client code into shell/copy subroutines; -r option 2018-08-06 22:29:51 -07:00
Russ Magee 04e8b94b5d More misc. fixes to connection handling w/chaff e=0/1 client-side, both interactive and oneshot cmd (-x) 2018-08-06 00:06:09 -07:00
Russ Magee 00e03c1d54 Misc. fixes to end-of-session conn handling. Outstanding bug w/client chaff enabled & truncated client data 2018-08-05 21:43:21 -07:00
Russ Magee 5ae6c8075b Grouped types 2018-07-19 22:39:06 -07:00
Russ Magee 9edcc5110c Fixed syntax errors from re-org 2018-07-04 22:06:07 -07:00
Russ Magee bd261a32e9 reorg to separate core KEx and net layer from app 2018-07-04 21:21:23 -07:00