The book "An Introduction to Mathematical Cryptography" by J. Hoffstein et al. talks about a three-line implementation of the RSA algorithm in Perl, which people used