coniks-go icon indicating copy to clipboard operation
coniks-go copied to clipboard

Create generic interface for hash functions

Open vqhuy opened this issue 8 years ago • 5 comments

Create PADHasher & TreeHasher interface to allow developers to use their own hash function.

  • Change the default hash function to SHA512/256

Part of #50 and #177

In favor of https://github.com/google/trillian/pull/694, I implemented 29aa6a2b46cc706d0741900b53d39ee38e1f33ac. Please let me know what you think.

vqhuy avatar Jun 19 '17 17:06 vqhuy

Would there be any interest in trying to syncronize this interface with the one in google/trillian#670 ?

gdbelvin avatar Jun 21 '17 15:06 gdbelvin

I like @gdbelvin's idea. It makes it easier to sync up and might increase compatibility. Be aware that the interface described in google/trillian#670 isn't fully implemented yet (but will be soon).

liamsi avatar Jun 21 '17 16:06 liamsi

Would there be any interest in trying to syncronize this interface with the one in google/trillian#670 ?

Definitely.

vqhuy avatar Jun 21 '17 16:06 vqhuy

Glad to see this PR moving forward! Thanks @Liamsi and @c633. I'll ask the Trillian team if we can use a [32]byte under the hood for consistency. Perhaps we can get some test vectors for cross verification?

gdbelvin avatar Oct 26 '17 17:10 gdbelvin

Perhaps we can get some test vectors for cross verification?

We would love to do that.

vqhuy avatar Oct 26 '17 17:10 vqhuy