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 &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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. |