Blake2 missing functionality while migrating from `blake2-rfc`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cryptography
Research direction
Start with the current blake2b implementation, then inspect Blake2bVarCore::new_with_params and the Blake2bVar API. Determine how a configured core can be exposed through the public variable-output type without relying on pointer hacks. Done means callers migrating from blake2-rfc can construct a keyed variable-output Blake2b hasher through a safe, documented public API.
Written by the indexing model from the issue text.
Description
Not sure if this is a feature request or a question...
I was previously using the blake2-rfc crate and now I want to migrate to the blake2 crate. However previously I was using the Blake2b::with_key constructor (as per https://docs.rs/blake2-rfc/0.2.18/blake2_rfc/blake2b/struct.Blake2b.html#method.with_key) and I can't seem to find the proper equivalent in case of the blake2 crate.
There seems to exist Blake2bVarCore::new_with_params (as per https://docs.rs/blake2/0.10.2/blake2/struct.Blake2bVarCore.html#method.new_with_params), however I can't seem to convert that into a Blake2bVar (which I need to get variable hash output).
Based on the current blake2b implementation, it seems I should be able to just replace the core member of the Blake2bVar with the Blake2bVarCore instance, which indeed works if I "hack my way" by using pointers. However there is no "official" (as per the public API) way of doing this.
A simple From implementation, or even an unsafe constructor that takes a Blake2bVarCore and yields a Blake2bVar would seem to suffice.
- Dominant language
- Rust
- Stars
- 2.4k
- Forks
- 364
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 18
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RustCrypto/hashes
-
blake2: incorrect size checks resulting in panic in `new_with_salt_and_personal`Possibly taken @kolinabir claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
RustCrypto/hashes#968 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
RustCrypto/hashes#941 ·
Maintainers usually reply within 1 day
-
`blake2::Blake2b512` does not implement `ZeroizeOnDrop`Possibly taken @Johnsonajibi claimed this 95 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
RustCrypto/hashes#912 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
RustCrypto/hashes#908 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
RustCrypto/hashes#763 · 1 comment ·
Maintainers usually reply within 1 day
All issues in RustCrypto/hashes
Similar issues
-
The new tests repeat each other and one only checks a two-line helperMay be free again A pull request for this issue was closed without being merged. Openinfra
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
storytold/wordcraft#9405 · 2 comments ·
Maintainers usually reply within 1 day
-
in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area: ai-assistants documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BetaBots-LLC/latticegate#17 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
storytold/craft-libs#5594 ·
Maintainers usually reply within 1 day
-
available documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Nixitov/Riptide-Native#932 ·
Maintainers usually reply within 1 day