|
ReactOS 0.4.17-dev-1005-g171e1de
|
#include "precomp.h"
Go to the source code of this file.
Macros | |
| #define | SYMCRYPT_FDEF_INT_PNATIVE_UINT(p) ((NATIVE_UINT*) SYMCRYPT_FDEF_INT_PUINT32( p )) |
| #define | SYMCRYPT_FDEF_DIGIT_NNATIVE_UINT ((NATIVE_UINT)(SYMCRYPT_FDEF_DIGIT_SIZE / NATIVE_BYTES)) |
| #define SYMCRYPT_FDEF_DIGIT_NNATIVE_UINT ((NATIVE_UINT)(SYMCRYPT_FDEF_DIGIT_SIZE / NATIVE_BYTES)) |
Definition at line 462 of file fdef_int.c.
| #define SYMCRYPT_FDEF_INT_PNATIVE_UINT | ( | p | ) | ((NATIVE_UINT*) SYMCRYPT_FDEF_INT_PUINT32( p )) |
Definition at line 458 of file fdef_int.c.
| C_ASSERT | ( | (NATIVE_BYTES<=4)||SYMCRYPT_CPU_AMD64|| | SYMCRYPT_CPU_ARM64 | ) |
| C_ASSERT | ( | SYMCRYPT_FDEF_DIGIT_NNATIVE_UINT * | NATIVE_BYTES = =SYMCRYPT_FDEF_DIGIT_SIZE | ) |
| UINT32 SYMCRYPT_CALL SymCryptFdefIntAddMixedSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 113 of file fdef_int.c.
Referenced by SymCryptIntAddMixedSize().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntAddSameSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 98 of file fdef_int.c.
Referenced by SymCryptIntAddSameSize().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntAddUint32 | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| UINT32 | u32Src2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 83 of file fdef_int.c.
Referenced by SymCryptIntAddUint32().
| VOID SYMCRYPT_CALL SymCryptFdefIntDivMod | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _In_ PCSYMCRYPT_DIVISOR | pdDivisor, | ||
| _Out_opt_ PSYMCRYPT_INT | piQuotient, | ||
| _Out_opt_ PSYMCRYPT_INT | piRemainder, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 1219 of file fdef_int.c.
Referenced by SymCryptIntDivMod().
| VOID SYMCRYPT_CALL SymCryptFdefIntDivPow2 | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| SIZE_T | exp, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 469 of file fdef_int.c.
Referenced by SymCryptIntDivPow2().
| PSYMCRYPT_INT SYMCRYPT_CALL SymCryptFdefIntFromDivisor | ( | _In_ PSYMCRYPT_DIVISOR | pdSrc | ) |
Definition at line 915 of file fdef_int.c.
Referenced by SymCryptFdefIntFromModulus(), and SymCryptIntFromDivisor().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntGetBit | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| UINT32 | iBit | ||
| ) |
| UINT32 SYMCRYPT_CALL SymCryptFdefIntGetBits | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| UINT32 | iBit, | ||
| UINT32 | nBits | ||
| ) |
Definition at line 591 of file fdef_int.c.
Referenced by SymCryptIntGetBits().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntIsLessThan | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2 | ||
| ) |
Definition at line 368 of file fdef_int.c.
Referenced by SymCryptIntIsLessThan().
| VOID SYMCRYPT_CALL SymCryptFdefIntModPow2 | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| SIZE_T | exp, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 539 of file fdef_int.c.
Referenced by SymCryptIntModPow2().
| VOID SYMCRYPT_CALL SymCryptFdefIntMulMixedSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 889 of file fdef_int.c.
Referenced by SymCryptFdefIntMulSameSize(), and SymCryptIntMulMixedSize().
| VOID SYMCRYPT_CALL SymCryptFdefIntMulPow2 | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| SIZE_T | Exp, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 407 of file fdef_int.c.
Referenced by SymCryptIntMulPow2().
| VOID SYMCRYPT_CALL SymCryptFdefIntMulSameSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 704 of file fdef_int.c.
Referenced by SymCryptIntMulSameSize().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntMulUint32 | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| UINT32 | Src2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 681 of file fdef_int.c.
Referenced by SymCryptIntMulUint32().
| VOID SYMCRYPT_CALL SymCryptFdefIntNeg | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 394 of file fdef_int.c.
Referenced by SymCryptIntNeg().
| VOID SYMCRYPT_CALL SymCryptFdefIntSetBits | ( | _In_ PSYMCRYPT_INT | piDst, |
| UINT32 | value, | ||
| UINT32 | iBit, | ||
| UINT32 | nBits | ||
| ) |
Definition at line 627 of file fdef_int.c.
Referenced by SymCryptIntSetBits().
| VOID SYMCRYPT_CALL SymCryptFdefIntShr1 | ( | UINT32 | highestBit, |
| _In_ PCSYMCRYPT_INT | piSrc, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 511 of file fdef_int.c.
Referenced by SymCryptIntShr1().
| VOID SYMCRYPT_CALL SymCryptFdefIntSquare | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_ PSYMCRYPT_INT | piDst, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 716 of file fdef_int.c.
Referenced by SymCryptIntSquare().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntSubMixedSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 260 of file fdef_int.c.
Referenced by SymCryptIntSubMixedSize().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntSubSameSize | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| _In_ PCSYMCRYPT_INT | piSrc2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 248 of file fdef_int.c.
Referenced by SymCryptIntSubSameSize().
| UINT32 SYMCRYPT_CALL SymCryptFdefIntSubUint32 | ( | _In_ PCSYMCRYPT_INT | piSrc1, |
| UINT32 | u32Src2, | ||
| _Out_ PSYMCRYPT_INT | piDst | ||
| ) |
Definition at line 236 of file fdef_int.c.
Referenced by SymCryptIntSubUint32().
| VOID SYMCRYPT_CALL SymCryptFdefIntToDivisor | ( | _In_ PCSYMCRYPT_INT | piSrc, |
| _Out_ PSYMCRYPT_DIVISOR | pdDst, | ||
| UINT32 | totalOperations, | ||
| UINT32 | flags, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 922 of file fdef_int.c.
Referenced by SymCryptIntToDivisor().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawAdd | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 45 of file fdef_int.c.
Referenced by SymCryptFdefIntAddMixedSize(), SymCryptFdefIntAddSameSize(), SymCryptFdefModAddGeneric(), and SymCryptFdefModSubGeneric().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawAddC | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
| UINT32 SYMCRYPT_CALL SymCryptFdefRawAddUint32 | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | Src1, |
| UINT32 | Src2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | Dst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 61 of file fdef_int.c.
Referenced by SymCryptFdefIntAddMixedSize(), SymCryptFdefIntAddUint32(), and SymCryptFdefModSetRandomGeneric().
| VOID SYMCRYPT_CALL SymCryptFdefRawDivMod | ( | _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pNum, |
| UINT32 | nDigits, | ||
| _In_ PCSYMCRYPT_DIVISOR | pdDivisor, | ||
| _Out_writes_opt_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pQuotient, | ||
| _Out_writes_opt_(SYMCRYPT_OBJ_NUINT32(pdDivisor)) PUINT32 | pRemainder, | ||
| _Out_writes_bytes_(cbScratch) PBYTE | pbScratch, | ||
| SIZE_T | cbScratch | ||
| ) |
Definition at line 1106 of file fdef_int.c.
Referenced by SymCryptFdefIntDivMod(), SymCryptFdefIntToModElement(), SymCryptFdefModElementSetValueGeneric(), SymCryptFdefModMulGeneric(), SymCryptFdefModSquareGeneric(), and SymCryptFdefModulusInitMontgomeryInternal().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawIsLessThan | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 322 of file fdef_int.c.
Referenced by SymCryptFdefIntIsLessThan(), and SymCryptFdefModSetRandomGeneric().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawIsLessThanC | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 298 of file fdef_int.c.
Referenced by SymCryptFdefRawIsLessThan().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawIsZero | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| UINT32 | nDigits | ||
| ) |
Definition at line 355 of file fdef_int.c.
Referenced by SymCryptFdefIntIsLessThan().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawIsZeroC | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| UINT32 | nDigits | ||
| ) |
Definition at line 336 of file fdef_int.c.
Referenced by SymCryptFdefRawIsZero().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawMaskedAdd | ( | _Inout_updates_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pAcc, |
| _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc, | ||
| UINT32 | mask, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 1070 of file fdef_int.c.
| UINT32 SYMCRYPT_CALL SymCryptFdefRawMaskedAddSubdigit | ( | _Inout_updates_(nUint32) PUINT32 | pAcc, |
| _In_reads_(nUint32) PCUINT32 | pSrc, | ||
| UINT32 | mask, | ||
| UINT32 | nUint32 | ||
| ) |
Definition at line 1048 of file fdef_int.c.
Referenced by SymCryptFdefRawDivMod(), and SymCryptFdefRawMaskedAdd().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawMaskedSub | ( | _Inout_updates_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pAcc, |
| _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc, | ||
| UINT32 | mask, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 1081 of file fdef_int.c.
| VOID SYMCRYPT_CALL SymCryptFdefRawMul | ( | _In_reads_(nDigits1 *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc1, |
| UINT32 | nDigits1, | ||
| _In_reads_(nDigits2 *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc2, | ||
| UINT32 | nDigits2, | ||
| _Out_writes_((nDigits1+nDigits2) *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pDst | ||
| ) |
Definition at line 773 of file fdef_int.c.
Referenced by SymCryptFdefIntMulMixedSize(), SymCryptFdefModMulGeneric(), SymCryptFdefModMulMontgomery(), and SymCryptFdefModSetPostMontgomery().
| VOID SYMCRYPT_CALL SymCryptFdefRawMulC | ( | _In_reads_(nDigits1 *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc1, |
| UINT32 | nDigits1, | ||
| _In_reads_(nDigits2 *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc2, | ||
| UINT32 | nDigits2, | ||
| _Out_writes_((nDigits1+nDigits2) *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pDst | ||
| ) |
Definition at line 740 of file fdef_int.c.
Referenced by SymCryptFdefRawMul().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawMultSubUint32 | ( | _Inout_updates_(nUint32+1) PUINT32 | pAcc, |
| _In_reads_(nUint32) PCUINT32 | pSrc1, | ||
| UINT32 | Src2, | ||
| UINT32 | nUint32 | ||
| ) |
Definition at line 1008 of file fdef_int.c.
Referenced by SymCryptFdefRawDivMod().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawNeg | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| UINT32 | carryIn, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 213 of file fdef_int.c.
Referenced by SymCryptFdefIntNeg(), SymCryptFdefIntSubMixedSize(), and SymCryptFdefModulusInitMontgomeryInternal().
| VOID SYMCRYPT_CALL SymCryptFdefRawSquare | ( | _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc, |
| UINT32 | nDigits, | ||
| _Out_writes_(2 *nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pDst | ||
| ) |
Definition at line 866 of file fdef_int.c.
Referenced by SymCryptFdefIntSquare(), SymCryptFdefModSquareGeneric(), and SymCryptFdefModSquareMontgomery().
| VOID SYMCRYPT_CALL SymCryptFdefRawSquareC | ( | _In_reads_(nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PCUINT32 | pSrc, |
| UINT32 | nDigits, | ||
| _Out_writes_(2 *nDigits *SYMCRYPT_FDEF_DIGIT_NUINT32) PUINT32 | pDst | ||
| ) |
Definition at line 796 of file fdef_int.c.
Referenced by SymCryptFdefRawSquare().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawSub | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 174 of file fdef_int.c.
Referenced by SymCryptFdefIntSubMixedSize(), SymCryptFdefIntSubSameSize(), SymCryptFdefModAddGeneric(), SymCryptFdefModNegGeneric(), SymCryptFdefModSubGeneric(), and SymCryptFdefMontgomeryReduceC().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawSubC | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 150 of file fdef_int.c.
Referenced by SymCryptFdefRawSub().
| UINT32 SYMCRYPT_CALL SymCryptFdefRawSubUint32 | ( | _In_reads_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PCUINT32 | pSrc1, |
| UINT32 | Src2, | ||
| _Out_writes_bytes_(nDigits *SYMCRYPT_FDEF_DIGIT_SIZE) PUINT32 | pDst, | ||
| UINT32 | nDigits | ||
| ) |
Definition at line 190 of file fdef_int.c.
Referenced by SymCryptFdefIntSubMixedSize(), SymCryptFdefIntSubUint32(), SymCryptFdefModElementSetValueNegUint32(), and SymCryptFdefModSetRandomGeneric().