Skip to content

SP int: fixes from AI review#10020

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:sp_int_ai_fixes_1
Mar 24, 2026
Merged

SP int: fixes from AI review#10020
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:sp_int_ai_fixes_1

Conversation

@SparkiDev
Copy link
Copy Markdown
Contributor

Description

Re-implemented wc_PKCS12_PBKDF() to not use MP. Added tests to unit.test.

sp_int.c:
Fixes to comments.
Added more define build options documentation to top of file.
Fixes for builds with WOLFSSL_SP_INT_NEGATIVE defined.
Fixes for when a->used is 0 and no underflow - not actually a problem but cleaner code.
sp_sub has different checks on a->used when values are only positive.
sp_dic_2d missing check for e less than zero.
sp_to_unsigned_bin_len_ct: remove redundant check of outSz. Change i to int to handle a->used of 0 and make code tidier.

Configuration testing fixes.
Fix formatting in test.c.
Added 128-bit types word128 and sword128 for cleaner PKCS#12 code.

Testing

Regression tested SP int

Checklist

  • added tests

@SparkiDev SparkiDev self-assigned this Mar 19, 2026
@SparkiDev SparkiDev force-pushed the sp_int_ai_fixes_1 branch 11 times, most recently from c86dc20 to af02e8e Compare March 23, 2026 23:55
Re-implemented wc_PKCS12_PBKDF() to not use MP. Added tests to
unit.test.

sp_int.c:
  Fixes to comments.
  Added more define build options documentation to top of file.
  Fixes for builds with WOLFSSL_SP_INT_NEGATIVE defined.
Fixes for when a->used is 0 and no underflow - not actually a problem
but cleaner code.
  sp_sub has different checks on a->used when values are only positive.
  sp_dic_2d  missing check for e less than zero.
sp_to_unsigned_bin_len_ct: remove redundant check of outSz. Change i
to int to handle a->used of 0 and make code tidier.

Configuration testing fixes.
Fix formatting in test.c.
Added 128-bit types word128 and sword128 for cleaner PKCS#12 code.
@SparkiDev
Copy link
Copy Markdown
Contributor Author

retest this please

@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Mar 24, 2026
@SparkiDev SparkiDev requested a review from wolfSSL-Bot March 24, 2026 04:01
@dgarske dgarske merged commit 3b90841 into wolfSSL:master Mar 24, 2026
497 of 498 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants