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

Note big-endian compatibility issues in CHANGELOG #623

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Apr 20, 2020

Recent changes in Secure Cell code to support password-based API and introduction of automated fuzz testing led to refactoring of a lot of code to improve resilience to malicious and erroneous inputs.

This effort has discovered that Themis is likely to be not compatible between little- and big-endian machines. Various parsing and generation code has been using “native” endian order. That is, data encrypted on little-endian machines cannot be read on big-endian machines and vice versa. If usage is strictly confined to exclusively big-endian machines then it's probably fine.

I say “probably” because big-endian architectures have never been a priority for Themis. We have never tested on them and are not sure that Themis works there correctly, even without talking about inter-endian compatibility.

So... Recent changes in Secure Cell start improving the situation by explicitly using little-endian order in data structures. Eventually this will lead to proper support of big-endian architectures which will be able to talk to little-endian machines just fine. But right now this means that data encrypted by Themis 0.12 on big-endian machines will be not readable with Themis 0.13, even on big-endian machines. Similarly, data encrypted by Themis 0.13 on big-endian machines will not be readable by Themis 0.12 on big-endian machines (but will be readable on little-endian machines).

Here's a compatibility table:

Source Destination
Little-endian Big-endian
0.12 0.13 0.12 0.13
Little-endian 0.12
🎉
0.13 🎉
Big-endian 0.12 🙏🏻
💥
0.13 🎉 🎉 💥 🎉

Legend:

  • ✅ — known to work
  • ❌ — probably did not work before and will not work in the future
  • 🎉 — probably works now and will work in the future
  • 🙏🏻 — probably worked before
  • 💥 — is likely to be broken since 0.13 and will remain that way

This is for Secure Cell. For any other cryptosystems, big-endian ⟺ big-endian quadrant is likely to be 🙏🏻, and others are filled with ❌.

If you have been using Themis on big-endian machines and it actually worked then I'm pleasantly surprised by the portability of the code. At the same time I offer my condolences for the loss of time we're going to incur on you by doing these changes.

We will announce full big-endian support as soon as it is ready. For now, you're on your own. Themis does not support big-endian machines at the moment.

Recent changes in Secure Cell code to support password-based API and
introduction of automated fuzz testing led to refactoring of a lot of
code to improve resilience to malicious and erroneous inputs.

This effort has discovered that Themis is likely to be not compatible
between little- and big-endian machines. Various parsing and generation
code has been using "native" endian order. That is, data encrypted on
little-endian machines cannot be read on big-endian machines and vice
versa. If usage is strictly confined to exclusively big-endian machines
then it's probably fine.

I say "probably" because big-endian architectures have never been a
priority for Themis. We have never tested on them and are not sure that
Themis works there correctly, even without talking about inter-endian
compatibility.

So... Recent changes in Secure Cell start improving the situation by
explicitly using little-endian order in data structures. Eventually this
will lead to proper support of big-endian architectures which will be
able to talk to little-endian machines just fine. But right now this
means that data encrypted by Themis 0.12 on big-endian machines will be
not readable with Themis 0.13, even on big-endian machines. Similarly,
data encrypted by Themis 0.13 on big-endian machines will not be
readable by Themis 0.12 on big-endian machines (but *will* be readable
on little-endian machines).

If you have been using Themis on big-endian machines and it actually
worked then I'm pleasantly surprised by the portability of the code. At
the same time I offer my condolences for the loss of time we're going to
incur on you by doing these changes.

We will announce full big-endian support as soon as it is ready. For
now, you're on your own. Themis does not support big-endian machines
at the moment.
@ilammy ilammy added docs 📚 Documentation, both offline and online compatibility Backward and forward compatibility, platform interoperability issues, breaking changes labels Apr 20, 2020
@ilammy ilammy merged commit 8dad0f5 into cossacklabs:master Apr 22, 2020
@ilammy ilammy deleted the endianness branch April 22, 2020 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Backward and forward compatibility, platform interoperability issues, breaking changes docs 📚 Documentation, both offline and online
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants