60 Commits

Author SHA1 Message Date
PMheart
11232d53f5 Codestyle: Fixed by Uncrustify 2022-04-25 21:30:42 +02:00
Marvin Häuser
61e7d0c977 OcCryptoLib: Centralise dynamic scratch buffer allocation 2022-04-25 19:34:05 +02:00
Marvin Häuser
9d152dc686 OcCryptoLib: Fix potential Mont BN overflows 2022-04-25 19:32:19 +02:00
PMheart
228f8ca1fb Codestyle: Apply codestyle changes with Uncrustify 2022-04-25 14:51:15 +02:00
vit9696
093dd76d59 OcCryptoLib: Trim spaces 2022-03-20 14:46:14 +03:00
vit9696
6fdd6dab9b OcCryptoLib: Avoid memory allocation but in RsaVerifySigDataFromData 2022-03-06 17:19:08 +03:00
vit9696
19cefe626c OcCryptoLib: Use caller-provided buffer for BigNumPowMod 2022-03-06 16:40:55 +03:00
vit9696
59da77c87f OcCryptoLib: Use caller-provided scratch in BigNumCalculateMontParams 2022-03-06 16:33:34 +03:00
vit9696
1da000afab OcCryptoLib: Use single buffer in BigNumCalculateMontParams 2022-03-06 16:10:22 +03:00
vit9696
d12c413664 OcCryptoLib: Use scratch buffer in BN words for simplicity 2022-03-06 15:58:32 +03:00
vit9696
d9e2c49b82 OcCryptoLib: Kill heap optimisation in BigNumCalculateMontParams
This optimisation once again gives us nothing on realistic values
due to roughly uniform distribution.
2022-03-06 15:48:26 +03:00
vit9696
8d9d387e38 OcCryptoLib: Drop BigNumMod memory allocation
BigNumCalculateMontParams previously did not check BigNumMod for memory
allocation failure anyway, which was thus harder to diagnose due to
the Montgomery Inverse of N still returning correctly.
2022-03-06 15:25:02 +03:00
vit9696
0f22e66dfb 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.
2022-03-06 15:14:58 +03:00
vit9696
8551daca79 OcCryptoLib: Improve portability 2022-03-06 11:49:16 +03:00
Savva Mitrofanov
0c0aa62694
OcCryptoLib: Fixed rbx overriding in TryEnableAvx
cpuid call writes into eax,ebx,ecx,edx registers, so it overwrites rbx which causes undefined behavior in subsequent execution
2022-02-15 15:18:03 +06:00
MikhailKrichanov
910343ae46
Analysis: Patches to several Svace warnings. (#308) 2021-12-21 19:57:48 +03:00
dakanji
2448a04fe8
Docs: Fix Article Usage and Misc Informalities (#300) 2021-11-20 17:41:18 +03:00
mikebeaton
f5d550ac7e OcCrypto+OcStorage: Minor typos in DEBUG msgs 2021-09-21 10:07:10 +01:00
vit9696
2abe2a6d1a OcBlitLib: Initial version for improved compatibility 2021-05-08 13:29:29 +03:00
MikhailKrichanov
edb8a647d5
OcCryptoLib: Add AVX-acceleration of SHA-512 and SHA-384 (#252) 2021-04-19 15:03:18 +03:00
Marvin Häuser
ecd964a039 OcCryptoLib: Remove inadequate ASSERTs 2021-03-16 21:58:18 +01:00
vit9696
aba5600931 OcCryptoLib: Use more performant bignum multiplication for X64 2020-06-02 07:55:52 +03:00
Download-Fritz
062e898e26 Fix GCC warnings 2020-05-31 13:23:27 +02:00
vit9696
bf5cea16f8 Build: Fix IA32 -> Ia32 naming to conform UDK 2020-05-31 05:32:18 +03:00
Michael Belyaev
d7e47bed07
Docs: Fix Doxygen comments (#46) 2020-05-05 22:46:14 +03:00
vit9696
97585cb6c2 Build: Remove OcSupportPkg usage 2020-02-29 17:39:41 +03:00
vit9696
c2b6d4cf44 OcCryptoLib: Annotate AES with IN OUT 2020-02-14 17:50:41 +03:00
vit9696
979087c68e Revert "Build: Fix MODULE_TYPE for libraries"
This reverts commit 93c96d030b176873052e479b20e5a7f0f367ce3c.
2020-01-23 20:01:40 +03:00
vit9696
93c96d030b Build: Fix MODULE_TYPE for libraries 2020-01-23 19:49:04 +03:00
vit9696
4bbb8ccf9e OcCryptoLib: Improve IA32 compatibility, thx @nms42
closes acidanthera/bugtracker#651
2020-01-11 16:25:44 +03:00
vit9696
f918b0ab19 OcCryptoLib: Silence compiler warnings
closes acidanthera/bugtracker#638
2020-01-09 11:55:07 +03:00
vit9696
b648817287 OcCryptoLib: Drop copy-pasted extra volatile 2020-01-07 01:26:36 +03:00
vit9696
b2f85d5114 OcCryptoLib: Implement and use SecureZeroMem 2020-01-07 01:17:42 +03:00
vit9696
0a2771b9b6 OcCryptoLib: Implement ChaCha, IETF variant, and also fix tests 2020-01-06 22:17:23 +03:00
Download-Fritz
469cc6ef33 OcCryptoLib: Fix type cast warnings 2019-11-30 13:58:18 +01:00
vit9696
1560cec90c OcGuardLib: Switch to edk2-stable201911 2019-11-29 17:32:17 +03:00
Download-Fritz
3e9ef5ac41 OcCryptoLib: Import changes missed in f18ec0022b 2019-11-11 22:28:14 +01:00
Download-Fritz
f18ec0022b OcCryptoLib: Import new BN mod algorithm. Deprecate former support functions. 2019-11-11 22:24:21 +01:00
Download-Fritz
ca949104a6 OcCryptoLib: Fix potential deadlock 2019-11-11 22:24:21 +01:00
Download-Fritz
aece54d878 OcCryptoLib: Fix MSVC build and type consistency 2019-11-06 19:47:14 +01:00
Download-Fritz
410d10d3fc
OcCryptoLib: Import new RSA stack
Import a new RSA stack and test utilities to support IMG4 image verification.
2019-11-06 19:26:45 +01:00
Download-Fritz
d1c565a246 OcCryptoLib: Import secure memory comparison and password verification APIs 2019-09-10 08:30:57 +02:00
Download-Fritz
cd0cbc8140 OcCryptoLib: Mark Data as CONST for SHA256 2019-09-07 14:36:14 +02:00
vit9696
515afb8765 OcCryptoLib: Drop suspicious cast in Sha2
closes acidanthera/bugtracker#477
2019-09-07 00:10:22 +03:00
vit9696
6e7fb0b0fa OcCryptoLib: Reformat Sha2 2019-09-07 00:08:35 +03:00
vit9696
1fbb3471d4 OcCryptoLib: Ensure no information leak in hash functions 2019-09-07 00:02:39 +03:00
yourmother
49f2784676 OcCryptoLib: Sha2. Fix build errors
Fix negative shift count in ROT macros. Fix field name mismatch in context sha512 struct. Fix input var name mismatch in Sha512 procedure: Digest->Hash
2019-09-04 23:43:10 +03:00
yourmother
aed0074aa2 OcCryptoLib: Sha2. Fix parameter declarator in function prototype 2019-09-04 23:27:45 +03:00
yourmother
a6e53b3a63 OcCryptoLib: Sha2
Clean up
2019-09-04 21:55:39 +03:00
yourmother
ffa5f7603d OcCryptoLib: Sha2
Clean up
2019-09-04 21:54:27 +03:00