Skip to content

Conversation

@jazzz
Copy link
Collaborator

@jazzz jazzz commented Nov 27, 2025

Problem

The call to copyMem, during HKDFSplit was copying data in the wrong direction. This meant that the function was returning bad data. E.g. zeros for the initial Root, and chainSend keys.

Solution

Change the parameter order to match docs: https://nim-lang.org/docs/system.html#copyMem%2Cpointer%2Cpointer%2CNatural

Notes

Until the tests execute known test vectors, data from the poc implementation cannot be trusted for accuracy

@jazzz jazzz requested a review from kaichaosun November 27, 2025 19:08
@jazzz jazzz merged commit c6e0368 into main Nov 28, 2025
1 check passed
@jazzz jazzz deleted the jazzz/memcpy_fix branch December 1, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants