hi, i downloaded the existing twofish algorithm from bruce schiener's website but i am having trouble compiling it i.e making it run. can some one plz help me.

His code is a VERY old reference implementation. I was just checking it out on my Linux system, and it requires some work to function in my environment. There are links on Schneier's TwoFish web page to other implementations that may be better to try. There are also open source encryption tools that utilize twofish, though the ones I found are either Delphi or C# code bases. Here is a link to one I found on Schneier's twofish page that might work better for you: http://www.schneier.com/code/twofish-cpy.zip

Edited 5 Years Ago by rubberman: n/a

Ok. With appropriate compiler platform symbol definition, I got it to run, but it still has an error in that the encrypt/decrypt operation miscompares. IE, the plaintext that is encrypted and then decrypted does not end up the same. I haven't gone further than that, but it could be a simple matter of how certain string characters are interpreted in MS operating systems vs. Linux/Unix systems. I don't know for sure at this point. Also, the twofish-cpy.zip file I pointed you to has a couple of python modules that have to run in order to built that version, and it doesn't work on my system. So, at this point I am going to get lunch...

Edited 5 Years Ago by rubberman: n/a

how do i get the python modules to run in ms vista environment?

You need to install python, which is freely available on the web, and there may be other dependencies as well. I don't run Vista except on client systems when they haven't yet upgraded to Win7... :-)

haha...thanks.. i'll try it out n get back to u..
p.s. i have windows 7 too.. but dnt hv all the drivers...so i keep switchin to vista

the twofish-cpy.zip file code requires a "tables.h" to be included. whre do i get that from.

the twofish-cpy.zip file code requires a "tables.h" to be included. whre do i get that from.

That is generated by the python code. Since I haven't been able to get the python code to work on my RHEL 6 Linux system, I haven't been able to check it out either...

i am going to install fedora tomorrow to get this code working.
i mailed the programmer abt this problem.. he suggested
" Running this command should do it.
python makeCtables.py > tables.h "

Tried that. No luck.

Are you running Python 3.x? The code is written for Python 2.6; you need to either downgrade Python, or convert the code with 2to3 tool (a part of Python distribution).

okay.. i got the python modules to work. atleast i think so.. n the code is able to compile with no errors.. just a few warnings... but its giving me a segmentation fault when i'm running it. plz help me . i really need to get this to work

This article has been dead for over six months. Start a new discussion instead.