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

Remove transmutes, use a pointer cast and fail on BE #11

Closed
hdevalence opened this issue Aug 27, 2018 · 1 comment
Closed

Remove transmutes, use a pointer cast and fail on BE #11

hdevalence opened this issue Aug 27, 2018 · 1 comment
Milestone

Comments

@hdevalence
Copy link
Contributor

Because the keccak crate takes a state as [u64; 25] (cf RustCrypto/sponges#3), the code currently does a transmute to convert from bytes.

This should be replaced with a pointer cast on little-endian machines.

On big-endian machines, a byteswap is probably necessary, but since I don't have one to test on and I'm not sure that the keccak crate works correctly there, it seems better to just fail to compile rather than provide possibly-wrong code.

@hdevalence hdevalence added this to the 0.3 milestone Aug 27, 2018
@hdevalence
Copy link
Contributor Author

Closed by #20

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

No branches or pull requests

1 participant