knot126

furries, computers, magic

  • they/them (any are fine)


struggling to implement XTEA in python properly. Though, when I insist on writing my own (more mathematical) description of XTEA and get distracted trying to fit the entire thing into a single mathematical expression i dont think failing is unexpected...

R = ((L + ((((0x9E3779B9 * ((i + 1) // 2)) & 0xffffffff) + ((((T[((0x9E3779B9 * ((i + 1) // 2)) & 0xffffffff) % 4]) * ((i + 1) % 2)) + ((T[(((0x9E3779B9 * ((i + 1) // 2)) & 0xffffffff) >> 11) % 4]) * (i % 2))) & 0xffffffff)) & 0xffffffff) ^ (((((R << 4) & 0xffffffff) ^ (R >> 5)) + R) & 0xffffffff)) & 0xffffffff)

(YES THIS WILL BE A NON REAL WORLD IMPLEMENTATION OF A XTEA ROUND FUNCTION THAT WILL NOT BE USED AND WILL NEVER BE USED AND WILL NOT BE MADE AND I WILL UNMAKE IT SO I WILL NEVER MAKE IT ETC. Also if you didnt know it doesnt work lol)


You must log in to comment.

in reply to @knot126's post: