Commit 370c388
committed
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library updates from Eric Biggers:
- Migrate more hash algorithms from the traditional crypto subsystem to
lib/crypto/
Like the algorithms migrated earlier (e.g. SHA-*), this simplifies
the implementations, improves performance, enables further
simplifications in calling code, and solves various other issues:
- AES CBC-based MACs (AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC)
- Support these algorithms in lib/crypto/ using the AES library
and the existing arm64 assembly code
- Reimplement the traditional crypto API's "cmac(aes)",
"xcbc(aes)", and "cbcmac(aes)" on top of the library
- Convert mac80211 to use the AES-CMAC library. Note: several
other subsystems can use it too and will be converted later
- Drop the broken, nonstandard, and likely unused support for
"xcbc(aes)" with key lengths other than 128 bits
- Enable optimizations by default
- GHASH
- Migrate the standalone GHASH code into lib/crypto/
- Integrate the GHASH code more closely with the very similar
POLYVAL code, and improve the generic GHASH implementation to
resist cache-timing attacks and use much less memory
- Reimplement the AES-GCM library and the "gcm" crypto_aead
template on top of the GHASH library. Remove "ghash" from the
crypto_shash API, as it's no longer needed
- Enable optimizations by default
- SM3
- Migrate the kernel's existing SM3 code into lib/crypto/, and
reimplement the traditional crypto API's "sm3" on top of it
- I don't recommend using SM3, but this cleanup is worthwhile
to organize the code the same way as other algorithms
- Testing improvements:
- Add a KUnit test suite for each of the new library APIs
- Migrate the existing ChaCha20Poly1305 test to KUnit
- Make the KUnit all_tests.config enable all crypto library tests
- Move the test kconfig options to the Runtime Testing menu
- Other updates to arch-optimized crypto code:
- Optimize SHA-256 for Zhaoxin CPUs using the Padlock Hash Engine
- Remove some MD5 implementations that are no longer worth keeping
- Drop big endian and voluntary preemption support from the arm64
code, as those configurations are no longer supported on arm64
- Make jitterentropy and samples/tsm-mr use the crypto library APIs
* tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (66 commits)
lib/crypto: arm64: Assume a little-endian kernel
arm64: fpsimd: Remove obsolete cond_yield macro
lib/crypto: arm64/sha3: Remove obsolete chunking logic
lib/crypto: arm64/sha512: Remove obsolete chunking logic
lib/crypto: arm64/sha256: Remove obsolete chunking logic
lib/crypto: arm64/sha1: Remove obsolete chunking logic
lib/crypto: arm64/poly1305: Remove obsolete chunking logic
lib/crypto: arm64/gf128hash: Remove obsolete chunking logic
lib/crypto: arm64/chacha: Remove obsolete chunking logic
lib/crypto: arm64/aes: Remove obsolete chunking logic
lib/crypto: Include <crypto/utils.h> instead of <crypto/algapi.h>
lib/crypto: aesgcm: Don't disable IRQs during AES block encryption
lib/crypto: aescfb: Don't disable IRQs during AES block encryption
lib/crypto: tests: Migrate ChaCha20Poly1305 self-test to KUnit
lib/crypto: sparc: Drop optimized MD5 code
lib/crypto: mips: Drop optimized MD5 code
lib: Move crypto library tests to Runtime Testing menu
crypto: sm3 - Remove 'struct sm3_state'
crypto: sm3 - Remove the original "sm3_block_generic()"
crypto: sm3 - Remove sm3_base.h
...154 files changed
Lines changed: 4879 additions & 4875 deletions
File tree
- arch
- arm64
- configs
- crypto
- include/asm
- arm/crypto
- loongarch/configs
- m68k/configs
- powerpc/crypto
- riscv/crypto
- s390
- configs
- crypto
- x86/crypto
- crypto
- drivers
- crypto
- starfive
- virt/coco/guest
- include/crypto
- internal
- lib
- crypto
- arm64
- arm
- mips
- powerpc
- riscv
- s390
- sparc
- tests
- x86
- net/mac80211
- samples
- tsm-mr
- scripts/crypto
- security/integrity/ima
- tools/testing/kunit/configs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12279 | 12279 | | |
12280 | 12280 | | |
12281 | 12281 | | |
12282 | | - | |
12283 | | - | |
12284 | 12282 | | |
12285 | 12283 | | |
| 12284 | + | |
| 12285 | + | |
12286 | 12286 | | |
12287 | 12287 | | |
12288 | 12288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | | - | |
18 | | - | |
19 | 15 | | |
20 | 16 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 17 | | |
27 | 18 | | |
28 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 32 | | |
49 | 33 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 34 | | |
60 | | - | |
61 | 35 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 36 | | |
66 | 37 | | |
67 | 38 | | |
| |||
93 | 64 | | |
94 | 65 | | |
95 | 66 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 67 | | |
163 | 68 | | |
164 | 69 | | |
| |||
170 | 75 | | |
171 | 76 | | |
172 | 77 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 78 | + | |
197 | 79 | | |
198 | 80 | | |
199 | 81 | | |
| |||
206 | 88 | | |
207 | 89 | | |
208 | 90 | | |
209 | | - | |
210 | | - | |
| 91 | + | |
211 | 92 | | |
212 | 93 | | |
213 | 94 | | |
| |||
288 | 169 | | |
289 | 170 | | |
290 | 171 | | |
291 | | - | |
292 | 172 | | |
293 | 173 | | |
294 | 174 | | |
| |||
308 | 188 | | |
309 | 189 | | |
310 | 190 | | |
311 | | - | |
| 191 | + | |
312 | 192 | | |
313 | | - | |
314 | | - | |
| 193 | + | |
| 194 | + | |
315 | 195 | | |
316 | 196 | | |
317 | 197 | | |
318 | 198 | | |
319 | | - | |
| 199 | + | |
320 | 200 | | |
321 | 201 | | |
322 | 202 | | |
| |||
325 | 205 | | |
326 | 206 | | |
327 | 207 | | |
328 | | - | |
329 | | - | |
| 208 | + | |
| 209 | + | |
330 | 210 | | |
331 | 211 | | |
332 | 212 | | |
| |||
341 | 221 | | |
342 | 222 | | |
343 | 223 | | |
344 | | - | |
| 224 | + | |
345 | 225 | | |
346 | 226 | | |
347 | 227 | | |
348 | 228 | | |
349 | 229 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | 230 | | |
374 | 231 | | |
375 | 232 | | |
| |||
536 | 393 | | |
537 | 394 | | |
538 | 395 | | |
539 | | - | |
| 396 | + | |
540 | 397 | | |
541 | 398 | | |
542 | 399 | | |
| |||
554 | 411 | | |
555 | 412 | | |
556 | 413 | | |
557 | | - | |
| 414 | + | |
558 | 415 | | |
559 | 416 | | |
560 | 417 | | |
| |||
603 | 460 | | |
604 | 461 | | |
605 | 462 | | |
606 | | - | |
| 463 | + | |
607 | 464 | | |
608 | 465 | | |
609 | 466 | | |
| |||
660 | 517 | | |
661 | 518 | | |
662 | 519 | | |
663 | | - | |
| 520 | + | |
664 | 521 | | |
665 | 522 | | |
666 | 523 | | |
| |||
0 commit comments