Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Element-R: pass pickleKey in as raw key for indexeddb encryption #12543

Merged
merged 6 commits into from
Jun 5, 2024

Commits on May 24, 2024

  1. Element-R: pass pickleKey in as raw key for indexeddb encryption

    Currently, we pass the `pickleKey` to the rust library for use as a passphrase
    for encrypting its crypto store. The Rust libary then passes that passphrase
    through 200000 rounds of PBKDF2 to generate an encryption key, which is
    (deliberately) slow.
    
    However, the pickleKey is actually 32 bytes of random data (base64-encoded). By
    passing the raw key into the rust library, we can therefore save the PBKDF
    operation.
    
    Backwards-compatibility with existing sessions is maintained, because if the
    rust library discovers that the store was previously encrypted with a key based
    on a PBKDF, it will re-base64 and PBKDF the key we provide, thus reconstructing
    the right key.
    richvdh committed May 24, 2024
    Configuration menu
    Copy the full SHA
    8502bd9 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Update src/Lifecycle.ts

    Co-authored-by: Florian Duros <florianduros@element.io>
    richvdh and florianduros authored Jun 3, 2024
    Configuration menu
    Copy the full SHA
    54e7bcd View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Lifecycle-test: clean up test setup

    Rely less on the unit under test for setting up the test preconditions -- not
    least because we don't really want to fire up matrix clients and the like
    during test setup.
    richvdh committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    cd164e2 View commit details
    Browse the repository at this point in the history
  2. Factor out "encryptPickleKey" method

    For a start it makes it easier to grok what's going on, but also I went to use
    this in a test
    richvdh committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    9ecff76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5c32807 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Configuration menu
    Copy the full SHA
    321c934 View commit details
    Browse the repository at this point in the history