apexDev37 / Cipher

Attempt to pair with an LLM to supercharge user account recovery protocols.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cipher · Inline docs Python version PRs Welcome Activity

Attempt to pair with an LLM to supercharge user account recovery protocols.

Table of Contents

Introduction

Cipher is a small, LLM-powered, application that aims to enhance user account recovery. This is achieved by integrating an LLM into the account recovery protocol and process. Cipher showcases a real-life scenario of abstracting/hiding sensitive data in a process closely coupled to a Large Language Model. This is achieved by delegating business logic concerns to the application and assigning generative-dependent responsibilities to the LLM.

Motivation

This repository is primarily for learning and experimentation, with the aim of leveraging it in future AI-powered, production-grade applications. I've recently been delving into and learning web security, prompted by a critical system I'm working on. Hence the theme and name for this repo which allows me to wear and test my "security hat"🤠💥

Installing / Getting Started

This is an overview of the minimal setup needed to get started.

Prerequisites

Local Setup

The following commands were run on Ubuntu focal (20.04.6 LTS)

  • Clone repository
    # cd your/desired/target/dir
    $ git clone git@github.com:apexDev37/Cipher.git cipher
    $ cd cipher

This command clones the repository into a target directory on your local machine with the name cipher/ and navigates into the repository's root directory.

Create a virtual environment with your preferred package manager to isolate Cipher's required dependencies. I'm using virtualenvwrapper. See more details on virtual environments and virtualenv.

  • Create virtual environment
    $ mkvirtualenv -p python3.10 cipher

This will create and activate a managed virtual env called cipher using a Python 3.10.x interpreter on your local machine. Note: If you are not using virtualenvwrapper, run the command to create your virtual environment from the project's root directory.

  • Install required packages
    # We need `pip-sync` for the next command
    $ pip install -r <(cat requirements/pip.txt requirements/pip-tools.txt)
    # Install packages and sync your venv
    $ pip-sync requirements/*.txt

First, install pip and pip-tools requirements to access additional package management utilities. Next, use pip-sync to install all project requirements and synchronize our active virtual environment with pinned package versions.

⚠ Note, if you face an issue while installing requirements, particularly with langflow, run the following setup commands and rerun pip-sync ....

    # Ensure you have Python dev headers
    $ sudo apt install python3.x-dev    # Replace with your py version
    # Install other required dependencies
    $ sudo apt install build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev

This first installs Python development headers on your local machine. Next, other dependencies essential for compiling and building Python packages, especially those with C extensions are installed.

About

Attempt to pair with an LLM to supercharge user account recovery protocols.

License:MIT License