News for hackers. Stuff that matters.
Re:Mastodon for Apple II by Maken on Monday October 02, 2023 @08:39AM (#37737317)
What would stop 80s computers from using encryption?
Re:Mastodon for Apple II by djxfade on Monday October 02, 2023 @08:45AM (#37737381)
Speed. A computer from the 80s wouldn't be able to encrypt/decrypt web traffic quick enough to be usable.
Re:Mastodon for Apple II by kibwen on Monday October 02, 2023 @09:16AM (#37737657)
Now I'm curious to know the actual difference in wall-clock time between decryption on a modern device and on an Apple II processor. Seconds, minutes, hours?
Re:Mastodon for Apple II by colinlm on Monday October 02, 2023 @10:03AM (#37738294)
According to people at CryptoAncienne (https://github.com/classilla/cryanc), a 25MHz 68030 needs about 22 seconds of maths to handshake a modern TLS server. During that time, most servers close connection.

So on an 1MHz 6502, I think it'd be minutes just for handshaking.

Re:Mastodon for Apple II by eschneider on Monday October 02, 2023 @10:36AM (#37738702)
It should be possible to drop in a coprocessor board to handle the encrypt/decrypt. It's compute bound rather than bus bound so it should speed up nicely.
Re:Mastodon for Apple II by colinlm on Monday October 02, 2023 @10:52AM (#37738908)
Most of us throw that in the form of an HTTPS-stripping proxy on a Pi :)
Re:Mastodon for Apple II by eschneider on Monday October 02, 2023 @11:41AM (#37739568)
I mean, that would be the sensible approach. I was just thinking that designing an FPGA board for my Apple II might be...fun.
Re:Mastodon for Apple II by kibwen on Monday October 02, 2023 @02:21PM (#37742298)
It does sound fun, although I shudder at trying to prove that such a thing would be free of side channel attacks.
Re:Mastodon for Apple II by js2 on Monday October 02, 2023 @10:15AM (#37738439)
The 68030 is also a 32-bit processor with 8 general purpose registers. The 6502 is an 8-bit processor with one accumulator and two index registers, though it could use the first 256 bytes of memory (zero page) as pseudo-registers.
Re:Mastodon for Apple II by colinlm on Monday October 02, 2023 @10:51AM (#37738892)
Yes, although the zeropage is quite cramped. There's only about 8 bytes free there if you don't want to overwrite anything. Accessing the zero-page only gains 1 cycle out of 4 needed to access non-zero-page memory locations, anyway, so that's only a 25% performance gain in very limited applications.
Re:Mastodon for Apple II by kibwen on Monday October 02, 2023 @10:51AM (#37738896)
Not that anyone would find this useful or practical, but I wonder if it would make sense to define an alternate protocol where the handshake is asynchronous and doesn't require the server to hold a continuously open connection while the client performs the encryption. This might be a non-starter for interactive applications, but for batch things like downloading emails (where you could get away with checking for new mails every hour or so) this could be tolerable.
Re:Mastodon for Apple II by hisham_hm on Monday October 02, 2023 @11:38AM (#37739511)
I wonder if it would be possible to make a usable dedicated hardware encryption card for the Apple II using 80s tech.

(Of course, it has the downside that upgrading to a new protocol would require a new card, but hey... we're just having fun musing on retro-futurism here!)

Re:Mastodon for Apple II by Maken on Monday October 02, 2023 @11:47AM (#37739661)
That does make sense. I was assuming that HTTPS would be possible but slow in 80s' hardware, I was not considering that the slowdown would be so massive modern hardware would consider it a lost connection.
Re:Mastodon for Apple II by StillBored on Monday October 02, 2023 @02:11PM (#37742149)
Thanks for that, I was going to point out its the public key, and cert validation that is going to be the problem more than the actual data encryption. I had this problem a couple years back with a project on a esp8266, which was taking on the order of 5 seconds at 160Mhz to setup a TLS connection. And it got worse with longer key lengths, and validating a cert chain.

So, ballpark it probably takes multiple minutes, and probably consumes most of the RAM for the intermediate steps with longer keys.

OTOH, I switched to an ESP32 because it has RSA offload, and something like that could be attached to an apple ][ fairly easily, to provide a connection offload accelerator.

Re:Mastodon for Apple II by guestbest on Monday October 02, 2023 @10:30AM (#37738617)
There was a discussion about this before and from what I read TLS 1.3 isn’t possible on an 8 bit micro like a 6502. I’m assuming this is because of the timeout in the handshake

https://news.ycombinator.com/item?id=32116761