Skip to content

Commit

Permalink
Merge pull request ipfs/go-verifcid#19 from ipfs/add-poseidon
Browse files Browse the repository at this point in the history
Make poseidon hashes good hashes

This commit was moved from ipfs/go-verifcid@062f619
  • Loading branch information
hsanjuan authored Feb 22, 2023
2 parents 790ce94 + 8f28875 commit 30275b6
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions verifcid/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ const minimumHashLength = 20
const maximumHashLength = 128

var goodset = map[uint64]bool{
mh.SHA2_256: true,
mh.SHA2_512: true,
mh.SHA3_224: true,
mh.SHA3_256: true,
mh.SHA3_384: true,
mh.SHA3_512: true,
mh.SHAKE_256: true,
mh.DBL_SHA2_256: true,
mh.KECCAK_224: true,
mh.KECCAK_256: true,
mh.KECCAK_384: true,
mh.KECCAK_512: true,
mh.BLAKE3: true,
mh.IDENTITY: true,
mh.SHA2_256: true,
mh.SHA2_512: true,
mh.SHA3_224: true,
mh.SHA3_256: true,
mh.SHA3_384: true,
mh.SHA3_512: true,
mh.SHAKE_256: true,
mh.DBL_SHA2_256: true,
mh.KECCAK_224: true,
mh.KECCAK_256: true,
mh.KECCAK_384: true,
mh.KECCAK_512: true,
mh.BLAKE3: true,
mh.IDENTITY: true,
mh.POSEIDON_BLS12_381_A1_FC1: true,
mh.SHA2_256_TRUNC254_PADDED: true,
mh.X11: true,

mh.SHA1: true, // not really secure but still useful
}
Expand Down

0 comments on commit 30275b6

Please sign in to comment.