├── .github └── workflows │ └── go.yml ├── LICENSE ├── README.md ├── curve ├── curves.go └── rationalMaps.go ├── doc.go ├── expander.go ├── expander_test.go ├── field └── fields.go ├── go.mod ├── go.sum ├── hash.go ├── mapping ├── bf.go ├── elligator2.go ├── mapping.go ├── mapping_test.go ├── mtEll2.go ├── sswu.go ├── svdw.go ├── teEll2.go ├── wcEll2.go └── weA0ell2.go ├── suite_test.go ├── suites.go ├── testdata ├── expander │ ├── expand_message_xmd_SHA256_256.json │ ├── expand_message_xmd_SHA256_38.json │ ├── expand_message_xmd_SHA512_38.json │ ├── expand_message_xof_SHAKE128_256.json │ ├── expand_message_xof_SHAKE128_36.json │ └── expand_message_xof_SHAKE256_36.json └── suites │ ├── BLS12381G1_XMD-SHA-256_SSWU_NU_.json │ ├── BLS12381G1_XMD-SHA-256_SSWU_RO_.json │ ├── BLS12381G2_XMD-SHA-256_SSWU_NU_.json │ ├── BLS12381G2_XMD-SHA-256_SSWU_RO_.json │ ├── P256_XMD-SHA-256_SSWU_NU_.json │ ├── P256_XMD-SHA-256_SSWU_RO_.json │ ├── P384_XMD-SHA-384_SSWU_NU_.json │ ├── P384_XMD-SHA-384_SSWU_RO_.json │ ├── P521_XMD-SHA-512_SSWU_NU_.json │ ├── P521_XMD-SHA-512_SSWU_RO_.json │ ├── curve25519_XMD-SHA-512_ELL2_NU_.json │ ├── curve25519_XMD-SHA-512_ELL2_RO_.json │ ├── curve448_XOF-SHAKE256_ELL2_NU_.json │ ├── curve448_XOF-SHAKE256_ELL2_RO_.json │ ├── edwards25519_XMD-SHA-512_ELL2_NU_.json │ ├── edwards25519_XMD-SHA-512_ELL2_RO_.json │ ├── edwards448_XOF-SHAKE256_ELL2_NU_.json │ ├── edwards448_XOF-SHAKE256_ELL2_RO_.json │ ├── secp256k1_XMD-SHA-256_SSWU_NU_.json │ └── secp256k1_XMD-SHA-256_SSWU_RO_.json └── xof └── xof.go /.github/workflows/go.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/.github/workflows/go.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/README.md -------------------------------------------------------------------------------- /curve/curves.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/curve/curves.go -------------------------------------------------------------------------------- /curve/rationalMaps.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/curve/rationalMaps.go -------------------------------------------------------------------------------- /doc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/doc.go -------------------------------------------------------------------------------- /expander.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/expander.go -------------------------------------------------------------------------------- /expander_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/expander_test.go -------------------------------------------------------------------------------- /field/fields.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/field/fields.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/go.sum -------------------------------------------------------------------------------- /hash.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/hash.go -------------------------------------------------------------------------------- /mapping/bf.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/bf.go -------------------------------------------------------------------------------- /mapping/elligator2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/elligator2.go -------------------------------------------------------------------------------- /mapping/mapping.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/mapping.go -------------------------------------------------------------------------------- /mapping/mapping_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/mapping_test.go -------------------------------------------------------------------------------- /mapping/mtEll2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/mtEll2.go -------------------------------------------------------------------------------- /mapping/sswu.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/sswu.go -------------------------------------------------------------------------------- /mapping/svdw.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/svdw.go -------------------------------------------------------------------------------- /mapping/teEll2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/teEll2.go -------------------------------------------------------------------------------- /mapping/wcEll2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/wcEll2.go -------------------------------------------------------------------------------- /mapping/weA0ell2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/mapping/weA0ell2.go -------------------------------------------------------------------------------- /suite_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/suite_test.go -------------------------------------------------------------------------------- /suites.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/suites.go -------------------------------------------------------------------------------- /testdata/expander/expand_message_xmd_SHA256_256.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xmd_SHA256_256.json -------------------------------------------------------------------------------- /testdata/expander/expand_message_xmd_SHA256_38.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xmd_SHA256_38.json -------------------------------------------------------------------------------- /testdata/expander/expand_message_xmd_SHA512_38.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xmd_SHA512_38.json -------------------------------------------------------------------------------- /testdata/expander/expand_message_xof_SHAKE128_256.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xof_SHAKE128_256.json -------------------------------------------------------------------------------- /testdata/expander/expand_message_xof_SHAKE128_36.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xof_SHAKE128_36.json -------------------------------------------------------------------------------- /testdata/expander/expand_message_xof_SHAKE256_36.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/expander/expand_message_xof_SHAKE256_36.json -------------------------------------------------------------------------------- /testdata/suites/BLS12381G1_XMD-SHA-256_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/BLS12381G1_XMD-SHA-256_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/BLS12381G1_XMD-SHA-256_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/BLS12381G1_XMD-SHA-256_SSWU_RO_.json -------------------------------------------------------------------------------- /testdata/suites/BLS12381G2_XMD-SHA-256_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/BLS12381G2_XMD-SHA-256_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/BLS12381G2_XMD-SHA-256_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/BLS12381G2_XMD-SHA-256_SSWU_RO_.json -------------------------------------------------------------------------------- /testdata/suites/P256_XMD-SHA-256_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P256_XMD-SHA-256_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/P256_XMD-SHA-256_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P256_XMD-SHA-256_SSWU_RO_.json -------------------------------------------------------------------------------- /testdata/suites/P384_XMD-SHA-384_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P384_XMD-SHA-384_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/P384_XMD-SHA-384_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P384_XMD-SHA-384_SSWU_RO_.json -------------------------------------------------------------------------------- /testdata/suites/P521_XMD-SHA-512_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P521_XMD-SHA-512_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/P521_XMD-SHA-512_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/P521_XMD-SHA-512_SSWU_RO_.json -------------------------------------------------------------------------------- /testdata/suites/curve25519_XMD-SHA-512_ELL2_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/curve25519_XMD-SHA-512_ELL2_NU_.json -------------------------------------------------------------------------------- /testdata/suites/curve25519_XMD-SHA-512_ELL2_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/curve25519_XMD-SHA-512_ELL2_RO_.json -------------------------------------------------------------------------------- /testdata/suites/curve448_XOF-SHAKE256_ELL2_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/curve448_XOF-SHAKE256_ELL2_NU_.json -------------------------------------------------------------------------------- /testdata/suites/curve448_XOF-SHAKE256_ELL2_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/curve448_XOF-SHAKE256_ELL2_RO_.json -------------------------------------------------------------------------------- /testdata/suites/edwards25519_XMD-SHA-512_ELL2_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/edwards25519_XMD-SHA-512_ELL2_NU_.json -------------------------------------------------------------------------------- /testdata/suites/edwards25519_XMD-SHA-512_ELL2_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/edwards25519_XMD-SHA-512_ELL2_RO_.json -------------------------------------------------------------------------------- /testdata/suites/edwards448_XOF-SHAKE256_ELL2_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/edwards448_XOF-SHAKE256_ELL2_NU_.json -------------------------------------------------------------------------------- /testdata/suites/edwards448_XOF-SHAKE256_ELL2_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/edwards448_XOF-SHAKE256_ELL2_RO_.json -------------------------------------------------------------------------------- /testdata/suites/secp256k1_XMD-SHA-256_SSWU_NU_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/secp256k1_XMD-SHA-256_SSWU_NU_.json -------------------------------------------------------------------------------- /testdata/suites/secp256k1_XMD-SHA-256_SSWU_RO_.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/testdata/suites/secp256k1_XMD-SHA-256_SSWU_RO_.json -------------------------------------------------------------------------------- /xof/xof.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armfazh/h2c-go-ref/HEAD/xof/xof.go --------------------------------------------------------------------------------