Time Nick Message 18:08 cheapie too quiet :/ 18:21 * cheapie gives user333_ a password-protected door that you /can't/ just read the password out of with the inspector tool or //lua: https://cheapiesystems.com/git/rvcontroller/tree/assembly/passworddoor 18:21 user333_ let me guess: hashed with your recent SHA256 implementation? 18:21 cheapie yes 18:21 cheapie With salt too 18:22 user333_ impressive 18:22 user333_ you should try running linux (or making your own unix-like OS) on it 18:22 cheapie someday 18:23 cheapie The downside (or upside, from a security point of view) is that doing the hashing makes it take around 5 seconds to check the password 18:24 user333_ could try a more efficient hash 18:24 user333_ md5 is faster i hear 18:24 cheapie I could, but I don't care that much 18:24 cheapie Yeah, but MD5 is kinda crap and I wanted this thing to at least put some effort into being secure 18:25 cheapie AFAIK SHA-2 isn't broken yet 18:27 cheapie And yes, I made sure it wipes the hash function input and state after it does the hashing. I used the cbo.zero instruction from that shiny new Zicboz extension to do that quickly 18:28 user333_ that's quite a bit above my level.. 18:28 cheapie What is, cbo.zero? 18:30 Krock cheapie: add an instruction called sha256. it'll be very fast and efficient :P 18:30 user333_ assembly stuff (though i do have a good understanding of computers in general so it does make some sense) 18:30 cheapie Krock: It already has four instructions to help with it (Zknh extension) 18:31 cheapie user333_: You haven't even seen the most cursed part yet 18:31 cheapie The hash function is big-endian, but the UI is little-endian, so... it switches the processor's endianness back and forth as it runs 18:31 user333_ that is.. very cursed, yes 18:32 cheapie Krock: https://docs.riscv.org/reference/isa/v20260120/unpriv/scalar-crypto.html#zknh 18:32 user333_ good luck with that on real hardware 18:32 cheapie I'm not sure any real RISC-V hardware actually supports selectable endianness, even though the spec allows it to 18:32 cheapie I'm only aware of one hardware core that can do big-endian at all 18:33 user333_ what happens if you introduce multiple cores and selectable endianness on each 18:33 Krock cheapie: oh. having those instructions is pretty nice. 18:33 cheapie Krock: RVController actually supports everything (at least everything defined for RV32) on that page 18:34 cheapie user333_: A processor could do that if it wanted, you would then have some cores with one endianness and some with the other 18:34 cheapie (if software chose to use it that way) 18:35 Krock if you have all instructions and a serial output then you only need an IOMMU and a RV32-built kernel 18:36 cheapie I don't even have a regular MMU, let alone an IOMMU (but I think Linux can be made to work without those), the big thing right now is that I don't have support for S-mode or U-mode yet 18:38 user333_ do you have any real risc-v hardware? 18:38 cheapie Yes, but it's all RV64 18:38 user333_ still cool 18:39 user333_ most obscure architecture i have is probably armv6l 18:39 cheapie One RV64GC (StarFive JH7110), one RV64GCVBH (SpacemiT K3) 18:43 cheapie I'd like to pick up some kind of RV32 microcontroller dev board to play with sometime, maybe a CH32V003 thing or something 18:43 cheapie The only problem is I don't really know what I would make with it :P 18:44 Krock weather station 18:44 user333_ i think the RPi Pico 2 has some RISC-V cores, though not very powerful ones 18:44 cheapie meh 18:44 user333_ can it run doom? 18:44 cheapie It seems like my go-to demo project these days is a Windows 95 keygen, so maybe I should make a *physical* Windows 95 keygen 18:46 Krock or a portable mp3 recorder. encode the ADC directly into MP3 and store it onto a flash drive 18:46 bgstack15 I have a question about the password-protected door idea. Is that for a multiplayer server? How do you encrypt the input from the client to the server? 18:47 cheapie bgstack15: It's for fun, and I don't 18:47 bgstack15 Ah, drat. I was hoping you'd solved that problem offhand, lol 18:48 user333_ going a bit more on-topic, you could probably make a lightweight luanti-compatible server for a microcontroller 18:48 bgstack15 I don't expect I can easily guide my users through using stunnel on every client machine... 18:48 Krock there is no client-side logic between sending formspecs 18:48 cheapie The idea with the door was just to stop players from reading the password back out of the Luacontroller 18:48 Krock *formspec fields 18:49 bgstack15 I modded a mod that used short PINs, and I used a uuid on the node and then look up the uuid in mod storage, so a quick metadata dump of the node wouldn't reveal the pw 18:49 bgstack15 But never solved the client<-->server encryption (and never tried) 18:49 cheapie Yeah, if you're doing a mod you can use mod storage. But this isn't a mod :P 18:50 user333_ SSCSM could probably let you implement some kind of client-to-server encryption in the lua-side 18:50 bgstack15 Hm, please elaborate. I'm not where I can open a link. So what is your project about then, with a password-protected door, not luanti? 18:51 cheapie It's a program that runs in RVController, which in turn is a RISC-V emulator program that runs in a mesecons Luacontroller 18:51 bgstack15 I'm crossing my fingers, toes, and eyes for getting TLS support in Luanti, haha 18:52 bgstack15 Wow, so you're re-implementing a microprocessor all inside lua (mesecons), wow! That is interesting, and starting to reach beyond my understanding even of the topic overview itself. 18:52 cheapie yes 18:52 bgstack15 (no wonder your sha256 operation took 5 seconds) 18:53 cheapie Actually 6 seconds, I timed it after saying that :P 18:53 bgstack15 No worries, 5s was already close enough 18:53 user333_ the only feature i'm wanting in luanti is something like a player detector (an area that runs a function when a player enters/leaves it, implemented in C++ server-side/SSCSM client-side) 18:53 user333_ anyway, i have to go catch a bus, ttyl 18:54 bgstack15 client-side?! Wouldn't you need that enforced/implemented server-side? 18:54 cheapie bgstack15: Every so often someone asks why I made RVController... my favorite answer so far is "to make Luacontrollers harder to program" 18:57 cheapie Really the original reason is "because I thought it would be neat" and then it became quite a learning experience about all sorts of related subjects 21:29 user333_ client-side?! Wouldn't you need that enforced/implemented server-side? | i meant one part SSCSM, one part server-side (though yes, validation of the client data would be near-impossible) 21:33 MTDiscord bgstack15: you could offload computations to clients and check them probabilistically 22:07 cheapie user333_: Apparently someone else on the same server wrote an RV32IM emulator without knowing that RVController existed