Image of the glider from the Game of Life by John Conway
Skip to content

{ Category Archives } Python

All things Python.

Do Not Use sha256crypt / sha512crypt - They're Dangerous

Introduction I'd like to demonstrate why I think using sha256crypt or sha512crypt on current GNU/Linux operating systems is dangerous, and why I think the developers of GLIBC should move to scrypt or Argon2, or at least bcrypt or PBKDF2. History and md5crypt In 1994, Poul-Henning Kamp (PHK) added md5crypt to FreeBSD to address the weaknesses […]

The Lagged Fibonacci Generator

Lately, I have been studying pseudorandom number generators (PRNGs, also called "deterministic random bit generators", or DRBGs). I've been developing cryptographically secure PRNGs (CSPRNGs), and you can see my progress on Github at This project is for nothing more than for me to somewhat get a feeling for new languages, while also learning a […]

OpenPGP Key Random Art, Now With ANSI Color Support

I just recently committed support for my OpenPGP key random art Python script to support ANSI color. The idea is to create a "heat map" of which squares the drunken bishop has traversed during his dizzying travels. So not only can you see what your key "looks" like, but now you can sense what your […]

The Drunken Bishop For OpenPGP Keys

Almost a year ago, I blogged about the drunken bishop algorithm for OpenSSH key random art. Towards the end of the post, I mentioned that I would be building an OpenPGP implementation. I started doing so in Python, but eventually got sidetracked with other things. Well, I hosted the Scale 12x PGP keysigning party, and […]

Obsure Email Addresses In HTML

I recently put up a web page with my email address. I'm confident in email provider's ability to filter spam, so I don't worry about it too much, to be honest. However, I started thinking about different ways I could obscure the email address in the source. Of course, this isn't offering any sort of […]


I have been familiar with steganography for a number of years. In fact, back when I was in middle school, I developed a fascination for encryption, and hiding messages, mostly so I could pass notes back and forth to classmates during class. It wasn't long before I found "invisible ink", which is a form of […]

Announcing Penny Red

This is my first open source project that I've started and maintained, so I'm pretty excited about it. I was upset at the current offerings of Hashcash for the various MUAs, so I set out to do something about it. You've already read on my blog about my solutions for minting and verifying Hashcash tokens […]

Verifying Hashcash Tokens With Mutt

Just five days ago, I blogged about minting Hashcash tokens in Mutt using a Python script (make sure you check that page for any updates to the source if you're using it). Well today, I finished writing my verification script. It takes some additional changes to your ~/.muttrc, which I'll outline here, and it requires […]

Hashcash and Mutt

Introduction I wanted to used Hashcash with Mutt, for nothing more than a curiosity to see if it generates any discussion, and to see if people notice. Further, I'm a big crypto advocate, and while Hashcash isn't exactly crypto, it's highly related to it, and uses it. Regardless, I wanted to see if I could […]

Largest Palindromic Number In Python

I found the absolute best way to learn the Python programming language, while at the same time, increasing deductive logic capacity and learning mathematics. The way is through Project Euler. Of course, you don't have to use the Python language to complete the problems. You can use any language you like, or use pencil and […]

Prime Numbers In Python

The following program returns True if a number is prime or False otherwise. I am proud of this code, as it implements dead code. Upon the first positive condition in the if statement nested in the while loop, the program terminates, ignoring any further code following. As far as I can tell, this is the […]

Recursion In Python

I took my Perl script that I wrote some time ago, and rewrote it in Python. The exercise of the initial Perl script, was to get a better handle on the language using recursion, and to inventory my Ogg Vorbis collection of music. The same reasons were used for this Python version. This script traverses […]

29 And Holding

123456789101112from datetime import date birth_day = date(1977, 6, 9) right_now = if (right_now.month >= birth_day.month) & ( >=     age = right_now.year - birth_day.year else:     age = right_now.year - birth_day.year - 1 if age >= 30:     age = 29

Poll: First Programming Language?

My coworker asked me this question, and began asking a few others in a couple IRC channels. So, I thought I'd extend it to my blog, and the planets that I syndicate. I added as many choices as I could hoping to see a wide array of votes. I added a few newer languages for […]

Some Spam Karma Automation in Python

Being a WordPress blogger, unfortunately, I have to wade through tons and tons of comment spam. As of current, I have caught 18,119 comment spams since the inception of this blog in September 2005. Thats more than 1,000 spams per month! That's some serious spam. Problem is, though, that some of it is getting through […]