mleku the disregarded @mleku - 3mo
not sure if this is actually what the NIP means - the encrypted bytes are encoded in base64 and you have to pad base64... it is 6 bits per character so it's 3 bytes per 4 characters, and it uses = as the padding character iirc same thing happens with base/bech32, 5 bits per cipher and thus the nearest divisible by 8 to zero is 40, which is 8 characters, you can leave the padding out if you designate which end is start/end, and pad there, this is how bech32 encoding does things in fact technically you could do the same thing with base64 but that would require a customized codec
idk who designed that thing but i'm gonna hold my nose and not do anything but refactor the code that implements it, it's ugly and stupid and retarded
like, if i am reading correctly and you interpreted it correctly if i make a blob of data that is 32769 bytes long the whole message has to be padded to 64kb, right?
literally retarded i'm not keen on supporting it, in fact, now that i'm getting jiggy towards being able to do relay and client as a package deal i'll just make how i think it should work, including mandatory auth to access DMs
you can tell that whoever designed it is less than 3 years since they mastered cryptography and protocol encoding