Have y'all seen what an encryption algorithm looks like in code? Pure madness.β https://image.nostr.build/c512961cd5f00c01a7b9648aca8ba5a65b52f6d4a269865649190c723a5742c2.jpg
Sure, let me just (s0 ^= b[i + 0]), (s1 ^= b[i + 1]), (s2 ^= b[i + 2]), (s3 ^= b[i + 3]); ({ s0, s1, s2, s3 } = encrypt(xk, s0, s1, s2, s3)); (o[i++] = s0), (o[i++] = s1), (o[i++] = s2), (o[i++] = s3); for you.
This should have been written in LaTeX and then transpiled to JavaScript
I was wondering what it looks like in Latex
no need to wonder no more https://i.nostr.build/dq0fYugcm1notAbR.jpg
I got ahead of myself n forgot to add the code https://i.nostr.build/di3HlEBrQY34ZPEY.jpg
That really makes a case for functional languages and commenting your code, doesn't it? SimpleX actually has some of its cryptography written in Haskell IIRC, and OCaml is another good option that's a little more pragmatic in its design.