AUT_ENABLE now requires that same exact encrypted-key length before decrypting or using it as a ChaChaPoly key.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-07-12 20:05:57 +02:00
parent 8ec4dd2388
commit 9e1bf2bcb7
+3
View File
@@ -163,6 +163,9 @@ int cbor_config(const uint8_t *data, size_t len) {
if (mse.init == false) {
CBOR_ERROR(CTAP2_ERR_NOT_ALLOWED);
}
if (vendorParamByteString.present == false || vendorParamByteString.len != 32 + 16) {
CBOR_ERROR(CTAP1_ERR_INVALID_PARAMETER);
}
mbedtls_chachapoly_context chatx;
int ret = mse_decrypt_ct(vendorParamByteString.data, vendorParamByteString.len);