Implement ANSI X.923 and fix a stupid error

Stupid error = I forgot I had to subtract the result of data length modulo block size from the block size to get the number of bytes required for padding.