Skip to content

Optimize PBKDF2

Gary Lin via Grub-devel grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib/crypto: Introduce new HMAC functions to reuse buffersgrub-core/disk/geli.c grub-core/lib/crypto.c include/grub/crypto.h+74 -290 replies
2/2lib/pbkdf2: Optimize PBKDF2 by reusing HMAC handlegrub-core/lib/pbkdf2.c+13 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Optimize PBKDF2

This patch series addresses performance issues in the PBKDF2 implementation, which previously caused significant delays when unlocking encrypted partitions. The code has been optimized to eliminate redundant memory allocations and unnecessary hash operations.

These changes result in a substantial improvement: in local testing, the disk unlocking time was reduced from 15 seconds to 4 seconds.

Credit to Steffen Winterfeldt for providing a custom PBKDF2 implementation that helped identify these bottlenecks.

Gary Lin (2):
lib/crypto: Introduce new HMAC functions to reuse buffers lib/pbkdf2: Optimize PBKDF2 by reusing HMAC handle

 grub-core/disk/geli.c  |  4 +-
 grub-core/lib/crypto.c | 91 ++++++++++++++++++++++++++++++------------
 grub-core/lib/pbkdf2.c | 21 ++++++----
 include/grub/crypto.h  |  8 +++-
 4 files changed, 87 insertions(+), 37 deletions(-)
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel