ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

Encrypted storage #252

Open kirillt opened 2 years ago

kirillt commented 2 years ago

We can add [encrypt] operation for a resource of any kind. Upon activation, the resource would be encrypted and moved into .ark/encrypted subfolder.

A password should be used for encryption and decryption, but it would be nice to use PIN-code for decryption (so we would store encryption keys and unlock them when PIN is valid). Fingerprint instead of PIN can be used as well (must be configurable).

The resource must be possible:

  1. To share in encrypted form, e.g. send via a messenger.
  2. To decrypt without the app.

To achieve these, some common algorithm and format must be used. See https://github.com/C2SP/C2SP/blob/main/age.md and https://github.com/str4d/rage.

Encryption would break last modified attribute, so first discovered or "our own" last modified should be used, see ARK-Builders/arklib#66 for the inspiration. It would be nice to sort resources in the way like they are without encryption, just asking PIN code for displaying protected resources.

kirillt commented 2 years ago

Encrypted resources should be labeled by special encrypted tag automatically.