Skip to content

(WIP) End-to-End Encryption (E2EE) made easy for react-native projects

License

Notifications You must be signed in to change notification settings

siepra/react-native-e2ee

Repository files navigation

React Native E2E Encryption (WIP)

Handling cryptography easily with JS interfaces.

Description

This projects addresses the purpose of providing a developer friendly JS interface for generating, safely storing and serving cryptographic keys for end-to-end encryption on Android and iOS devices. Of course, the server (or another handy way of distributing data between devices) is needed, but the point of this package is to provide a developer with clients' public key and all the necessary methods to use in end-to-end encrypted communication without forcing him/her to dive into native implementations for generating and storing cryptohgraphic data.

Security

The project encrypts with RSA (Ultimately it'll use hybrid encryption with RSA and AES).

Installation

Open a Terminal in your project's folder and run:

Using yarn

yarn add react-native-e2ee

Using npm

npm install react-native-e2ee

Usage/API

  • generateKeyPair(): Promise<string> - generates/fetches key pair for fixed alias and returns the public key.
  • getOwnPublicKey(): Promise<string | null> - returns own public key or null if non existing.
  • encryptMessage( message: string, publicKey: string ): Promise<string | null> - encrypts message for the given public key.
  • decryptMessage(message: string): Promise<string | null> - decrypts message using own public key.

Key progress so far

  • Full API coverage for Android
  • Full API coverage for iOS

Roadmap

Examine the upcoming changes here.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

(WIP) End-to-End Encryption (E2EE) made easy for react-native projects

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published