mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcCryptoLib: Drop pool memory usage optimisation in BigNumMod
Currently BigNumMod does not allocate memory for A words with leading zeroes. For us words are 8 bytes. When doing RSA computations with proper keys 8 zero bytes are nearly impossible and 16 zero bytes are completely impossible. Avoiding this optimisation does not change library behaviour for nearly all inputs but provides simpler guarantees about memory usage and simplifies testing.
This commit is contained in:
parent
823e98fe68
commit
0f22e66dfb
@ -602,7 +602,7 @@ BigNumMod (
|
||||
"An overflow verification must be added"
|
||||
);
|
||||
|
||||
Memory = AllocatePool (2 * SigWordsModTmp * OC_BN_WORD_SIZE);
|
||||
Memory = AllocatePool (2 * NumWordsA * OC_BN_WORD_SIZE);
|
||||
if (Memory == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user