You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that I would later like to be able to compare the integer pre-image of this hash with a frontend.Variable (IsLessOrEqual) whose value is another uint64 type. Is there a straightforward way to do this? It is unclear to me how numerical values can be hashed in both the frontend (the circuit) and the backend (the prover).
Secondly, I am unsure if using uint64 values will work correctly with the curve arithmetic. Should I be computing everything modulo something?
If it makes a difference, the integer values are actually the int64 outputs of time.Now().Unix(), the current time in Unix format.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I couldn't find a way to use MiMC directly on
unint64
types. At the moment, I am doing the following:The problem is that I would later like to be able to compare the integer pre-image of this hash with a
frontend.Variable
(IsLessOrEqual
) whose value is anotheruint64
type. Is there a straightforward way to do this? It is unclear to me how numerical values can be hashed in both the frontend (the circuit) and the backend (the prover).Secondly, I am unsure if using
uint64
values will work correctly with the curve arithmetic. Should I be computing everything modulo something?If it makes a difference, the integer values are actually the
int64
outputs oftime.Now().Unix()
, the current time in Unix format.Beta Was this translation helpful? Give feedback.
All reactions