On Thu, Aug 14, 2025 at 02:32:40PM +0800, Gary Lin wrote: > 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. > I forgot to include the Steffen's git repo as the reference. https://github.com/wfeldt/grub2/pull/3
Gary Lin > 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