STrRedWolf wrote on 2022-06-03, 01:08:A bit of an update. I was able to procure a Netgear FA411 and get it running, so I can Telnet with mTCP. […]
Show full quote
A bit of an update. I was able to procure a Netgear FA411 and get it running, so I can Telnet with mTCP.
I did see a SSH2DOS program and source code, which was classified as abandoned. I've pulled it up into Github in line to switch it over to mTCP and plug in another cypher to get it working on modern SSH daemons.
And one other thing. I found some old hardware that may be useful, a few Compact Flash cards.
- Socket LP-E "Low Power Ethernet" adapter (with dongle!)
- Belkin Bluetooth PDA Adapter
- AmbiCom WL54-CF Wifi-G adapter
- SparkLan WCFM-100 Wifi-G adapter
Since these ran off the Zaurus which ran Linux, I should have the source code to see about writing packet drivers and control programs with. Guess I better set up an Open Watcom compiler...
STrRedWolf,
Since performance will be crucial for your SSH implementation on systems with slow 8086/186/286 CPUs, here's something you can try to speed things up:
I've come across a very nice, extremely simple implementation of the XOR shift register (Xoshiro) type of random number generators that produces random numbers "nearly as good" as CPU intensive LCG (Linear Congruential type) RNGs.
I've been writing an unbiased path tracer (a sort of GI ray tracer) in MS-DOS during the last few weeks for an upcoming video on my 200LX YouTube channel,
and since path tracing requires lots of random numbers (just like SSL encryption does in your SSH2DOS) and requires an RNG with good periodicity and high quality "randomness",
I initially used an LCG similar to linuxs' rand48() with good, but slow results, as there's more than a dozen multiplications and additions per number in the function.
After switching from the LCG to this XOR shift register RNG I've got nearly identical quality random numbers with a high periodicity and no observable patterns (int32_t only though, but that's enough as my renderer uses single precision floats throughout),
but my engine speed increased from 49 minutes to 31 minutes per frame! 😀, with identical quality results. I'm using the Borland C++ 3.2 IDE and compiler/linker for MS-DOS.
For security reasons you might want to leave the current RNG in there, and maybe add a command line option to use the RNG you already use, or, this one, so users on slow systems like PC/XTs get a nice speed boost...
It's really simple too, only 3 bit shifts and 3 XORs on an unsigned 32bit integer, here's the function:
// Fast Xor Shift 32bit precision RNG
static uint32_t _fXorState = 2171454626; // RANDOM SEED & STATE
inline uint32_t fXOrShift32(void)
{
fXorState ^= fXorState << 13;
fXorState ^= fXorState >> 17;
fXorState ^= fXorState << 5;
return fXorState;
}
The 80186 CPU (HP 200LX) does bit shifts 3x to 4x faster than a 8086/8088, as does the 80286,
so it's even better on those platforms...
Cheers,
Radiance