Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

files_load_unique_data: fix unique data copy to ecc point #3331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 8, 2024

  1. files_load_unique_data: fix unique data copy to ecc point

    Split of unique data into x and y components of ecc point currently
    fumbles the indexes leading to incomplete copy.
    Using "IAK" (size=3) as input, this leads to:
    > x.size = (unique_size / 2) = 1
    > x.buffer = unique_size[0,1[ = ['I']
    > y.size = (unique_size / 2) + (unique_size % 2) = 2
    > y.buffer = unique_size[1,2[ + 0 = ['A', 0]
    
    Change copy bounds to copy "bigger" first half in x and remainder in y
    to reach a more reasonable result:
    > x.size = (unique_size / 2) + (unique_size % 2) = 2
    > x.buffer = unique_size[0,2[ = ['I', 'A']
    > y.size = (unique_size / 2) + (unique_size % 2) = 2
    > y.buffer = unique_size[2,3[ + 0 = ['K', 0]
    
    Signed-off-by: Julien Gomes <[email protected]>
    gomesj committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    93a4262 View commit details
    Browse the repository at this point in the history