Skip to content

Is it possible to hash bytes into a hasher returned by recursion.NewShort? #1250

Answered by ivokub
aayux asked this question in Q&A
Discussion options

You must be logged in to vote

@aayux - we need to take some care when handling different elements from different fields. See the following full example:

package discussion1250

import (
	"fmt"
	"testing"
	"time"

	"github.com/consensys/gnark-crypto/ecc"
	fr_bw6761 "github.com/consensys/gnark-crypto/ecc/bw6-761/fr"
	groth16_bw6761 "github.com/consensys/gnark/backend/groth16/bw6-761"
	"github.com/consensys/gnark/frontend"
	"github.com/consensys/gnark/std/algebra"
	"github.com/consensys/gnark/std/algebra/emulated/sw_bw6761"
	"github.com/consensys/gnark/std/math/emulated"
	"github.com/consensys/gnark/std/recursion"
	"github.com/consensys/gnark/std/recursion/groth16"
	"github.com/consensys/gnark/test"
)

type circuit struct

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@aayux
Comment options

Comment options

You must be logged in to vote
1 reply
@ivokub
Comment options

Answer selected by aayux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants