Commit 62764d0
committed
Remove PQC-based buffer size increase for PreMasterSecret
The size of the PreMasterSecret buffer is based on the ENCRYPT_LEN
constant, which has been increased to 5kB for PQC support (Dilithium and
Falcon, as their signatures are that large).
However, only in the TLS 1.2 case, the PreMasterSecret buffer is used to
store signatures. In the TLS 1.3 path, only actual symmetric secrets are
stored in that buffer, which are much smaller in size (the "old" size of
the constant without the PQC increase).
As PQC is only allowed in TLS 1.3 and NOT in TLS 1.2, we can revert
that size increase, saving around 4,5kB of dynamic memory during the
handshake.1 parent 80c1228 commit 62764d0
2 files changed
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10295 | 10295 | | |
10296 | 10296 | | |
10297 | 10297 | | |
10298 | | - | |
10299 | | - | |
| 10298 | + | |
10300 | 10299 | | |
10301 | 10300 | | |
10302 | 10301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | 1529 | | |
1534 | 1530 | | |
1535 | 1531 | | |
1536 | 1532 | | |
1537 | | - | |
1538 | 1533 | | |
1539 | 1534 | | |
1540 | 1535 | | |
| |||
0 commit comments