|
You can download Twofish "C" source from: http://www.counterpane.com/twofish.html Set a compile-time flag to create big-endian byte swaps for AS/400. However, that "C" version is slow and pedagogical. It's fundamentally different from the faster MI implementation from News/400 because: The design of the Twofish round function and key schedule permits a wide variety of tradeoffs between speed, software size, key setup time, gate count, and memory. That's an important advantage in the AES competition. Twofish uses a Maximum Distance Separable (MDS) matrix multiplication from key material and from fixed S-boxes. The "C" version calculates all of the multiplicands on-the-fly, while the News/400 version pre-calculates the outer layer of multiplicands from fixed S-boxes using REXX do-loops, and stores them in a 4096-byte MI variable initialization. (You can see this monster hex variable in the QPRCRTPG API spooled file output after the REXX runs.) Even faster implementations of Twofish can be achieved by pre- computing the inner layer of MDS matrix multiplicands for specific keys, and then storing them in OS/400 objects. I choose not to follow that route because it would require a secure key management system for Twofish on AS/400, and that's a different issue that doesn't interest me now. By the way, if you order the Twofish book (John Wiley & Sons) through the Twofish web site you can get a 20% discount off the Border's price. (I bought my copy from Border's.) As for PGP on AS/400, I'd love to see the code that cooks up huge prime numbers for the Rivest-Shamir-Adleman public keys. No matter if it's "C" or MI, I'll bet the prime number cook-up is slow. +--- | 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 mailing list archive is Copyright 1997-2024 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.