Working cipher homework