Lines Matching refs:pBase
2582 * @param pBase The base value.
2585 static int rtBigNumMagnitudeExponentiate(PRTBIGNUM pResult, PCRTBIGNUM pBase, PCRTBIGNUM pExponent)
2587 Assert(pResult != pBase); Assert(pResult != pExponent);
2588 Assert(!pResult->fCurScrambled); Assert(!pBase->fCurScrambled); Assert(!pExponent->fCurScrambled);
2605 return rtBigNumMagnitudeCopy(pResult, pBase);
2612 rc = rtBigNumCloneInternal(&Pow2, pBase);
2663 RTDECL(int) RTBigNumExponentiate(PRTBIGNUM pResult, PCRTBIGNUM pBase, PCRTBIGNUM pExponent)
2665 Assert(pResult != pBase); Assert(pResult != pExponent);
2666 AssertReturn(pResult->fSensitive >= (pBase->fSensitive | pExponent->fSensitive), VERR_BIGNUM_SENSITIVE_INPUT);
2672 rc = rtBigNumUnscramble((PRTBIGNUM)pBase);
2675 RTBIGNUM_ASSERT_VALID(pBase);
2682 pResult->fNegative = pBase->fNegative; /* sign unchanged. */
2683 rc = rtBigNumMagnitudeExponentiate(pResult, pBase, pExponent);
2690 rtBigNumScramble((PRTBIGNUM)pBase);
2707 * @param pBase The base value.
2711 static int rtBigNumMagnitudeModExp(PRTBIGNUM pResult, PRTBIGNUM pBase, PRTBIGNUM pExponent, PRTBIGNUM pModulus)
2713 Assert(pResult != pBase); Assert(pResult != pBase); Assert(pResult != pExponent); Assert(pResult != pModulus);
2714 Assert(!pResult->fCurScrambled); Assert(!pBase->fCurScrambled); Assert(!pExponent->fCurScrambled); Assert(!pModulus->fCurScrambled);
2742 return rtBigNumMagnitudeModulo(pResult, pBase, pModulus);
2755 /* ModBase = pBase or pBase % pModulus depending on the difference in size. */
2757 if (pBase->cUsed <= pModulus->cUsed + pModulus->cUsed / 2)
2758 rc = rtBigNumCloneInternal(&Pow2, pBase);
2760 rc = rtBigNumMagnitudeModulo(rtBigNumInitZeroTemplate(&Pow2, pBase), pBase, pModulus);
2814 RTDECL(int) RTBigNumModExp(PRTBIGNUM pResult, PRTBIGNUM pBase, PRTBIGNUM pExponent, PRTBIGNUM pModulus)
2816 Assert(pResult != pBase); Assert(pResult != pBase); Assert(pResult != pExponent); Assert(pResult != pModulus);
2817 AssertReturn(pResult->fSensitive >= (pBase->fSensitive | pExponent->fSensitive | pModulus->fSensitive),
2824 rc = rtBigNumUnscramble((PRTBIGNUM)pBase);
2827 RTBIGNUM_ASSERT_VALID(pBase);
2838 pResult->fNegative = pModulus->fNegative; /* pBase ^ pExponent / pModulus; result = remainder. */
2839 rc = rtBigNumMagnitudeModExp(pResult, pBase, pExponent, pModulus);
2847 rtBigNumScramble((PRTBIGNUM)pBase);