public static ECPoint MapPoint(ECEndomorphism endomorphism, ECPoint p) { EndoPreCompInfo precomp = (EndoPreCompInfo)p.Curve.Precompute(p, PRECOMP_NAME, new MapPointCallback(endomorphism, p)); return(precomp.MappedPoint); }
public PreCompInfo Precompute(PreCompInfo existing) { EndoPreCompInfo existingEndo = existing as EndoPreCompInfo; if (CheckExisting(existingEndo, m_endomorphism)) { return(existingEndo); } ECPoint mappedPoint = m_endomorphism.PointMap.Map(m_point); EndoPreCompInfo result = new EndoPreCompInfo(); result.Endomorphism = m_endomorphism; result.MappedPoint = mappedPoint; return(result); }
private bool CheckExisting(EndoPreCompInfo existingEndo, ECEndomorphism endomorphism) { return(null != existingEndo && existingEndo.Endomorphism == endomorphism && existingEndo.MappedPoint != null); }