• 2 Posts
  • 438 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle

  • I think it is best to have some understanding of how an OS works, and how Python works, before asking whether you can write an OS in Python.

    Python is basically a scripting wrapper around a bunch of C functions (“builtins”) and there are means of installing additional C functions if you need them. Without any of the builtins, you really can’t do much of anything. For example, “print(2+2)” computes the string “4” (by adding 2+2 and converting the result to decimal), then calls a builtin to actually print the string on the console.

    For an OS, you will need quite a few more C functions, mostly to control timers and task switching, the main functions of an OS. Given enough C functions though, in principle you can write an OS.



  • It’s difficult to know that for sure, which is why (e.g.) the US government wants to make sure that there is domestic chip manufacture with a completely controlled supply chain to make hardware for classified communications. It can help to consider the difference between targeted surveillance (spending millions to tap the President’s phone, to get big juicy national secrets) and dragnet surveillance (tapping everybody’s phone so that you can have dirt on Joe Schmoe if he does something interesting later, even if he is of no particular interest right now). Hardware backdoors would be used mostly for targeted surveillance.

    Stuff like VPN’s and encrypted apps can be of considerable help against dragnet surveillance, which is what the civil privacy community mostly cares about. If you think you might be a subject of targeted surveillance, you have to be much more paranoid. Not just hardware backdoors in your computer, but suspicious white vans on your street, microphones in your flower pots, FBI agents under your bed, the whole bit.

    There are some countermeasures you can take against hardware backdoors (electromagnetically isolate a computer from the network and transfer data from it by floppy disc or similar) but basically you’re in a different world if you’re dealing with this.

    You mght like the book “Security Engineering” by Ross Anderson (older editions free online and still very good: https://www.cl.cam.ac.uk/archive/rja14/book.html and scroll down). It goes into this stuff, has lots of good overviews even if you gloss over the technical parts, and will generally help you see clearly in the topic.




  • I don’t bother with a proxy host or with LetsEncrypt, though I guess you could use LetsEncrypt perfectly well. Back when I was doing this, LetsEncrypt didn’t exist and you had to actually pay for public certificates, so using locally generated free ones saved money. It also had a minor(?) security advantage in that if the private server key somehow leaked, it wouldn’t let people impersonate our internet domain.

    For the private CA I simply used the crappy CA.pl script that comes with OpenSSL or did at the time. There are much better ways to do it, especially at any kind of scale, but CA.pl sufficed dealing with a few development machines.





  • Nextcloud might handle what you want. There are a zillion places that offer hosting for it, or you can self-host it. MediaWiki is another possible choice, that despite the name is more document oriented and less media oriented than NextCloud is. Again, you can self-host, or there are commercial hosts for it. Lots of VPS providers also offer one-click installers for it. I haven’t run a MediaWiki instance myself, but am familiar with it as a user through editing Wikipedia. I’ve run Gitit, which has a similar UI, but is backed by a Git repo.