Skip to content

Commit

Permalink
OcCryptoLib: Use scratch buffer in BN words for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Mar 6, 2022
1 parent d9e2c49 commit d12c413
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Library/OcCryptoLib/BigNumLibInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ BigNumOrWord (
@param[in] A The dividend.
@param[in] NumWordsA The number of Words of A.
@param[in] B The divisor.
@param[in] Memory Scratch buffer 2 * NumWordsA * OC_BN_WORD_SIZE.
@param[in] ModTmp Scratch buffer 2 * NumWordsA * OC_BN_WORD_SIZE.
**/
VOID
BigNumMod (
Expand All @@ -104,7 +104,7 @@ BigNumMod (
IN CONST OC_BN_WORD *A,
IN OC_BN_NUM_WORDS NumWordsA,
IN CONST OC_BN_WORD *B,
IN VOID *Memory
IN OC_BN_WORD *ModTmp
);

/**
Expand Down
4 changes: 1 addition & 3 deletions Library/OcCryptoLib/BigNumPrimitives.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,11 @@ BigNumMod (
IN CONST OC_BN_WORD *A,
IN OC_BN_NUM_WORDS NumWordsA,
IN CONST OC_BN_WORD *B,
IN VOID *Memory
IN OC_BN_WORD *ModTmp
)
{
INTN CmpResult;

OC_BN_WORD *ModTmp;
OC_BN_NUM_BITS SigBitsModTmp;
OC_BN_NUM_WORDS SigWordsModTmp;

Expand Down Expand Up @@ -601,7 +600,6 @@ BigNumMod (
"An overflow verification must be added"
);

ModTmp = Memory;
BigDiv = &ModTmp[SigWordsModTmp];
SigWordsBigDiv = SigWordsModTmp;
//
Expand Down

0 comments on commit d12c413

Please sign in to comment.