LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 08-05-2005, 08:21 AM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Rep: Reputation: 35
hash routine into assembly program


I'd like to include a hashing routine in an assembly program, it looks like I can include a C implementation of some of those but I only have a very basic knowledge of C.

Anyone with some advice, how-to or hint?

Thank you for your help.
 
Old 08-05-2005, 08:09 PM   #2
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
You may compile the hash routines as an object that will be linked with your assembly program, or you may use the -S option to gcc to translate the C code to assembly.
 
Old 08-06-2005, 12:26 AM   #3
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Original Poster
Rep: Reputation: 35
Thank you primo.
My distro (FC2) has 3 versions of md5.c, all different. Only the smaller one goes through gcc -S without error but when displaying the C source, it looks as though it might be just the cypher itself (no input or output passed). It also has 2 versions of sha1.c, both give errors.

Also, the assembly code shown is AS and I use NASM, so it looks like I am probably better off linking a compiled C version of it.

Would you have any suggestion on how to pick a suitable source of the program (md5 or other)?
 
Old 08-06-2005, 01:49 AM   #4
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
What kind of errors are you getting?

There may be some translators from the AT&T format to NASM and viceversa
Browse the web and I'm sure you will find many assembly implementations of MD5 / SHA-1, etc..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupt routine... Elric of Grans Programming 2 07-05-2005 07:11 PM
Problem linking assembly program with C lib. 95se Programming 1 03-08-2005 09:44 PM
Please help me with my assembly program flamesrock Programming 2 01-30-2005 10:27 PM
puzzle about g++ compile options for inline assembly program markbeth Programming 2 09-20-2004 04:30 AM
About startup routine eshwar_ind Programming 18 05-23-2004 02:01 AM


All times are GMT -5. The time now is 08:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration