Commit ae91548
committed
crypto_provider: avoid rand dep for GREASE HPKE
Previously we used the `rand` crate as a convenient way to select
a supported HPKE suite at random for ECH when using GREASE. In general
it's crummy to take a dep for such a minor need.
Instead, adapt the crypto provider CSRNG to this task by performing
a truncated uniform sampling. This should be more than sufficient for
the use-case and avoids an extra dep.1 parent c74587b commit ae91548
File tree
5 files changed
+32
-9
lines changed- librustls
- src
5 files changed
+32
-9
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
458 | 463 | | |
459 | 464 | | |
460 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
512 | | - | |
513 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
514 | 531 | | |
515 | | - | |
| 532 | + | |
516 | 533 | | |
517 | 534 | | |
518 | 535 | | |
| |||
625 | 642 | | |
626 | 643 | | |
627 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
628 | 649 | | |
629 | 650 | | |
630 | 651 | | |
631 | 652 | | |
632 | 653 | | |
633 | 654 | | |
634 | | - | |
| 655 | + | |
635 | 656 | | |
636 | 657 | | |
637 | 658 | | |
| |||
0 commit comments