You can get the article here:

http://www.news400.com/features/newmf/Article.cfm?ArticleID=13333

Click on the link to "Figure 1", copy & paste the REXX make code into
Windows notepad, upload to AS/400, then execute STRREXPRC once.

Much thanks to Twofish authors Bruce Schneier and Doug Whiting for
their patience in answering my questions about big-endian byte swaps
for the AS/400 implementation.  Plaintext and ciphertext is of course
endian-neutral, however, Twofish re-uses integer math operands in
character operations, and the AES contest runs on little-endian Pentium,
so we must clutter our AS/400 implementation with four-by-four-way byte
swaps to get cross-platform interoperability.

If variable A contains "ThisWordCameNext", the following MI code does
a four-by-four-way byte swap into variable B.

XLATEWT  B,  X"03020100070605040B0A09080F0E0D0C",  A ;

Now variable B contains "sihTdroWemaCtxeN".


+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.