Files
pynkode/README.md
2025-03-26 09:15:40 -05:00

70 lines
2.1 KiB
Markdown

# Readme
pynkode is a tutorial of how nkode works.
There are jupyter notebooks in /notebooks covering these topics:
- dispersion
- nkode enrollment, login, and renewal
- split shuffle
## Installation
- Python version 3.10 or greater is required
- Install pyenv or conda for environment management
### Option 1: Using conda
```bash
# Create a new conda environment named pynkode
conda create -n pynkode python=3.10
# Activate the environment
conda activate pynkode
# Install the requirements
pip install -r requirements.txt
```
### Option 2: Using pyenv
```bash
# Install Python 3.10 using pyenv
pyenv install 3.10.0
# Create a virtualenv named pynkode
pyenv virtualenv 3.10.0 pynkode
# Set the local version to pynkode
pyenv local pynkode
# Install the requirements
pip install -r requirements.txt
```
## Starting a Jupyter Notebook
### Option 1: Using classic Jupyter Notebook
```bash
# Ensure your environment is activated
# For conda: conda activate pynkode
# For pyenv: (should be automatic if in the directory)
# Start the Jupyter Notebook server
jupyter notebook
```
### Option 2: Using JupyterLab
```bash
# Ensure your environment is activated
# Start JupyterLab
jupyter lab
```
## Explore the Docs
1. [nKode Enrollment](docs/enrollment_diagram.md)
2. [nKode Login](docs/login_diagram.md)
3. [Encipher nKode](docs/encipher_decipher_renew_nkode.md#nkode-cipher)
4. [Valid nKode](docs/encipher_decipher_renew_nkode.md#validate-nkode)
5. [Renew nKode](docs/encipher_decipher_renew_nkode.md#renew-nkode)
## Exploring the Tutorials
1. Navigate to the `/notebooks` directory in the Jupyter interface
2. Recommended order:
- [Enrollment_Login_Renewal_Simplified.ipynb](notebooks/Enrollment_Login_Renewal_Simplified.ipynb) - Learn the basics of the nKode API
- [Enrollment_Login_Renewal_Detailed.ipynb](notebooks/Enrollment_Login_Renewal_Detailed.ipynb) - Learn the nKode API in detail
- [Dispersion.ipynb](notebooks/Dispersion.ipynb)- Understand the basic concepts of dispersion in nkode
- [Split_Shuffle.ipynb](notebooks/Split_Shuffle.ipynb) - Explore the split shuffle functionality