This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: some Blake2 parameters are encoded backwards on big-endian platforms
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, oconnor663
Priority: normal Keywords: patch

Created on 2017-11-03 12:27 by oconnor663, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4250 merged python-dev, 2017-11-03 12:29
PR 4262 merged python-dev, 2017-11-03 19:03
Messages (4)
msg305473 - (view) Author: Jack O'Connor (oconnor663) * Date: 2017-11-03 12:27
See https://github.com/BLAKE2/libb2/issues/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.
msg305476 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-11-03 12:52
Good work, thanks for your PR!
msg305498 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-11-03 19:02
New changeset dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a by Christian Heimes (Jack O'Connor) in branch 'master':
bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)
https://github.com/python/cpython/commit/dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a
msg305502 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-11-03 19:55
New changeset a512493371a073e252a2e52b445aa2d66ddca7cb by Christian Heimes (Miss Islington (bot)) in branch '3.6':
bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (#4262)
https://github.com/python/cpython/commit/a512493371a073e252a2e52b445aa2d66ddca7cb
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76114
2017-11-03 20:34:17christian.heimessetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-11-03 19:55:57christian.heimessetmessages: + msg305502
2017-11-03 19:03:50python-devsetpull_requests: + pull_request4224
2017-11-03 19:02:44christian.heimessetmessages: + msg305498
2017-11-03 12:52:05christian.heimessetversions: - Python 3.8
nosy: + christian.heimes

messages: + msg305476

assignee: christian.heimes
components: + Extension Modules
2017-11-03 12:29:46python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4211
2017-11-03 12:27:26oconnor663create