classilla / cryanc

TLS for the Internet of Old Things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetBSD/hpcmips (MobilePro 800, mipsel)

hackerb9 opened this issue · comments

Hi! Although NetBSD has perfectly fine crypto in its current incarnation, that would require me updating my NEC Mobile Pro 800 from NetBSD version 1.6 (circa 2002) to NetBSD 10 (circa now). I figured, I'd first try Crypto Ancienne and see if it would work well enough to serve my purposes.

Despite the documentation still saying that NO_FUNNY_ALIGNMENT presumes big endian, it works fine on this mipsel machine, probably thanks to ba9696e. This is the only change needed:

#if defined(__MIPSEL__)
#define NO_FUNNY_ALIGNMENT
#endif

If you want you can add and defined (__NetBSD__) in there, but I suspect any mipsel machine is going to care deeply about alignment.


By the way, while this is a very neat project, it turns out it doesn't actually do what I need. Even the hoary version of w3m I have installed insists on using CONNECT, so Crypto Ancienne won't work for me.

It's funny you should mention that because that commit was written on a Cobalt RaQ 2 running NetBSD, which is of course also mipsel. The only reason I'm hesitant about your suggestion is I'm not sure that's still true of more recent little endian MIPS cores (the RaQ is a QED R5000-type, and I think the Mobile Pro is a VR413x?), and NO_FUNNY_ALIGNMENT may have a performance impact since it breaks up operations. Do you know for certain they still require aligned access?

Unfortunate about w3m! Darn these browser authors trying to be secure! :P

I know nothing about newer MIPS cores. I've heard the newer chips are quite different from the "classics", like the VR4121 in the MobilePro 800.

Perhaps the impact on newer devices would be limited: I read on the linux-mips wiki that the vast majority of 64-bit MIPS machines are run big endian, and thus wouldn't be affected by my suggestion.

Decided to add a FUNNY_ALIGNMENT_OK and specific block, and if we find a flexible MIPS, we can add it as an exception.