MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetCofactor

Method GetCofactor

src/cryptopp/eccrypto.cpp:567–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565
566template <class EC>
567Integer DL_GroupParameters_EC<EC>::GetCofactor() const
568{
569 if (!m_k)
570 {
571 Integer q = GetCurve().FieldSize();
572 Integer qSqrt = q.SquareRoot();
573 m_k = (q+2*qSqrt+1)/m_n;
574 }
575
576 return m_k;
577}
578
579template <class EC>
580Integer DL_GroupParameters_EC<EC>::ConvertElementToInteger(const Element &element) const

Callers 5

DEREncodeMethod · 0.80
DEREncodeMethod · 0.80
AgreeMethod · 0.80

Calls 1

SquareRootMethod · 0.80

Tested by

no test coverage detected