grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Optimize PBKDF2
@ 2025-08-14  6:32 Gary Lin via Grub-devel
  2025-08-14  6:32 ` [PATCH 1/2] lib/crypto: Introduce new HMAC functions to reuse buffers Gary Lin via Grub-devel
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gary Lin via Grub-devel @ 2025-08-14  6:32 UTC (permalink / raw)
  To: The development of GNU GRUB
  Cc: Gary Lin, Daniel Kiper, Vladimir 'phcoder' Serbinenko,
	Glenn Washburn, Michael Chang, Steffen Winterfeldt

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(-)

-- 
2.43.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-16 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  6:32 [PATCH 0/2] Optimize PBKDF2 Gary Lin via Grub-devel
2025-08-14  6:32 ` [PATCH 1/2] lib/crypto: Introduce new HMAC functions to reuse buffers Gary Lin via Grub-devel
2025-08-14  6:32 ` [PATCH 2/2] lib/pbkdf2: Optimize PBKDF2 by reusing HMAC handle Gary Lin via Grub-devel
2025-08-14  8:32 ` [PATCH 0/2] Optimize PBKDF2 Gary Lin via Grub-devel
2025-10-16 18:02 ` Daniel Kiper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).