Esempio n. 1
0
        public static ECPoint MapPoint(ECEndomorphism endomorphism, ECPoint p)
        {
            EndoPreCompInfo precomp = (EndoPreCompInfo)p.Curve.Precompute(p, PRECOMP_NAME,
                                                                          new MapPointCallback(endomorphism, p));

            return(precomp.MappedPoint);
        }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
 private bool CheckExisting(EndoPreCompInfo existingEndo, ECEndomorphism endomorphism)
 {
     return(null != existingEndo &&
            existingEndo.Endomorphism == endomorphism &&
            existingEndo.MappedPoint != null);
 }