fix: Replace SHA-256 key derivation with PBKDF2#6237
Conversation
|
@Abfa41 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod-Dev
left a comment
There was a problem hiding this comment.
Replacing the single-iteration SHA-256 hashing with crypto.pbkdf2Sync and a random salt in lib/crypto.ts significantly hardens our encryption against brute-force attacks. Updating the tests in lib/crypto.empty-fallback.test.ts to expect the 4-part payload (salt included) ensures the new structure is correctly verified. Great security improvement! Approved!
|
🎉 Congratulations @Abfa41! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
|
@Aamod-Dev, please look into type labels. It should be 'type:refactor' and 'type:security' labels, not 'refactor' and 'security'. kindly change it. Thanks! |
Description
Fixes #6201
This PR replaces the existing single-iteration SHA-256 key derivation with PBKDF2 to improve the security of encryption key generation.
Changes made:
crypto.createHash('sha256')withcrypto.pbkdf2Sync.Security improvements:
Pillar
Checklist before requesting a review:
CONTRIBUTING.mdfile.npm run formatandnpm run lintlocally and resolved all errors.