More use of Schneier's original code to ensure correctness of encrypt and decrypt