coursera crypto1: pa3 - first attempt