Page MenuHomePhabricator

[ecash-lib] Add `pbkdf2`
ClosedPublic

Authored by tobias_ruck on Jan 30 2025, 03:56.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC01abe1438cf6: [ecash-lib] Add `pbkdf2`
Summary

This is used to hash a "seed" from a mnemonic (seed phrase).

Depends on D17609.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added inline comments.
modules/ecash-lib/src/pbkdf2.test.ts
32 ↗(On Diff #52442)
37 ↗(On Diff #52442)
This revision now requires changes to proceed.Jan 30 2025, 18:37
tobias_ruck added inline comments.
modules/ecash-lib/src/pbkdf2.test.ts
37 ↗(On Diff #52442)

oh, here I reduced the number of iterations from 80000 to 8000

the test would run for 1200ms otherwise—if that's fine I can bump it, or change it to a iteration count that's not so similar.

I suspect the solution here is not as optimized as the the one from noble. Maybe we should move it to Rust entirely (but maybe not now)

This revision is now accepted and ready to land.Jan 30 2025, 22:41
This revision was automatically updated to reflect the committed changes.