Enforce that Fr of Engine is the scalar for curve points, for simpler downstream abstractions.

This commit is contained in:
Sean Bowe 2017-11-12 16:19:08 -07:00
parent 5d9f77f5bf
commit 471db6ab27
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ pub trait CurveProjective: PartialEq +
rand::Rand +
'static
{
type Engine: Engine;
type Engine: Engine<Fr=Self::Scalar>;
type Scalar: PrimeField;
type Base: SqrtField;
type Affine: CurveAffine<Projective=Self, Scalar=Self::Scalar>;
@ -166,7 +166,7 @@ pub trait CurveAffine: Copy +
Eq +
'static
{
type Engine: Engine;
type Engine: Engine<Fr=Self::Scalar>;
type Scalar: PrimeField;
type Base: SqrtField;
type Projective: CurveProjective<Affine=Self, Scalar=Self::Scalar>;