Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.23k stars 2.69k forks source link

End-To-End Encryption: Custom Encryption Library #21144

Closed robertjchen closed 8 months ago

robertjchen commented 1 year ago

cc: Margelo

Please implement a custom encryption library to be used as part of the new End to End Encryption feature in the App.

Namely, it will provide symmetric (AES) and asymmetric (RSA4096 + Kyber1024) encryption functions to be used by the App as well as in the backend.

Please refer to the planning doc for additional context!

Considerations

Proposed Interface

// synchronous mockup, but final solution may be asynchronous as well 👍

For the following functions, the pubKeys and privKeys arguments should be provided in JSON format:

    privKeys : {
        "kyber1024" : {
            "privkey": "<base64 private key>",
         },
        "rsa4096" : {
            "privkey": "<base64 private key>",
        },
    }

// ---

    privKeys : {
        "kyber1024" : {
            "pubkey": "<base64 public key>",
         },
        "rsa4096" : {
            "pubkey": "<base64 public key>",
        },
    }
chrispader commented 8 months ago

Thanks and wuhuu! 🚀🎉

chrispader commented 8 months ago

Are we still thinking about adding signing and verifying functionality with Dillithium?

robertjchen commented 8 months ago

Great q, I think we'll still need it down the line 🤔 We'll see how things pan out in planning now that the priorities are clear