ginger-lib
ginger-lib copied to clipboard
Allow personalization in FieldBasedHash gadgets too
Currently, the FieldBasedHash trait init function allows to initialize an implementor with a personalization array of FieldElement.
The FieldBasedHashGadget instead doesn't allow this.
The result of primitive and gadget it's the same if the primitive is initialized with no personalization, or if the gadget takes as additional input the personalization and as many Field Elements as envisioned by the variable-length padding strategy.
Let's modify the gadget to be able to take as input a personalization too, hiding this logic from the user.