CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 17:17:30 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/google/boringssl.git
etag: W/"b35e7311c1a39c8a1eab3d8788280b27"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ssTB3xl9fBqGRq8ujst0hV4ck%2BeZXk1MAm6Gbi%2F0z3Yp4r57tNl9KuxAjOypbkD4Xo7%2BB3yGuUmNVwKvWbPbrjLM%2Bpmq2LuL6A86uRsnTagLSgSCO01dyWA9ljlM%2Bs1SsWKXmFtkdFvdhKdBXwqBuIHs68UDcWC6fCxB5jUpdYfO8bJ1IE5r7jS6CgX4Z5jPuC8Y9oJ2RkaB3iSbbkREITE03HDwdycif65hdCMk7QJPQHCUCxtY3GW4MAZA4tViklEiE7Mi51l96RJRfoxE6Q%3D%3D--T%2BFCymJY9R9bf%2B49--VEYiAwz6BfI4X9xiZxLy2Q%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1622780191.1753377448; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 17:17:28 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 17:17:28 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A5E4:2FFCA6:6EF68:83508:68826AA8
Remove the need for scratch space when squaring · google/boringssl@a934ee9 · GitHub
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/asm/bn-586.pl
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/bn_test.cc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/generic.cc.inc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/internal.h
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/mul.cc.inc
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 827
Commit a934ee9
Remove the need for scratch space when squaring
BN_sqr only has scratch space because it needs to compute a temporary
buffer with the a[i]^2 terms to add into the final result. But those
terms can be computed and added in a single pass.
This isn't expected to have any performance impact on assembly-enabled
builds. All those builds have bn_mul_mont optimizations, which means the
plain squaring operation is more-or-less unused. (This begs the question
why we have assembly optimizations for it, when it's only used in
conjunction with builds that barely use it, but ah well.) On NO_ASM
builds, the plain square operation is used more, but this impacts
linearly many terms out of an overall quadratic operation.
I was unable to measure a consistent difference with or without this
change. Really the benefit is that, by removing the dependency on
scratch space, we can remove the dependency on BN_CTX and can unify our
various Montgomery multiplication codepaths.
Bug: 42290433
Change-Id: I1527bd212529bbd4a1abedec22bb1dc3d7e12cbb
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/79307
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>1 parent 0b53549 commit a934ee9Copy full SHA for a934ee9
File tree
Expand file treeCollapse file tree
9 files changed
+115
-64
lines changedFilter options
- crypto/fipsmodule/bn
- asm
- gen/bcm
Expand file treeCollapse file tree
9 files changed
+115
-64
lines changedcrypto/fipsmodule/bn/asm/bn-586.pl
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/asm/bn-586.pl+12-3Lines changed: 12 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| |||
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
177 |
| - | |
| 177 | + | |
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
| 191 | + | |
191 | 192 |
| |
192 | 193 |
| |
193 | 194 |
| |
| 195 | + | |
| 196 | + | |
194 | 197 |
| |
195 | 198 |
| |
196 |
| - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
197 | 206 |
| |
198 | 207 |
| |
199 | 208 |
| |
|
crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc+27-10Lines changed: 27 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
105 |
| - | |
106 |
| - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
107 | 123 |
| |
108 | 124 |
| |
109 | 125 |
| |
| |||
169 | 185 |
| |
170 | 186 |
| |
171 | 187 |
| |
172 |
| - | |
| 188 | + | |
173 | 189 |
| |
174 | 190 |
| |
175 | 191 |
| |
176 | 192 |
| |
| 193 | + | |
177 | 194 |
| |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
182 | 199 |
| |
183 | 200 |
| |
184 | 201 |
| |
185 | 202 |
| |
186 | 203 |
| |
187 |
| - | |
| 204 | + | |
188 | 205 |
| |
189 | 206 |
| |
190 | 207 |
| |
191 |
| - | |
| 208 | + | |
192 | 209 |
| |
193 | 210 |
| |
194 | 211 |
| |
195 |
| - | |
| 212 | + | |
196 | 213 |
| |
197 | 214 |
| |
198 | 215 |
| |
|
crypto/fipsmodule/bn/bn_test.cc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/bn_test.cc+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2793 | 2793 |
| |
2794 | 2794 |
| |
2795 | 2795 |
| |
2796 |
| - | |
| 2796 | + | |
2797 | 2797 |
| |
2798 | 2798 |
| |
2799 | 2799 |
| |
|
crypto/fipsmodule/bn/generic.cc.inc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/generic.cc.inc+17-6Lines changed: 17 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
| 154 | + | |
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| 159 | + | |
159 | 160 |
| |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
164 | 173 |
| |
165 | 174 |
| |
166 | 175 |
| |
167 | 176 |
| |
168 | 177 |
| |
169 |
| - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
170 | 181 |
| |
171 | 182 |
| |
172 | 183 |
| |
|
crypto/fipsmodule/bn/internal.h
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/internal.h+8-6Lines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
190 |
| - | |
191 |
| - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
192 | 194 |
| |
193 | 195 |
| |
194 |
| - | |
| 196 | + | |
195 | 197 |
| |
196 | 198 |
| |
197 | 199 |
| |
| |||
645 | 647 |
| |
646 | 648 |
| |
647 | 649 |
| |
648 |
| - | |
649 |
| - | |
| 650 | + | |
| 651 | + | |
650 | 652 |
| |
651 | 653 |
| |
652 | 654 |
| |
|
crypto/fipsmodule/bn/mul.cc.inc
Copy file name to clipboardExpand all lines: crypto/fipsmodule/bn/mul.cc.inc+7-22Lines changed: 7 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 |
| - | |
30 | 28 |
| |
31 | 29 |
| |
32 | 30 |
| |
| |||
228 | 226 |
| |
229 | 227 |
| |
230 | 228 |
| |
231 |
| - | |
232 |
| - | |
233 |
| - | |
| 229 | + | |
234 | 230 |
| |
235 | 231 |
| |
236 | 232 |
| |
| |||
262 | 258 |
| |
263 | 259 |
| |
264 | 260 |
| |
265 |
| - | |
266 |
| - | |
| 261 | + | |
267 | 262 |
| |
268 | 263 |
| |
269 | 264 |
| |
| |||
297 | 292 |
| |
298 | 293 |
| |
299 | 294 |
| |
300 |
| - | |
301 |
| - | |
| 295 | + | |
302 | 296 |
| |
303 | 297 |
| |
304 | 298 |
| |
| |||
312 | 306 |
| |
313 | 307 |
| |
314 | 308 |
| |
315 |
| - | |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
| 309 | + | |
324 | 310 |
| |
325 | 311 |
| |
326 | 312 |
| |
| |||
342 | 328 |
| |
343 | 329 |
| |
344 | 330 |
| |
345 |
| - | |
| 331 | + | |
| 332 | + | |
346 | 333 |
| |
347 | 334 |
| |
348 | 335 |
| |
349 | 336 |
| |
350 | 337 |
| |
351 | 338 |
| |
352 | 339 |
| |
353 |
| - | |
354 |
| - | |
355 |
| - | |
| 340 | + | |
356 | 341 |
| |
357 | 342 |
|
+14-5Lines changed: 14 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
135 |
| - | |
136 |
| - | |
| 135 | + | |
| 136 | + | |
137 | 137 |
| |
138 |
| - | |
139 |
| - | |
| 138 | + | |
| 139 | + | |
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
| 143 | + | |
143 | 144 |
| |
144 | 145 |
| |
145 | 146 |
| |
| 147 | + | |
| 148 | + | |
146 | 149 |
| |
147 | 150 |
| |
148 |
| - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
149 | 158 |
| |
150 | 159 |
| |
151 | 160 |
| |
|
+16-7Lines changed: 16 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
136 | 136 |
| |
137 | 137 |
| |
138 | 138 |
| |
139 |
| - | |
140 |
| - | |
141 |
| - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
142 | 142 |
| |
143 |
| - | |
144 |
| - | |
| 143 | + | |
| 144 | + | |
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| 148 | + | |
148 | 149 |
| |
149 | 150 |
| |
150 | 151 |
| |
| 152 | + | |
| 153 | + | |
151 | 154 |
| |
152 | 155 |
| |
153 |
| - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 |
| |
155 | 164 |
| |
156 | 165 |
| |
| |||
161 | 170 |
| |
162 | 171 |
| |
163 | 172 |
| |
164 |
| - | |
| 173 | + | |
165 | 174 |
| |
166 | 175 |
| |
167 | 176 |
| |
|
+13-4Lines changed: 13 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
| 141 | + | |
142 | 142 |
| |
143 |
| - | |
144 |
| - | |
| 143 | + | |
| 144 | + | |
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| 148 | + | |
148 | 149 |
| |
149 | 150 |
| |
150 | 151 |
| |
| 152 | + | |
| 153 | + | |
151 | 154 |
| |
152 | 155 |
| |
153 |
| - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 |
| |
155 | 164 |
| |
156 | 165 |
| |
|
You can’t perform that action at this time.
0 commit comments