Skip to content

[3.6] bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250)#4262

Merged
tiran merged 1 commit into
python:3.6from
miss-islington:backport-dcfb0e3-3.6
Nov 3, 2017
Merged

[3.6] bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250)#4262
tiran merged 1 commit into
python:3.6from
miss-islington:backport-dcfb0e3-3.6

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 3, 2017

Copy link
Copy Markdown
Contributor

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.

See BLAKE2/libb2#12.
(cherry picked from commit dcfb0e3)

https://bugs.python.org/issue31933

…onGH-4250)

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.

See BLAKE2/libb2#12.
(cherry picked from commit dcfb0e3)
@miss-islington

Copy link
Copy Markdown
Contributor Author

@oconnor663 and @tiran: Backport status check is done, and it's a success ✅ .

@tiran tiran merged commit a512493 into python:3.6 Nov 3, 2017
@miss-islington

Copy link
Copy Markdown
Contributor Author

Thanks, @tiran!

@miss-islington miss-islington deleted the backport-dcfb0e3-3.6 branch November 3, 2017 19:55
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.

5 participants