RustCrypto / RustCrypto/password-hashes

argon2: add workaround for big 64-byte aligned allocations?

Open
#573 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
909
Forks
115
Avg merge
1d 6h
Merged PRs (30d)
4

Description

It was previously discussed in #566.

The claim is that for big allocations we can get higher performance by allocating len + 64 bytes with 1-byte alignment (we then can manually construct a 64-byte aligned region in the allocated memory with size len), than by directly allocating len bytes with 64-byte alignment.

cc @jonasmalacofilho

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the discussion in issue #566 first, then trace the Argon2 allocation path involved in large 64-byte-aligned buffers. Compare the proposed len + 64 allocation and manual alignment approach with the current behavior; done means the workaround is implemented for the relevant large allocations and its performance impact is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.