Cryptographical Expendable Notes
Project description
C(ryptographical) E(xpendable) Notes
Free software: GNU General Public License v3
Documentation: https://cenotes.readthedocs.io
What is this?
A backend project to support encryption/decryption of expendable notes
An example using this backend can be found at https://cenot.es
Features
Symmetric encryption of notes using the pynacl project
- On the fly encryption/decryption
Notes can be encrypted/decrypted on the fly without storing anything on the server
- Expiration date notes
After that date, the notes are deleted and cannot be retrieved (default is never)
- Notes that are deleted after N visits
After N retrievals of a note, the note is deleted (default is 1)
- Duress key for immediate note deletion
Using the duresss key instead of the real decryption key will delete the note and respond as if the note didn’t exist (to avoid indicating the use of the duress key)
- Persistent visit notes
Notes can be marked as “persistent visit” so that that they are not deleted based on visit count
What this isn’t
UI/Frontend. This is a backend project. Frontend solutions will be different projects. The reason for this is to allow flexibility in frontend choice and to avoid huge bundle projects.
A frontend project that communicates with the backend can be found here
How to run
Many ways to run this:
Cloning the repo
Clone the repo
git clone https://github.com/ioparaskev/cenotes.git
Install the requirements
With pipenv (suggested)
pip install pipenv pipenv install
With pip (not suggested):
pip install -r requirements-dev.txt
Set the environment variables as shown in settings
Check your database table as shown in db_schema is up-to-date
python manage.py db upgrade
Run the backend
python run_backend.py --help
Installing the package
Install the package
sudo pip install cenotes
Set the environment variables as shown in settings
Run the backend
cenotes --help
How to deploy
Example uwsgi file to use to serve the backend:
from cenotes import create_app application = create_app() if __name__ == "__main__": application.run()
Project Settings
This project needs two things to be set as environment variables:
DB_URI: An RFC-1738 url that points to the database. For more info see sqlalchemy engines
SERVER_ENCRYPTION_KEY (optional) : A 32-bytes key that will be used by the server to encrypt the stored notes index number (not used in on-the-fly notes). Base64 keys that are decoded as 32-bytes are also supported. If no key is set, backend generates one and prints it in the console. You need to have this key consistent, for stored-notes to work!
Database schema
As mentioned in settings, you’ll need a database connection. The database schema is simple enough:
CREATE TABLE note ( id INTEGER NOT NULL, max_visits INTEGER, visits_count INTEGER, payload BLOB NOT NULL, expiration_date DATE, PRIMARY KEY (id) );
Features to be added sometime
- Modification of a note’s settings
Zero visit count
Change max visits option
Change expiration date
Public key encryption and user database
History
0.2.2 (2017-10-23)
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.