nit: naming of X, Y, and Z is a little opaque if you only see the output. Maybe better to call them input, encrypted, decrypted, or something?