Skip to content

SP int: fixes from AI review#10020

Open
SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
SparkiDev:sp_int_ai_fixes_1
Open

SP int: fixes from AI review#10020
SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
SparkiDev:sp_int_ai_fixes_1

Conversation

@SparkiDev
Copy link
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 4 times, most recently from 683e35f to faa7883 Compare March 20, 2026 00:31
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.
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.

1 participant