Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Help creating Tiger hash function in Python

Reply
Thread Tools

Help creating Tiger hash function in Python

 
 
Mark Livingstone
Guest
Posts: n/a
 
      05-07-2007
Hello!

I am a Uni student and for a project in Information Systems Security due
in just under two weeks, I have tried to make a Python version of the
Biham / Anderson Tiger Hash function. I have put the original C source
and my two files Tiger.py and doHash.py on my website:

http://www.users.on.net/~mlivingstone/

My problems are doubtless basic since I have been teaching myself
Python. My best knowledge is Java

Firstly, in doHash.py, I cannot invoke tiger() without getting unbounded
errors and / or complaints about no such method.

The C code is peppered with typedefs for word64 and word 32 and byte and
I am unsure how to treat these.

t2, t3, t4 are some sort of index into the S-Box table. How can I
pythonise them?

I don't expect you to write my program for me but any help / clues would
be gratefully received. I have been using the latest Core Python
Programming 2E by Wesley Chun which has been very helpful but I have
not found help for these specific areas.

I have taken out all the Bigendian code, Alpha code and ternary operator
within ternary operator code but the C is still a bit complex for me.

Many thanks in advance for your help

MarkL

 
Reply With Quote
 
 
 
 
Vyacheslav Maslov
Guest
Posts: n/a
 
      05-07-2007
> I am a Uni student and for a project in Information Systems Security due
> in just under two weeks, I have tried to make a Python version of the
> Biham / Anderson Tiger Hash function. I have put the original C source
> and my two files Tiger.py and doHash.py on my website:
>
> http://www.users.on.net/~mlivingstone/
>
> My problems are doubtless basic since I have been teaching myself
> Python. My best knowledge is Java
>
> Firstly, in doHash.py, I cannot invoke tiger() without getting unbounded
> errors and / or complaints about no such method.


First of all you should create an instance of you Tiger class, you try
to do this by line:
x = Tiger.Tiger

But this is wrong, because you should call constructor and pass all
necessary parameters, in very simple case:
x = Tiger.Tiger() (if there is no constructor parameters)

--
Vyacheslav Maslov
SWsoft, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hash of hash of hash of hash in c++ rp C++ 1 11-10-2011 04:45 PM
Creating an alias to an existing hash (from a hash reference) jl_post@hotmail.com Perl Misc 14 12-22-2009 08:12 PM
Hash#select returns an array but Hash#reject returns a hash... Srijayanth Sridhar Ruby 19 07-02-2008 12:49 PM
MySQL-python-1.2.1_p2, Python 2.5 and OS X Tiger scum Python 1 12-08-2006 04:57 PM
Re: Tiger Hash Function in Python Tino Lange Python 0 06-26-2003 12:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57