ANSI X9.9 Cryptography Standards
without doing your homework for you: did you check the open-source implementations of ISO 8583? is the answer somewhere in there?


DL-ISO-8583, in C
jPOS ISO-8583 Framework, in Java
j8583, also Java
PHP ISO-8583 Parser


Retrieved from wikipedia (strangely, the Spanish page, a good tip for finding more external references is changing the language tab)