Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-225

Make encrypted Realms cross platform compatible

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The way Realm encryption works is dependent on the size of a memory page - usually that's different between 32bit and 64bit devices (or more specifically the architecture of the app, not the device).

      We should switch to a fixed size as part of core 6.
      Historically the size had to be a multiple of the mprotect granularity (which isn't actually the same thing as the page size on ios) and we didn't want to change it for 32-bit for compatibility reasons, but that's no longer applicable.
      The hmac makes it so that we can detect the page size used: just try to decrypt with both 4k and 16k page sizes, and whichever one matches the signature is correct.

      The issue is experienced in e.g. Studio: https://github.com/realm/realm-dotnet/issues/1779#issuecomment-431079582

            Assignee:
            Unassigned Unassigned
            Reporter:
            brian.munkholm@mongodb.com Brian Munkholm (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: