private GE rand_point() { Scalar x = rand_scalar(); GEJ pointj = ECMultGenContext.Instance.MultGen(x); return(pointj.ToGroupElement()); }
// Since GEJ.IsValidVariable, this constructor is private private GroupElement(GEJ groupElementJacobian) { if (groupElementJacobian.IsInfinity) { LazyGe = new Lazy <GE>(() => GE.Infinity); Gej = Ge.ToGroupElementJacobian(); // eagerly initialize Ge property } else { GE ComputeAffineCoordinates() { var groupElement = groupElementJacobian.ToGroupElement(); return(new GE(groupElement.x.Normalize(), groupElement.y.Normalize())); } LazyGe = new Lazy <GE>(ComputeAffineCoordinates); // avoid computing affine coordinates until needed Gej = groupElementJacobian; } }
public GroupElement(GEJ groupElement) : this(groupElement.ToGroupElement()) { }
private GroupElement(GEJ gej) { this.ge = gej.ToGroupElement(); }