Menu

Crypto and Security Brain Teaser

Assuming this code works, what is wrong with the functionality from a security and crypto perspective?

#!/usr/bin/env ruby
# This program encrypts and decrypts messages at the command line.
# It runs setuid root, so that it can be used by users without giving
# them access to the (root-owned) secret encryption key.