Commit 6f3d4ea
examples/ipsec-secgw: support SM4-CBC and SM3-HMAC
This patch adds support for Chinese cryptographic algorithms in the
IPsec security gateway example application:
- Add SM4-CBC cipher algorithm support with 16-byte IV and key;
- Add SM3-HMAC authentication algorithm support with 20-byte key;
- Update SA configuration parsing to recognize "sm4-cbc" and "sm3-hmac"
keywords;
- Implement proper IV handling and authentication offset/length
configuration.
These additions enable the IPsec security gateway to use Chinese
national cryptographic standards for secure communications.
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>1 parent fe79e9f commit 6f3d4ea
File tree
3 files changed
+30
-1
lines changed- doc/guides/sample_app_ug
- examples/ipsec-secgw
3 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
| |||
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| 609 | + | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
| |||
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
823 | 832 | | |
824 | 833 | | |
825 | 834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| 346 | + | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| |||
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| 411 | + | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| |||
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| |||
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
178 | 191 | | |
179 | 192 | | |
180 | 193 | | |
| |||
502 | 515 | | |
503 | 516 | | |
504 | 517 | | |
505 | | - | |
| 518 | + | |
| 519 | + | |
506 | 520 | | |
507 | 521 | | |
508 | 522 | | |
| |||
1319 | 1333 | | |
1320 | 1334 | | |
1321 | 1335 | | |
| 1336 | + | |
1322 | 1337 | | |
1323 | 1338 | | |
1324 | 1339 | | |
| |||
0 commit comments