public IEllipticCurvePoint Invert()
 {
     if (m_Y.Zero)
     {
         return(GetInfinity());
     }
     uint[] items = new uint[m_Modulo.m_Value.Length];
     ModuloOperations.ChangeSign(m_Y.m_Value, m_Modulo.m_Value, items);
     return(new EllipticCurvePointB(m_X, new IntBig(items), m_Z, this));
 }
Example #2
0
 /// <summary>
 /// Negates a specified value
 /// </summary>
 /// <remarks>
 /// Substracting the value from the modulo
 /// </remarks>
 /// <param name="value">The value to negate</param>
 /// <returns>The result of the negate operation</returns>
 public static MIntBig operator -(MIntBig value)
 {
     if (value as object == null)
     {
         throw new ArgumentNullException("value");
     }
     uint[] items = new uint[value.m_Modulo.m_Value.Length];
     ModuloOperations.ChangeSign(value.m_Value.m_Value, value.m_Modulo.m_Value, items);
     return(new MIntBig(new IntBig(items), value.m_Modulo));
 }