5 ms·
>input latency feels high because redrawing the screen is slow (along with all the encryption, which is also slow) Is modern encryption a challenge to those ol
by tambourine_man 5y ago
>input latency feels high because redrawing the screen is slow (along with all the encryption, which is also slow)
Is modern encryption a challenge to those old machines? Is it because of specialized encryption hardware or sheer brute force?
Or is it just this implementation that's slow?
I used telnet back in the 68k days.
- Gibbon1 5y ago> Is modern encryption a challenge to those old machines? I've used modern encryption/mac routines on small embedded micro's and they seem reasonably efficient. Couple of operations per byte. They have to be fast because they are used for decrypting stuff like streaming video. I think an exception is password hashing algorithms which are slow by design. That said some of the older algorithms are really inefficient. Hundreds of ops per byte.
- techrat 5y ago> Is modern encryption a challenge to those old machines? Ooooooh yeah. It's got some serious overhead on single core systems several-hundred-megahertz systems without the instructions that are used to accelerate encryption these days. AES is what modern CPUs use to help with that. It wasn't until Power7+ before encryption was accelerated on that class of CPUs. The latest Mac to use Power CPUs was discontinued 6 years before that.
- blibble 5y agonot sure that's right... for interactive use, compared to rendering to the display and pushing the packet out the crypto overhead is going to be minuscule
- retrac 5y agoOnce you have authenticated each other and agree to a nice symmetric cipher and exchange the keys for that, yes. Bytes, even kilobytes per second. But note the "once you have authenticated". Public key crypto is brutal number crunching and takes minutes to hours on systems of the 80s, and some noticeable seconds even in the late 90s. I think that's why something like RSA-4096 was not just universally adopted 30 years ago. It was too expensive to compute for casual use.
- blibble 5y agoeven the crappiest laptop CPU can do 10000 x 4096-bit RSA signature verifications per second my 2014 laptop (on battery, no hardware acceleration): sign verify sign/s verify/s rsa 4096 bits 0.006200s 0.000096s 161.3 10468.9 (not to mention everyone's using ec these days, which is quite a bit faster)
- setpatchaddress 5y agoThe 68k Macs are < 60MHz and the early PowerPCs were not a lot faster. Your 2014 laptop will run circles around them doing just about anything.
- tubularalloy 5y agoIt just occurred to me while reading this comment that people born after Intel CPUs mostly leveled out perfwise are probably peers now. That realization came hard, it came fast, and I wasn’t ready to live with that knowledge by a long shot. It was a long, long road to your 2014 laptop, friend. There was a time when division was a luxury, and desperate folk offered their firstborn for forbidden tricks to compute inverse square root. Elliptic curve, you say? You mean floating point math? Whoo-ee!
- deleted 5y ago[deleted]
- fzzzy 5y agoCmon now, intel chips didn't level off till around 2010.
- techrat 5y agoPower7+ came out in 2012 which was the first gen of Power CPUs to include AES acceleration. [1] The most powerful Power Macs with non Intel CPUs were discontinued in 2006. (G5, released 2003.) [2] Your laptop from 2014 was already running at LEAST a 64bit CPU and likely has AES instructions as they were introduced in 2010 [3] So even if your laptop from 2014 onward didn't include AES instructions like some Intel Atom/Celeron/Pentium models... (Acer C720P Chromebook, for example came out in 2014 and has a Intel Celeron 2955U [4] and [5]) It was still an architecture that is/was ELEVEN YEARS NEWER. A Celeron 2955U is roughly equivalent in performance to a Core 2 Duo E4700 or an AMD Athlon 64 x2 5200+ ... which is still quite ahead of a PowerMac G5. [6] and [7] TLDR: Time marches on and along with cpu improvements come instructions and other benefits not immediately visible to the end user. Try using your old 2003-era system to generate keys again and tell us how fun it is. Bonus if you try it on a Pre-2000 era Performa Mac as a user typically had with SystemOS 7, 8 and 9. Those ran at 16 to 66mhz. [8] For reference, SystemOS 7 came out in 1991. [9] OS8 came out in 1997. [10] And OS9 came out in 1999. [11] The CPUs inside the Performa Macs running System 7, OS8 and OS9, at best, can be compared to the 486s on the Intel side. Not even Pentium level. This places the architecture at LEAST a dozen architecture generations behind what you're generating keys on. This means if the CPUs we're looking at here were aged up, your laptop is starting first or second grade while the actual CPUs of the time are now finishing their masters' degrees with a kid or two on the way. Rather than naively using your extremely modern in comparison 'crappy laptop' cpu as a reference point, perhaps you should use something more typical from the time these OSes were considered relevant. TLDR to the TLDR: Get off my lawn. [1] https://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_sm/5/897/ENUS9117-_h05/index.html&lang=en&request_locale=en https://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common... [2] https://en.wikipedia.org/wiki/Power_Mac_G5 https://en.wikipedia.org/wiki/Power_Mac_G5 [3] https://software.intel.com/content/www/us/en/develop/articles/intel-advanced-encryption-standard-instructions-aes-ni.html https://software.intel.com/content/www/us/en/develop/article... [4] https://www.amazon.com/Acer-C720P-2666-Chromebook-11-6-Inch-Touchscreen/dp/B00GSEOV7U https://www.amazon.com/Acer-C720P-2666-Chromebook-11-6-Inch-... [5] https://ark.intel.com/content/www/us/en/ark/products/75608/intel-celeron-processor-2955u-2m-cache-1-40-ghz.html https://ark.intel.com/content/www/us/en/ark/products/75608/i... [6] https://www.cpubenchmark.net/compare/Intel-Celeron-2955U-vs-Intel-Core2-Duo-E4700-vs-AMD-Athlon-64-X2-Dual-Core-5200+-vs-Intel-Celeron-G3930/2073vs938vs84vs2957 https://www.cpubenchmark.net/compare/Intel-Celeron-2955U-vs-... [7] https://www.phoronix.com/scan.php?page=news_item&px=PowerMac-Intel-KBL https://www.phoronix.com/scan.php?page=news_item&px=PowerMac... [8] https://en.wikipedia.org/wiki/Macintosh_Performa https://en.wikipedia.org/wiki/Macintosh_Performa [9] https://en.wikipedia.org/wiki/System_7 https://en.wikipedia.org/wiki/System_7 [10] https://en.wikipedia.org/wiki/Mac_OS_8 https://en.wikipedia.org/wiki/Mac_OS_8 [11] https://en.wikipedia.org/wiki/Mac_OS_9 https://en.wikipedia.org/wiki/Mac_OS_9
- Lammy 5y agoThere was MacSSH, supporting SSH2 and up to MAC-SHA1/AES-256, but it required System 7.5 and 32MB rather than this project's System 7.1/2MB: https://web.archive.org/web/20071016100910/http://pros.orange.fr/chombier/MacSSH/SSH_info.html https://web.archive.org/web/20071016100910/http://pros.orang...
- fzzzy 5y agoCool, thanks!
- johnklos 5y agoFor reference, using modern ssh to connect to a 15 MHz m68030 Mac LC II with 16 bit memory bus takes literally just under ten minutes (NetBSD 9 to NetBSD 9). An LC III+ with 33 MHz, 32 bit bus m68030 takes a little over 3 minutes.
- anthk 5y agoI've seen an xterm displaying sixels (mikutter) under nbsd for m68k, it was so slow that it looked an sstv render from the ISS.
- phendrenad2 5y agoWhy is redrawing the screen slow? Old Macs had pretty good DMA for 2D sprites IIRC. As for encryption, can you use a preshared key instead of public key?
- cy384 5y agomore specifically, I should say that re-rendering everything is kinda slow, the DrawText function which, uh, draws text, seems very heavy blitting from a buffer onto the screen is, indeed, pretty fast, I've been experimenting with it and have some ideas for speeding things up
- camhenlin 5y agoFor real. I’ve tried porting several modern UI libraries to classic Mac, such as Nuklear, uGUI, and a couple of others. And I’ve succeeded in getting them working, but as soon as you start doing something with text, they fall on their face. Just having a text input is nearly impossible on an 8MHz 68000!
- tambourine_man 5y agoProper text rendering is hard.
- cy384 5y agothe crypto code actually has some 68020 assembly (credit to the mbedtls devs), it could probably be made faster, but I would need to sharpen my assembly skills a lot doing the initial key exchange before timeout is barely possible for a 68030 at 16MHz, takes the better part of a minute! of course, on the later PPC machines it's a complete non-issue
- anthk 5y agoA g4 with Altivec can play 720p video...
- brandmeyer 5y agoDepends in part on the cipher suite. For software implementations, the current generation of chacha20-poly1305 and ed25519 are tolerable. But earlier generation ciphers were designed with hardware acceleration in mind. This tool is relying on libssh2 for its SSH implementation core. chacha20-poly1305 and ed25519 are both extensions and are not included.
- classichasclass 5y agoIt's the encryption. For Crypto Ancienne, it may take 20 or more seconds for a cacheless 25MHz '030 to do a local TLS 1.2 transaction, and that's with skipping a whole bunch of steps. Pretty much anything under 40MHz will have timeouts because most servers won't wait. https://github.com/classilla/cryanc https://github.com/classilla/cryanc
- zozbot234 5y agoYes, modern SSH is a challenge even on the fastest 486-class machines, which are very roughly comparable to this 68030. Takes several seconds to complete a connection.