Skip to content

jacksonwalters/open-encrypt

Repository files navigation

open-encrypt

Full stack, post-quantum, fully homomorphic encrypted messaging application using ring-LWE in PHP + SQL + Python.

RESOURCES:


SQL:

Three tables are required to store login_info, messages, and public_keys.

login_info:

  • username CHAR(14)
  • password CHAR(60)
  • token CHAR(32)

Passwords are hashed using standard hashing. Secure, random tokens stored for user sessions.

messages:

  • from CHAR(14)
  • to CHAR(14)
  • message VARCHAR(8000)

Messages are stored encrypted. The inflation ratio is ~13.7.

public_keys:

  • username CHAR(14)
  • public_key CHAR(192)

Public keys are a single string representing two (reduced cyclotomic) polynomials which are each arrays of ints.

PHP:

Used to handle basic account creation, login, and SQL insertions/lookups.

Python:

Python scripts are executed directly using shell_exec. Output is printed and passed back as a string.