Remove unused salt buffer from ltc_pkcs_1_pss_decode_mgf1 #796
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt#796
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ltc_pkcs_1_pss_decode_mgf1allocates a separate buffer for salt:However, the salt buffer is never written to or read from. The salt is already available directly within
DBand is passed to the hash function using:hash_descriptor[op_checked.hash_alg].process(&md, DB+x, saltlen)At this point,
DB + xpoints to the beginning of the salt portion ofDB.Suggested Fix:
Remove the unused
saltbuffer and all associated allocation, cleanup, and deallocation code.The PSS verification logic itself does not need to change, as the salt can continue to be processed directly from
DB + x.