Hash upgradability

From Erights

(Difference between revisions)
Jump to: navigation, search
m (typos)
m (sigh)
Line 5: Line 5:
—[[User:Kevin Reid|Kevin Reid]] 17:30, 29 August 2009 (CDT)
—[[User:Kevin Reid|Kevin Reid]] 17:30, 29 August 2009 (CDT)
-
=={{Proposals}}==
+
==Proposals==
* Simple: rename cryptoHash to sha1Hash. Add other algorithms as desired. --[[User:Kevin Reid|Kevin Reid]] 17:30, 29 August 2009 (CDT)
* Simple: rename cryptoHash to sha1Hash. Add other algorithms as desired. --[[User:Kevin Reid|Kevin Reid]] 17:30, 29 August 2009 (CDT)

Revision as of 22:44, 29 August 2009

E integers have the operation cryptoHash/0 which performs a SHA-1 hash on the two's complement representation of the number. This will be an unfortunate permanent choice once SHA-1 is broken.

We should switch to an interface which acknowledges the need for hash algorithm upgrade.

Kevin Reid 17:30, 29 August 2009 (CDT)

Proposals

  • Simple: rename cryptoHash to sha1Hash. Add other algorithms as desired. --Kevin Reid 17:30, 29 August 2009 (CDT)
Disadvantage of this: Does not allow code to be sensibly generic over hash algorithms without taking an arbitrary verb to call on Integer. --Kevin Reid 17:30, 29 August 2009 (CDT)
Personal tools
more tools