Commit 1cc936b
committed
upstream: Fill entropy in a single operation instead of hundreds.
The sntrup761 code we use from SUPERCOP fills entropy arrays 4 bytes at
a time. On some platforms each of these operations has a significant
overhead, so instead fill it in a single operation and as a precaution
zero that array after it's used.
Analysis and code change is from Mike Frysinger via Github PR#621 with
feedback from djm@ and sed-ification from me. ok djm@ beck@.
This change was submitted by Mike to SUPERCOP upstream so hopefully
future versions will already have it.
OpenBSD-Commit-ID: 0e85c82f79b1b396facac59e05b288c08048f15c1 parent a6f8f79 commit 1cc936b
2 files changed
+30
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
1961 | 1960 | | |
1962 | 1961 | | |
1963 | 1962 | | |
1964 | | - | |
1965 | | - | |
1966 | | - | |
1967 | | - | |
1968 | | - | |
1969 | | - | |
1970 | | - | |
1971 | | - | |
1972 | 1963 | | |
1973 | 1964 | | |
1974 | 1965 | | |
1975 | | - | |
1976 | | - | |
| 1966 | + | |
1977 | 1967 | | |
| 1968 | + | |
1978 | 1969 | | |
1979 | | - | |
1980 | 1970 | | |
1981 | 1971 | | |
1982 | | - | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1983 | 1976 | | |
1984 | | - | |
1985 | 1977 | | |
1986 | 1978 | | |
1987 | 1979 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
90 | 112 | | |
91 | 113 | | |
92 | 114 | | |
| |||
0 commit comments