Edit the MD5 algorithm

This is a discussion on Edit the MD5 algorithm within the Linux Security forums, part of the System Security and Security Related category; Hi All, I would like to edit the MD5 algorithm behavior inside the OpenSSL source code. Normal MD5: ----------- #echo -n &...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-02-2005
cyrustam@gmail.com
 
Posts: n/a
Default Edit the MD5 algorithm

Hi All,

I would like to edit the MD5 algorithm behavior
inside the OpenSSL source code.

Normal MD5:
-----------
#echo -n "hello" |openssl md5
5d41402abc4b2a76b9719d911017c592

#echo -n "XhelloY" |openssl md5
97074cd1b41b9b017e0326420b4ec1e5


Modified MD5:
------------
#echo -n "hello" |openssl md5
97074cd1b41b9b017e0326420b4ec1e5

I would like the algorithm add a "X" at the begining of the string and
add a "Y" at the end of the string then perform the MD5 algorithm.

Is it possible?

Thanks for any replies

Cyrus

Reply With Quote
  #2 (permalink)  
Old 08-02-2005
Jack Masters
 
Posts: n/a
Default Re: Edit the MD5 algorithm

cyrustam@gmail.com wrote:
> Hi All,
>
> I would like to edit the MD5 algorithm behavior
> inside the OpenSSL source code.
>
> Normal MD5:
> -----------
> #echo -n "hello" |openssl md5
> 5d41402abc4b2a76b9719d911017c592
>
> #echo -n "XhelloY" |openssl md5
> 97074cd1b41b9b017e0326420b4ec1e5
>
>
> Modified MD5:
> ------------
> #echo -n "hello" |openssl md5
> 97074cd1b41b9b017e0326420b4ec1e5
>
> I would like the algorithm add a "X" at the begining of the string and
> add a "Y" at the end of the string then perform the MD5 algorithm.
>
> Is it possible?
>

Yes. Probably at the penalty of an extra malloc/memcpy/free. But why in
Murphy's name would you want to break your system in such a way? Much
easier to just do

$ echo -n "hello" | sed 's/^/X/;s/$/Y/' | openssl md5
97074cd1b41b9b017e0326420b4ec1e5

J.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0