๐ŸŸข ๆŽจ่ไฝฟ็”จ ๐ŸŸก ๅฏ็”จไฝ†่ฐจๆ…Ž ๐Ÿ”ด ไธๆŽจ่

๐Ÿ” Hash Functions

NameTypeUse CaseZK-FriendlyRecommendImplementationsNotes
PoseidonPermutationMerkle Tree, Commitment, PRFโœ…๐ŸŸขCircom, Arkworks, Halo2SNARK-native, fast in R1CS/PLONK
MiMCFeistel-likeMerkle Tree, PRFโœ…๐ŸŸขCircom, ArkworksMinimal constraints per round
RescueSpongeHash, PRFโœ…๐ŸŸกHalo2, WinterfellAlgebraic structure, STARK-friendly
PedersenEC-basedCommitmentโš ๏ธ Partial๐ŸŸกCircom, Sapling, ArkworksCurve-dependent
SHA2/SHA3StandardCompatibility with EVM systemsโŒ๐Ÿ”ดCircomVery high cost in R1CS

๐ŸŒฒ Merkle Tree Primitives

VariantHash UsedZK-FriendlyRecommendImplementationsNotes
Poseidon MTPoseidonโœ…๐ŸŸขCircom, NoirFully SNARK-native
MiMC MTMiMCโœ…๐ŸŸขCircomLightweight and efficient
Pedersen MTPedersenโš ๏ธ Moderate๐ŸŸกSaplingLegacy zkApp use
SHA MTSHA2/SHA3โŒ๐Ÿ”ดCircomExpensive in constraint count

๐Ÿงพ Commitment Schemes

SchemeBindingHidingZK-FriendlyRecommendImplementationsNotes
Pedersenโœ…โœ…โœ…๐ŸŸขCircom, ArkworksFast, curve-based
Poseidon-basedโœ…โœ…โœ…๐ŸŸขNoir, Halo2Fully arithmetized
KZG Commitmentโœ…โŒโš ๏ธ Limited๐ŸŸกPLONK (zkEVMs)Trusted setup required

๐Ÿ“ Polynomial-Related Primitives

PrimitiveUse CaseZK-FriendlyRecommendImplementationsNotes
FFTPolynomial commitmentโœ…๐ŸŸขPLONK, STARK systemsCore of modern SNARKs
Lagrange Interp.Witness constructionโœ…๐ŸŸขInternalUsed in identity checks
Kate CommitmentOpenings for poly evalsโœ…๐ŸŸกPLONK, zkEVMPairing-based, used in KZG

๐Ÿ”ฃ Bit-level Encodings

PrimitiveUse CaseZK-FriendlyRecommendImplementationsNotes
Bit DecompositionRange proofs, logicโœ…๐ŸŸขCircom, Halo2Common, but costly
Field PackingEfficient encodingโœ…๐ŸŸขCircom, ArkworksReduce input size

๐Ÿ”— Application Mapping Quick Guide

ApplicationRecommended Primitive(s)Notes
Efficient Merkle TreePoseidon, MiMCAvoid SHA-based in ZK
Privacy-preserving commitmentPedersen, Poseidon-basedGroup or native
Range / logic constraintsBit DecompositionOptimize with custom gadgets
Public compatibility (EVM)SHA2, Keccak256Only if EVM compatibility needed
Polynomial-based proving systemFFT, KZG, Lagrange Interp.Backbone of PLONK/STARK

๐Ÿ“Ž Legend

  • Use Case๏ผšไธป่ฆ้€‚็”จๅœบๆ™ฏ
  • ZK-Friendly๏ผšๆ˜ฏๅฆไธบไฝŽ็บฆๆŸ่ฎพ่ฎก
  • Recommend๏ผšๅผ€ๅ‘่€…ไผ˜ๅ…ˆ็บง้€‰ๆ‹ฉๅปบ่ฎฎ
  • Implementations๏ผšๆœ‰ๆˆ็†Ÿๅฎž็Žฐ็š„ๆก†ๆžถ๏ผˆCircom, Arkworks, Noir, Halo2 ็ญ‰๏ผ‰