Skip to content

Fix Lagrange Coefficient Key Mismatch in CPabe_BSW07.decrypt#323

Merged
jakinyele merged 1 commit intoJHUISI:devfrom
Komorebi-Z:dev
Apr 27, 2025
Merged

Fix Lagrange Coefficient Key Mismatch in CPabe_BSW07.decrypt#323
jakinyele merged 1 commit intoJHUISI:devfrom
Komorebi-Z:dev

Conversation

@Komorebi-Z
Copy link
Copy Markdown
Contributor

@Komorebi-Z Komorebi-Z commented Apr 26, 2025

During use, we discovered that the decrypt method in the CPabe_BSW07 class wasn’t executing correctly, throwing the error:

local variable 'output' referenced before assignment
element not initialized

After investigation, we traced the problem to the _getCoefficientsDict function in charm/toolbox/secretutil.py, which wasn’t producing the correct Lagrange coefficients. Although _getCoefficientsDict calls recoverCoefficients, the keys in its this_coeff dictionary didn’t match the logic expected by recoverCoefficients. We’ve made a small adjustment to recoverCoefficients to align the keys and fix the bug.

@jakinyele jakinyele self-assigned this Apr 27, 2025
@jakinyele jakinyele self-requested a review April 27, 2025 16:42
@jakinyele jakinyele removed their assignment Apr 27, 2025
Copy link
Copy Markdown
Member

@jakinyele jakinyele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakinyele jakinyele merged commit 2b58a7e into JHUISI:dev Apr 27, 2025
1 check 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.

2 participants