Prefer X25519 for legacy WSS full handshakes

Prioritize X25519 while retaining enabled curve fallbacks and log the negotiated ECDHE group. Extend ABI checks, crypto benchmarks and backend group probes, and document the updated APP package.
This commit is contained in:
chenjintao
2026-09-16 15:32:22 +08:00
parent 3a0714c735
commit 551a7bb1e6
10 changed files with 189 additions and 26 deletions
+6 -4
View File
@@ -13,14 +13,16 @@ gcc = toolchain / 'gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe'
objcopy = gcc.with_name('arm-none-eabi-objcopy.exe')
armcc = toolchain / 'ARM_Compiler_5/bin/armcc.exe'
types = ['ssl_context', 'ssl_config', 'net_context', 'x509_crt', 'pk_context',
'entropy_context', 'ctr_drbg_context', 'ecp_group', 'ecp_point', 'mpi']
'entropy_context', 'ctr_drbg_context', 'ecp_group', 'ecp_point', 'mpi',
'ssl_handshake_params', 'ecdh_context']
fields = {'ssl_context': ['conf', 'state', 'in_buf', 'out_buf', 'session', 'handshake', 'hostname'],
'ssl_config': ['ca_chain', 'cert_profile', 'f_rng', 'p_rng'],
'net_context': ['fd', 'cid'], 'x509_crt': ['pk', 'sig', 'next']}
'ssl_config': ['ca_chain', 'cert_profile', 'f_rng', 'p_rng', 'curve_list'],
'net_context': ['fd', 'cid'], 'x509_crt': ['pk', 'sig', 'next'],
'ssl_handshake_params': ['ecdh_ctx'], 'ecdh_context': ['grp_id']}
labels = ['sizeof(mbedtls_' + t + ')' for t in types]
labels += ['offsetof(mbedtls_' + t + ', ' + f + ')' for t, fs in fields.items() for f in fs]
source = output / 'tls_layout.c'
source.write_text('#include <stddef.h>\n#include "mbedtls/ssl.h"\n'
source.write_text('#include <stddef.h>\n#include "mbedtls/ssl_internal.h"\n'
'#include "mbedtls/net_sockets.h"\n#include "mbedtls/entropy.h"\n'
'#include "mbedtls/ctr_drbg.h"\n'
'const unsigned int talkingq_tls_layout[] = {\n' + ',\n'.join(labels) + '\n};\n')