Common lib for diamory.
It's very specific, but if it suites your needs, feel free to use it for your projects,
fulfilling the license conditions.
- AES-256-GCM
- AES-KEY-WRAP
- SCRYPT pbkdf
- HMAC
Full Security Architecture documentation
For short:
- Contents will be encrypted with random content key, using AES-256 in GCM mode of operation.
- Content keys will be encrypted with the master encryption key, using AES-256 in GCM mode of operation.
- Authenticity and integrity of index will be checked with the master hmac key, using HMAC.
- master encryption key and master hmac key will be wrapped with the password key, using aes-key-wrap.
- The password key will be derived, using scrypt.
npm install diamory-commonFor code analyses and automatic tests, run:
npm run qaFor automatic tests only, run:
npm run testBuild with:
npm run buildNote: replace {...} with the destructure syntax for the parts you want to import ({init, unlock} for example).
- For project whichs targets the browser:
import {...} from 'diamory-common/browser';
- For project whichs targets mobile apps, using react-native:
import {...} from 'diamory-common/native';
The code examples assume mobile app as target. Just change /native to /browser to use for for apps targeting browsers.
TBD