[Coco] Disk subroutines for Assembly?
Don Barber
don at dgb3.net
Fri Feb 4 20:13:48 EST 2022
Thanks Robert. I got something put together; mostly with help from
Unravelled and the guidance from Will's DoD code.
I'm just hacking together stuff to learn 6809 and coco programming.
Basically, I've got a pretty decent RSA key generator put together, with
a pseudorandom number generator, a pseudoprime checker (using
miller-rabin) all using multiprecisionbyte arithmetic (started with
Leventhal's subroutines but needed to write my own euclid gcd and
modular exponentiation subroutines). Right now its limited to 1016 bit
keys (I can go into why if anyone actually cares) - and that takes a day
or three to generate depending upon how lucky the random number
generator is at hitting near a prime. But generating small (like 32 bit
keys) only takes several minutes. I wanted to write the public and
private key files out to disk so I can separate out key generation from
the actual decrypt/encrypt programs.
FWIW I do have it writing out the key files great now. Right now its
outputting them in ASN1 format which most tools (like openssl) can read
fine, though its supposed to be in DER format (a more size-efficient
subset of ASN1); it will just take a few more tweaks to get that right,
but will require either implementing a large buffer to assemble the file
in memory or implementing a fseek() type routine. Haven't decided yet -
or even if I'll fix that little detail at all.
Will all this be useful to anyone? No. But its a fun little project for me.
Thanks,
Don
On 2/4/22 19:32, robert.gault at att.net wrote:
> Don, If you say exactly what you want to do with disk access, I may be able to send you some example code. I wrote an asm program to open a .bin file and indicate what sectors it occupied and where it would load into memory. The code works for both 1.0 and 1.1 Disk Basic.Sent from my LG Mobile
>
More information about the Coco
mailing list