For a while now I have been wondering how well a 4MHz Z80 would cope with some modern encryption protocols like those used for HTTPS web sites (ie most web sites these days), so I wrote some SHA-1 encryption code and a test program:
[ Guests cannot view attachments ]
The .html file for the main page of EnterpriseForever.com (which is also a HTTPS web site) is around 64k once all the secondary files are included. Based on my SHA-1 code it would take around 15s for a Z80 to decode!
There are more modern and more secure SHA algorithms with longer hash values but they operate in a broadly similar way.
Here is the source code for the SHA-1 algorithm in case anyone ever finds it useful (assembled using sjasm 0.42c). I was able to adjust the official algorithm a bit to avoid copying all the data twice!:
[ Guests cannot view attachments ]
And here is the source code for the test program which includes the above file (sorry, a bit messy as it was hastily hacked together from another program!)
[ Guests cannot view attachments ]
Bitcoin mining on a Z80?