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

some Blake2 parameters are encoded backwards on big-endian platforms #76114

Closed
oconnor663 mannequin opened this issue Nov 3, 2017 · 4 comments
Closed

some Blake2 parameters are encoded backwards on big-endian platforms #76114

oconnor663 mannequin opened this issue Nov 3, 2017 · 4 comments
Assignees
Labels
3.7 (EOL) end of life extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@oconnor663
Copy link
Mannequin

oconnor663 mannequin commented Nov 3, 2017

BPO 31933
Nosy @tiran, @oconnor663
PRs
  • bpo-31933: fix blake2 multi-byte params on big endian platforms #4250
  • [3.6] bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) #4262
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tiran'
    closed_at = <Date 2017-11-03.20:34:17.256>
    created_at = <Date 2017-11-03.12:27:26.224>
    labels = ['extension-modules', 'type-bug', '3.7']
    title = 'some Blake2 parameters are encoded backwards on big-endian platforms'
    updated_at = <Date 2017-11-03.20:34:17.255>
    user = 'https://github.com/oconnor663'

    bugs.python.org fields:

    activity = <Date 2017-11-03.20:34:17.255>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2017-11-03.20:34:17.256>
    closer = 'christian.heimes'
    components = ['Extension Modules']
    creation = <Date 2017-11-03.12:27:26.224>
    creator = 'oconnor663'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31933
    keywords = ['patch']
    message_count = 4.0
    messages = ['305473', '305476', '305498', '305502']
    nosy_count = 2.0
    nosy_names = ['christian.heimes', 'oconnor663']
    pr_nums = ['4250', '4262']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31933'
    versions = ['Python 3.6', 'Python 3.7']

    @oconnor663
    Copy link
    Mannequin Author

    oconnor663 mannequin commented Nov 3, 2017

    See BLAKE2/libb2#12.

    All Blake2 params have to be encoded in little-endian byte order. For the two multi-byte integer params, leaf_length and node_offset, that means that assigning a native-endian integer to them appears to work on little-endian platforms, but gives the wrong result on big-endian. The current libb2 API doesn't make that very clear, and @sneves is working on new API functions in the GH issue above. In the meantime, we can work around the problem by explicitly assigning little-endian values to the parameter block.

    @oconnor663 oconnor663 mannequin added 3.8 only security fixes 3.7 (EOL) end of life type-bug An unexpected behavior, bug, or error labels Nov 3, 2017
    @tiran
    Copy link
    Member

    tiran commented Nov 3, 2017

    Good work, thanks for your PR!

    @tiran tiran added extension-modules C modules in the Modules dir and removed 3.8 only security fixes labels Nov 3, 2017
    @tiran tiran self-assigned this Nov 3, 2017
    @tiran
    Copy link
    Member

    tiran commented Nov 3, 2017

    New changeset dcfb0e3 by Christian Heimes (Jack O'Connor) in branch 'master':
    bpo-31933: fix blake2 multi-byte params on big endian platforms (bpo-4250)
    dcfb0e3

    @tiran
    Copy link
    Member

    tiran commented Nov 3, 2017

    New changeset a512493 by Christian Heimes (Miss Islington (bot)) in branch '3.6':
    bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (bpo-4262)
    a512493

    @tiran tiran closed this as completed Nov 3, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant