Interchangeability of NonNativeFieldVar and FpVar for FieldVar #99
Labels
D-hard
Difficulty: hard
P-low
Priority: low
T-design
Type: discuss API design and/or research
T-tracking
Type: tracking issue
Summary
This issue is to discuss how to make
NonNativeFieldVar
a drop-in replacement forFieldVar
in curve operations.Problem Definition
One of the reasons that we implemented FieldVar for NonNativeFieldVar is to allow it to be a drop-in replacement of FpVar, so that one doesn't need to build a hierarchy of nonnative primitives.
This, however, is not covered by the current implementation, see:
https://github.com/arkworks-rs/r1cs-std/blob/master/src/groups/curves/short_weierstrass/mod.rs#L44
It would be ideal, though, to lift this restriction. However, we want to make sure that we don't change the existing writing system---it would be highly inconvenient to use
because it introduces one more param
CF
.A possible workaround, though not favorable, is to define
GeneralizedProjectVar<P, F, CF>
and letProjective<P, F> = GeneralizedProjectVar<P, F, <P::BaseField as Field>::BasePrimeField>
. This is not favored since nonnative field is not important to this level.Proposal
We need to think about what would be the best way to do this.
For Admin Use
The text was updated successfully, but these errors were encountered: