Closed hdevalence closed 8 months ago
Unblocked by #66.
@hdevalence Implementing the arkworks PrimeField
trait seems to require satisfying many trait bounds. PrimeField
further includes type BigInt: BigInteger
with even more trait bounds. I thought about using type BigInt = BigInt<N>
since an existing BigIntBigInteger
trait, but BigInteger
is a smart wrapper around hard-coded u64-bit limbs, which wouldn't work for our context.
I'm wondering what the optimal approach to implementing the PrimeField
trait is, and if it's in fact simpler than I suspect?
Yes, there are lots of trait bounds. I think it makes sense to start with just one impl — say Fq, u32 — and see about filling that in. For the BigInt bound we can just use the arkworks type. It's not used for operations that are on the critical path so it doesn't have to be fast. I think it's used for stuff like debug impls.
This isn't optional yet though, so not closing quite yet.
Blocked by https://github.com/penumbra-zone/decaf377/issues/65