Skip to content

Conversation

@miss-islington
Copy link
Contributor

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

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
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
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