Skip to main content

Cryptographical Expendable Notes

Project description

https://travis-ci.org/ioparaskev/cenotes.svg?branch=master Documentation Status

C(ryptographical) E(xpendable) Notes

What is this?

A backend project to support encryption/decryption of expendable notes

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)

  • 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.

How to run

Many ways to run this:

  • Cloning the repo

    1. Clone the repo

      git clone https://github.com/ioparaskev/cenotes.git
    2. Install the requirements

      • With pipenv (suggested)

        pip install pipenv
        pipenv install
      • With pip (not suggested):

        pip install -r requirements-dev.txt
    3. Set the environment variables as shown in settings

    4. Check your database table as shown in db_schema is up-to-date

      python manage.py db upgrade
    5. Run the backend

      python run_backend.py --help
  • Installing the package

    1. Install the package

      sudo pip install cenotes
    2. Set the environment variables as shown in settings

    3. Run the backend

      cenotes --help

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 soon

  • Modification of a note’s settings
    • Zero visit count

    • Change max visits option

    • Change expiration date

  • Triggering manual deletion of a note (bypass note settings and delete immediately)

  • Public key encryption and user database

History

0.2.2 (2017-10-23)

  • First release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cenotes-0.3.0.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page