Fixed things up, verified it actually works by encrypting with a C program, decrypting with my Python script