Lazarus

Free Pascal => FPC development => Topic started by: Pasha1st on February 24, 2017, 05:09:04 pm

Title: SHA1/MD5 assembler optimization for AMD64
Post by: Pasha1st on February 24, 2017, 05:09:04 pm
I've made assembler optimized version for SHA1/MD5 routines for AMD64 based on i386 code. How can I commit them?
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: balazsszekely on February 24, 2017, 05:40:36 pm
Here: http://bugs.freepascal.org/view_all_bug_page.php
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: Thaddy on February 24, 2017, 08:01:05 pm
Should not be accepted without discussion.
Both algorithms are purely of academical historical  interest.
https://en.wikipedia.org/wiki/SHA-1#SHA-0
https://en.wikipedia.org/wiki/MD5

It would only add confusion to users that do not understand the above and may actually use them.
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: BeniBela on February 24, 2017, 08:33:16 pm
It would be as deprecated as  using a non-utf8 encoding like latin1   >:D
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: Pasha1st on February 25, 2017, 11:06:03 am
http://bugs.freepascal.org/view.php?id=31444 (http://bugs.freepascal.org/view.php?id=31444)
I know that md5 and sha1 are considered as weak hashes now.
In my current task I need to "reverse" sha1 hashes, and I wondered why 32-bit build was much faster than 64-bit one.

BTW that's so bad that there is no sha2 hashes in FPC packages, I'll try to implement them later.
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: marcov on February 25, 2017, 03:02:45 pm
Should not be accepted without discussion.
Both algorithms are purely of academical historical  interest.

In a security context. But nobody said this was a security context.

E.g. I use it for simple deduplication of blocks of measurement data. Nothing wrong with that. I haven't seen sensors for sale that craft blocks specifically to create MD5 hash collisions.
Title: Re: SHA1/MD5 assembler optimization for AMD64
Post by: Thaddy on February 25, 2017, 04:29:52 pm
There are several published sha1 duplicate hashes available on the web. Also known as collisions..
To prove (also for educational purposes) You can simply copy those and their source and prove that they indeed are collisions.
That means you have a Popper's falsification and is philosophically sound proof. As opposed to verification.

https://en.wikipedia.org/wiki/Falsifiability

TinyPortal © 2005-2018