|
ReactOS 0.4.17-dev-1005-g171e1de
|

Go to the source code of this file.
| #define SYMCRYPT_RABINMILLER_DIGIT_CYCLES (25300) |
Definition at line 29 of file fdef_general.c.
| #define SYMCRYPT_TRIALDIVISION_DIGIT_REDUCTION_CYCLES (18) |
Definition at line 27 of file fdef_general.c.
| #define SYMCRYPT_TRIALDIVISION_DIVIDE_TEST_CYCLES (16) |
Definition at line 28 of file fdef_general.c.
| #define SYMCRYPT_TRIALDIVISION_MAX_SMALL_PRIME (1<<22) |
Definition at line 34 of file fdef_general.c.
| C_ASSERT | ( | SYMCRYPT_FDEF_DIGIT_SIZE >= | 8 | ) |
| C_ASSERT | ( | ) |
| C_ASSERT | ( | SYMCRYPT_TRIALDIVISION_MAX_SMALL_PRIME<= | UINT32_MAX | ) |
| C_ASSERT | ( | SYMCRYPT_TRIALDIVISION_MAX_SMALL_PRIME | = =((UINT32) SYMCRYPT_TRIALDIVISION_MAX_SMALL_PRIME) | ) |
| UINT32 SYMCRYPT_CALL SymCryptFdefBitsizeOfUint32 | ( | UINT32 | v | ) |
Definition at line 399 of file fdef_general.c.
Referenced by SymCryptFdefIntBitsizeOfValue().
| VOID SYMCRYPT_CALL SymCryptFdefClaimScratch | ( | PBYTE | pbScratch, |
| SIZE_T | cbScratch, | ||
| SIZE_T | cbMin | ||
| ) |
Definition at line 912 of file fdef_general.c.
Referenced by SymCryptFdefIntMulMixedSize(), SymCryptFdefIntSquare(), SymCryptFdefIntToDivisor(), SymCryptFdefModAddGeneric(), SymCryptFdefModElementGetValue(), SymCryptFdefModElementSetValueGeneric(), SymCryptFdefModElementSetValueNegUint32(), SymCryptFdefModElementSetValueUint32Generic(), SymCryptFdefModElementToIntGeneric(), SymCryptFdefModMulGeneric(), SymCryptFdefModNegGeneric(), SymCryptFdefModSetRandomGeneric(), SymCryptFdefModSquareGeneric(), SymCryptFdefModSubGeneric(), and SymCryptFdefRawDivMod().
| VOID SYMCRYPT_CALL SymCryptFdefConditionalSwap | ( | _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbSrc1, |
| _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbSrc2, | ||
| UINT32 | nDigits, | ||
| UINT32 | cond | ||
| ) |
Definition at line 122 of file fdef_general.c.
Referenced by SymCryptFdefIntConditionalSwap(), and SymCryptFdefModElementConditionalSwap().
| VOID SYMCRYPT_CALL SymCryptFdefConditionalSwapC | ( | _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbSrc1, |
| _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbSrc2, | ||
| UINT32 | nDigits, | ||
| UINT32 | cond | ||
| ) |
Definition at line 91 of file fdef_general.c.
Referenced by SymCryptFdefConditionalSwap().
| PCSYMCRYPT_TRIALDIVISION_CONTEXT SYMCRYPT_CALL SymCryptFdefCreateTrialDivisionContext | ( | UINT32 | nDigits | ) |
Definition at line 1136 of file fdef_general.c.
Referenced by SymCryptCreateTrialDivisionContext().
Definition at line 133 of file fdef_general.c.
Referenced by SymCryptDigitsFromBits().
| PSYMCRYPT_DIVISOR SYMCRYPT_CALL SymCryptFdefDivisorAllocate | ( | UINT32 | nDigits | ) |
Definition at line 796 of file fdef_general.c.
Referenced by SymCryptDivisorAllocate().
| VOID SymCryptFdefDivisorCopy | ( | _In_ PCSYMCRYPT_DIVISOR | pdSrc, |
| _Out_ PSYMCRYPT_DIVISOR | pdDst | ||
| ) |
Definition at line 891 of file fdef_general.c.
Referenced by SymCryptDivisorCopy().
| VOID SymCryptFdefDivisorCopyFixup | ( | _In_ PCSYMCRYPT_DIVISOR | pdSrc, |
| _Out_ PSYMCRYPT_DIVISOR | pdDst | ||
| ) |
Definition at line 878 of file fdef_general.c.
Referenced by SymCryptFdefDivisorCopy(), and SymCryptFdefModulusCopy().
| PSYMCRYPT_DIVISOR SYMCRYPT_CALL SymCryptFdefDivisorCreate | ( | _Out_writes_bytes_(cbBuffer) PBYTE | pbBuffer, |
| SIZE_T | cbBuffer, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 842 of file fdef_general.c.
Referenced by SymCryptDivisorCreate(), SymCryptFdefDivisorAllocate(), and SymCryptFdefModulusCreate().
| VOID SYMCRYPT_CALL SymCryptFdefFreeTrialDivisionContext | ( | PCSYMCRYPT_TRIALDIVISION_CONTEXT | pContext | ) |
Definition at line 1383 of file fdef_general.c.
Referenced by SymCryptFreeTrialDivisionContext().
| VOID SYMCRYPT_CALL SymCryptFdefInitTrialDivisionGroup | ( | PSYMCRYPT_TRIALDIVISION_GROUP | pGroup, |
| UINT32 | nPrimes, | ||
| UINT32 | primeProd | ||
| ) |
Definition at line 1016 of file fdef_general.c.
Referenced by SymCryptFdefCreateTrialDivisionContext().
| VOID SYMCRYPT_CALL SymCryptFdefInitTrialdivisionPrime | ( | UINT32 | prime, |
| _Out_ PSYMCRYPT_TRIALDIVISION_PRIME | pPrime | ||
| ) |
Definition at line 998 of file fdef_general.c.
Referenced by SymCryptFdefCreateTrialDivisionContext().
| PSYMCRYPT_INT SYMCRYPT_CALL SymCryptFdefIntAllocate | ( | UINT32 | nDigits | ) |
Definition at line 165 of file fdef_general.c.
Referenced by SymCryptIntAllocate().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntBitsizeOfObject | ( | _In_ PCSYMCRYPT_INT | piSrc | ) |
Definition at line 328 of file fdef_general.c.
Referenced by SymCryptIntBitsizeOfObject().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntBitsizeOfValue | ( | _In_ PCSYMCRYPT_INT | piSrc | ) |
Definition at line 451 of file fdef_general.c.
Referenced by SymCryptIntBitsizeOfValue().
| VOID SYMCRYPT_CALL SymCryptFdefIntConditionalCopy | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Inout_ PSYMCRYPT_INT | piDst, | ||
| UINT32 | cond | ||
| ) |
Definition at line 298 of file fdef_general.c.
Referenced by SymCryptIntConditionalCopy().
| VOID SYMCRYPT_CALL SymCryptFdefIntConditionalSwap | ( | _Inout_ PSYMCRYPT_INT | piSrc1, |
| _Inout_ PSYMCRYPT_INT | piSrc2, | ||
| UINT32 | cond | ||
| ) |
Definition at line 313 of file fdef_general.c.
Referenced by SymCryptIntConditionalSwap().
| VOID SymCryptFdefIntCopy | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 259 of file fdef_general.c.
Referenced by SymCryptFdefIntToDivisor(), and SymCryptIntCopy().
| VOID SymCryptFdefIntCopyFixup | ( | _In_ PCSYMCRYPT_INT | pSrc, |
| _Out_ PSYMCRYPT_INT | pDst | ||
| ) |
Definition at line 248 of file fdef_general.c.
Referenced by SymCryptFdefDivisorCopyFixup().
| SYMCRYPT_ERROR SymCryptFdefIntCopyMixedSize | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 343 of file fdef_general.c.
Referenced by SymCryptIntCopyMixedSize().
| PSYMCRYPT_INT SYMCRYPT_CALL SymCryptFdefIntCreate | ( | _Out_writes_bytes_(cbBuffer) PBYTE | pbBuffer, |
| SIZE_T | cbBuffer, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 213 of file fdef_general.c.
Referenced by SymCryptIntCreate().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntFindSmallDivisor | ( | _In_ PCSYMCRYPT_TRIALDIVISION_CONTEXT | pContext, |
| _In_ PCSYMCRYPT_INT | piSrc, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 1393 of file fdef_general.c.
Referenced by SymCryptIntFindSmallDivisor().
| SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptFdefIntGetValue | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_writes_bytes_(cbDst) PBYTE | pbDst, | ||
| SIZE_T | cbDst, | ||
| SYMCRYPT_NUMBER_FORMAT | format | ||
| ) |
Definition at line 695 of file fdef_general.c.
Referenced by SymCryptIntGetValue().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntGetValueLsbits32 | ( | _In_ PCSYMCRYPT_INT | piSrc | ) |
Definition at line 713 of file fdef_general.c.
Referenced by SymCryptIntGetValueLsbits32().
| UINT64 SYMCRYPT_CALL SymCryptFdefIntGetValueLsbits64 | ( | _In_ PCSYMCRYPT_INT | piSrc | ) |
Definition at line 721 of file fdef_general.c.
Referenced by SymCryptIntGetValueLsbits64().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntIsEqual | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2 | ||
| ) |
Definition at line 758 of file fdef_general.c.
Referenced by SymCryptIntIsEqual().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntIsEqualUint32 | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ UINT32 | u32Src2 | ||
| ) |
Definition at line 749 of file fdef_general.c.
Referenced by SymCryptIntIsEqualUint32().
| VOID SymCryptFdefIntMaskedCopy | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Inout_ PSYMCRYPT_INT | piDst, | ||
| UINT32 | mask | ||
| ) |
Definition at line 280 of file fdef_general.c.
Referenced by SymCryptIntMaskedCopy().
| SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptFdefIntSetValue | ( | _In_reads_bytes_(cbSrc) PCBYTE | pbSrc, |
| SIZE_T | cbSrc, | ||
| SYMCRYPT_NUMBER_FORMAT | format, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 601 of file fdef_general.c.
Referenced by SymCryptIntSetValue().
| VOID SYMCRYPT_CALL SymCryptFdefIntSetValueUint32 | ( | UINT32 | u32Src, |
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 497 of file fdef_general.c.
Referenced by SymCryptIntSetValueUint32().
| VOID SYMCRYPT_CALL SymCryptFdefIntSetValueUint64 | ( | UINT64 | u64Src, |
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 511 of file fdef_general.c.
Referenced by SymCryptIntSetValueUint64().
| VOID SYMCRYPT_CALL SymCryptFdefMaskedCopy | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCBYTE | pbSrc, |
| _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbDst, | ||
| UINT32 | nDigits, | ||
| UINT32 | mask | ||
| ) |
Definition at line 74 of file fdef_general.c.
Referenced by SymCryptEcpointMaskedCopy(), SymCryptFdefIntConditionalCopy(), SymCryptFdefIntMaskedCopy(), SymCryptFdefModAddGeneric(), SymCryptFdefModElementMaskedCopy(), SymCryptFdefModSubGeneric(), and SymCryptFdefMontgomeryReduceC().
| VOID SYMCRYPT_CALL SymCryptFdefMaskedCopyC | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCBYTE | pbSrc, |
| _Inout_updates_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PBYTE | pbDst, | ||
| UINT32 | nDigits, | ||
| UINT32 | mask | ||
| ) |
Definition at line 40 of file fdef_general.c.
Referenced by SymCryptFdefMaskedCopy().
| UINT32 SYMCRYPT_CALL SymCryptFdefNumberofDigitsFromInt | ( | _In_ PCSYMCRYPT_INT | piSrc | ) |
Definition at line 337 of file fdef_general.c.
| SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptFdefRawGetValue | ( | _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc, |
| UINT32 | nDigits, | ||
| _Out_writes_bytes_(cbDst) PBYTE | pbDst, | ||
| SIZE_T | cbDst, | ||
| SYMCRYPT_NUMBER_FORMAT | format | ||
| ) |
Definition at line 619 of file fdef_general.c.
Referenced by SymCryptFdefDecideModulusType(), SymCryptFdefIntGetValue(), and SymCryptFdefModElementGetValue().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawIsEqualUint32 | ( | _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc1, |
| UINT32 | nDigits, | ||
| _In_ UINT32 | u32Src2 | ||
| ) |
Definition at line 730 of file fdef_general.c.
Referenced by SymCryptDlkeyGenerate(), SymCryptFdefIntIsEqualUint32(), and SymCryptFdefModNegGeneric().
| SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptFdefRawSetValue | ( | _In_reads_bytes_(cbSrc) PCBYTE | pbSrc, |
| SIZE_T | cbSrc, | ||
| SYMCRYPT_NUMBER_FORMAT | format, | ||
| _Out_writes_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 524 of file fdef_general.c.
Referenced by SymCryptFdefIntSetValue(), and SymCryptFdefModElementSetValueGeneric().
| UINT32 SYMCRYPT_CALL SymCryptFdefSizeofDivisorFromDigits | ( | UINT32 | nDigits | ) |
Definition at line 826 of file fdef_general.c.
Referenced by SymCryptFdefDivisorAllocate(), SymCryptFdefModulusCopyFixupMontgomery(), SymCryptFdefModulusInitMontgomeryInternal(), SymCryptFdefSizeofModulusFromDigits(), and SymCryptSizeofDivisorFromDigits().
| UINT32 SYMCRYPT_CALL SymCryptFdefSizeofIntFromDigits | ( | UINT32 | nDigits | ) |
Definition at line 196 of file fdef_general.c.
Referenced by SymCryptFdefIntAllocate(), SymCryptFdefIntCreate(), SymCryptFdefSizeofDivisorFromDigits(), and SymCryptSizeofIntFromDigits().
| UINT32 SYMCRYPT_CALL SymCryptGenerateSmallPrimes | ( | UINT32 | maxPrime, |
| PUINT32 * | ppList | ||
| ) |
Definition at line 1040 of file fdef_general.c.
Referenced by SymCryptFdefCreateTrialDivisionContext().
Definition at line 932 of file fdef_general.c.
Referenced by SymCryptFdefInitTrialdivisionPrime(), and SymCryptFdefIntToModulus().
| FORCEINLINE UINT32 SymCryptIsMultipleOfSmallPrime | ( | UINT64 | value, |
| PCSYMCRYPT_TRIALDIVISION_PRIME | pPrime | ||
| ) |
Definition at line 1009 of file fdef_general.c.
Referenced by SymCryptFdefIntFindSmallDivisor().
| UINT32 SymCryptTestTrialdivisionMaxSmallPrime | ( | _In_ PCSYMCRYPT_TRIALDIVISION_CONTEXT | pContext | ) |
Definition at line 925 of file fdef_general.c.