6 ms·
New two-factor authenticator: Commodore 64
- pfoof 4y agoI used Nokia 6300 J2ME for TOTP generation around 2017. Less likely to get a zero-day there. Or rather more likely but less likely that someone would want.
- tyingq 4y agoTOTP without a real time clock is ambitious :)
- classichasclass 4y ago(author) The CIA TOD clock is okay for this. It uses wall mains voltage, so it's about as accurate as your average office clock. You can use a CMD-compatible device to seed the time; I'll be adding Ultimate-II+ support as soon as it's off backorder.
- WirelessGigabit 4y agoDo you need to configure the Hz? Otherwise it'll run faster in the USA va Europe.
- layer8 4y agoSee here: http://codebase64.org/doku.php?id=base:initialize_tod_clock_on_all_platforms http://codebase64.org/doku.php?id=base:initialize_tod_clock_... I don’t understand it completely, so would appreciate an explanation.
- classichasclass 4y ago(author) Yes, it accounts for 50Hz vs 60Hz, see https://github.com/classilla/totp-c64/blob/main/totp.xa#L129 https://github.com/classilla/totp-c64/blob/main/totp.xa#L129 . Basically it uses the other CIA as a cycle counter to see how many cycles elapse between TOD ticks, and then adjusts accordingly (from https://codebase64.org/doku.php?id=base:efficient_tod_initialisation https://codebase64.org/doku.php?id=base:efficient_tod_initia... ).
- garaetjjte 4y ago>about as accurate as your average office clock That's underselling it, mains frequency is deliberately controlled to keep average frequency very accurately in long-term periods.
- classichasclass 4y agoRight, but this uses a 30-second period, which could be affected by smaller variations. In this case the use of the TOD is unavoidable because if I used the Timer A interrupt (50Hz or 60Hz depending on video standard), it would be slowed when interrupts were disabled for doing BCD calculations - the C64's IRQ routine at $ea31 can't handle the situation if an IRQ occurs while decimal mode is on. This is a known Kernal bug. I suppose I could hack around that but this was simpler.
- sohkamyung 4y agoIt might be air gapped, but knowing the quality of electronics in those days, I would guess a C64 is not immune to data exfiltration via EM radiation through the air or through the power supply or via the keyboard. :-)
- snvzz 4y agoI remember tuning in to C64's channel from a different room's TV. The RF encoder + cable acted as a transmitter.
- bobleeswagger 4y agoBack in my day, wireless was a bug, not a feature!
- userbinator 4y agoIndeed, a bug in the other sense too.
- Eleison23 4y agoOnce in the early 90s, I was attached to a consulting firm whose primary goal was helping businesses get onto the Information Superhighway all the CEOs were buzzing about. We were granted a guided tour one night of a facility at the top of a skyscraper in San Diego. It was shrouded in mystery and government TLA programs. My boss was explaining parts of it to me. He said this is a TEMPEST secure facility. I'd never heard the term but when he described the principle to me it made a lot of sense. My father is a radio buff and raised me to learn all about electromagnetic stuff. The facility had conditioned power lines and shielded walls and partitions that could block EMR effectively to keep computing information safe from prying eyes. There were other fascinating Top Secret features of the facility that were explained to me that night. Of course the facility was not in operation and unmanned at the time of our unclassified tour. I was gobsmacked at the depth of real bona fide security measures and countermeasures, even in those primitive times.
- CodeMage 4y ago
- z3 4y agoMan, you are my hero
- userbinator 4y agoAs someone who is rather distrustful of the real motives of the security in general, TOTP is IMHO a good solution that increases security for the user but is also entirely under the user's control. As this article shows, a 6502-level CPU is definitely powerful enough to do this and other crypto primitives; smartcards, which can perform RSA operations, are roughly of the same power.
- tialaramex 4y agoTOTP is a cute trick (we used to do mOTP which is very similar, on phones, back when "smart" phones weren't a thing yet) - But, it isn't actually really good security. It's easily phished and it relies on a secret which means either party might leak that secret. FIDO in contrast has better security and retains control, with the main loss being simplicity, I understand how it works pretty well, but most people aren't going to really put the time in or have the inclination. FIDO is designed to be used for things like WebAuthn, which can't be phished, and doesn't use secrets so the Relying Party doesn't know anything which can be compromised. You can build one yourself, buy Solo Keys, or indeed buy a Yubico product.
- tjoff 4y agoIf you can't properly backup your FIDO credentials the practical security for vast majority of individuals is much, much worse than TOTP. It is extremely inconvenient and the risk of locking yourself out is truly massive. Does Solo Keys enable that? Generate whatever you need on your PC and then load it into as many keys you feel like.
- FredFS456 4y agoI bought two keys, keep one at home and one on my keyring. If my house burns down AND I lose my keys, there's account recovery codes that they have you note down - those I keep offline in geographically separate areas.
- psanford 4y agoThats the point of passkeys. They can be backed up and sync'ed between devices. But even if you don't want to use the popular passkey implementations, you can still easily register multiple authenticators which mitigates the risk of losing one. On a new site, I'll register my hardware FIDO key, my phone as a passkey, and my laptop authenticator (either touch-id on MacOS or tpm-fido on linux machines). Soon there will be other passkey implementations that will also support syncing and backups (1password for example is working on this). Don't settle for a phishable authentication method.
- AdamJacobMuller 4y agoThe 8-Bit Guy just did a video about the SX-64 yesterday: https://www.youtube.com/watch?v=i4gHaXOevVM https://www.youtube.com/watch?v=i4gHaXOevVM It's a cool little box, unfortunately hobbled by a terrible screen, interesting timing on seeing this here today.
- edent 4y agoI see the clock code accounts for leap years - but what about leap seconds? Of course, most TOTP systems allow for a little clock drift, so being out by a few seconds should be fine. What a delightful hack. It makes me want to drag my BBC Micro out of the loft to try something similar!
- classichasclass 4y ago(author) Sadly, no leap second support currently. A future adjustment ;)
- userbinator 4y ago30s is the default interval for TOTP, and most seem to allow +/- several intervals, so around a minute or two of drift is still OK.
- jawadch93 4y ago[dead]
- epigramx 4y agoI find it funny how the internet went straight into the cryptic(to understand for normies) nature of 2fa based on SIM card, when it might had been simpler (and possibly more secure in practice), to just go with key files at first.
- alpaca128 4y agoEveryone already knows what SMS are, there's nothing cryptic about it on the user side. Also SIM cards don't need a backup.
- rkagerer 4y agoBut does it play a cute little 8-bit sound bite each time you use it? (Like, Mario catching a coin)
- JKCalhoun 4y agoIf there was any anxiety in the 8-bit era it came from disk-born viruses (although in the C-64 era I don't recall even that as a worry). No log-in, no passwords, no cookies, no spyware. (I suppose the BBS introduced most of us to passwords for the first time?) C-64 + 2FA feels sort of ... blasphemous? Besmirching?