@@ -50,8 +50,11 @@ separate target (for example the SealSQ devkit builds it into its own
5050` vaultic_wolfssl ` library alongside an ` add_subdirectory(wolfssl) ` CMake
5151build), two things are required so the file sees the wolfSSL configuration:
5252
53- * Define ` WOLFSSL_USE_OPTIONS_H ` when compiling ` vaultic.c ` , so
54- ` settings.h ` pulls in the generated ` wolfssl/options.h ` . Without it the
53+ * Make the file see the wolfSSL configuration. For an autotools build define
54+ ` WOLFSSL_USE_OPTIONS_H ` , so ` settings.h ` pulls in the generated
55+ ` wolfssl/options.h ` . For a build that does not use ` ./configure ` (so there is
56+ no generated ` options.h ` ), define ` WOLFSSL_USER_SETTINGS ` instead and provide
57+ a ` user_settings.h ` that lists all the build options. Without one of these the
5558 wolfSSL headers fall back to defaults (` ecc_key ` is incomplete,
5659 ` ECC_SECP256R1 ` is undeclared).
5760* Enable PK callbacks through the wolfSSL build option
@@ -62,6 +65,11 @@ build), two things are required so the file sees the wolfSSL configuration:
6265
6366## Usage
6467
68+ The port offers two ways to route ECC to the chip. They can be used
69+ independently or together.
70+
71+ ### TLS PK callbacks
72+
6573``` c
6674WOLFSSL_CTX * ctx = wolfSSL_CTX_new(wolfTLS_client_method());
6775
@@ -76,9 +84,34 @@ WOLFSSL_VAULTIC_SetupPkCallbackCtx(ssl, NULL);
7684/* ... proceed with the TLS handshake ... * /
7785```
7886
79- The VaultIC-TLS SDK must be initialized (`vlt_tls_init()`) before the
80- handshake and closed (`vlt_tls_close()`) afterwards; see the SealSQ devkit
81- sample applications.
87+ ### Crypto callback (devId)
88+
89+ The crypto callback dispatches wolfCrypt ECC operations (not just the TLS
90+ handshake) to the VaultIC through the `WOLF_CRYPTO_CB` / devId framework.
91+ Register the device once, then select it with a devId:
92+
93+ ```c
94+ /* register the VaultIC crypto callback under a devId */
95+ WOLFSSL_VAULTIC_RegisterCryptoCb(WOLF_VAULTIC_DEVID);
96+
97+ /* TLS: route this CTX's crypto to the device */
98+ wolfSSL_CTX_SetDevId(ctx, WOLF_VAULTIC_DEVID);
99+
100+ /* or bare wolfCrypt: init a key against the device */
101+ wc_ecc_init_ex(&key, NULL, WOLF_VAULTIC_DEVID);
102+ ```
103+
104+ The VaultIC-TLS SDK must be initialized (` vlt_tls_init() ` ) before use and
105+ closed (` vlt_tls_close() ` ) afterwards; see the SealSQ devkit sample
106+ applications.
107+
108+ ### Curve support
109+
110+ The port offloads P-256 (SECP256R1) only. The VaultIC 408 silicon supports
111+ P-384, but the vendor ` vlt_tls ` API exposes P-256 entry points only, so
112+ P-384 would require vendor ` vlt_tls_*_P384 ` functions. For any other curve
113+ the crypto callback returns ` CRYPTOCB_UNAVAILABLE ` and the PK callbacks
114+ return ` NOT_COMPILED_IN ` , so wolfSSL falls back to software.
82115
83116## Building and provisioning with the SealSQ devkit
84117
0 commit comments