Skip to content

Commit f6db286

Browse files
authored
Add P256 and RSA documentation sections (#5227)
1 parent cc67e0e commit f6db286

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

contracts/utils/README.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Because Solidity does not support generic types, {EnumerableMap} and {Enumerable
5858

5959
{{ECDSA}}
6060

61+
{{P256}}
62+
63+
{{RSA}}
64+
6165
{{EIP712}}
6266

6367
{{MessageHashUtils}}

contracts/utils/cryptography/P256.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ library P256 {
242242
* @dev Compute G·u1 + P·u2 using the precomputed points for G and P (see {_preComputeJacobianPoints}).
243243
*
244244
* Uses Strauss Shamir trick for EC multiplication
245-
* https://stackoverflow.com/questions/50993471/ec-scalar-multiplication-with-strauss-shamir-method
246-
* we optimise on this a bit to do with 2 bits at a time rather than a single bit
247-
* the individual points for a single pass are precomputed
248-
* overall this reduces the number of additions while keeping the same number of doublings
245+
* https://stackoverflow.com/questions/50993471/ec-scalar-multiplication-with-strauss-shamir-method.
246+
* We optimise on this a bit to do with 2 bits at a time rather than a single bit.
247+
* The individual points for a single pass are precomputed.
248+
* Overall this reduces the number of additions while keeping the same number of doublings.
249249
*/
250250
function _jMultShamir(JPoint[16] memory points, uint256 u1, uint256 u2) private view returns (uint256, uint256) {
251251
uint256 x = 0;

0 commit comments

Comments
 (0)