Skip to main content

Python implementation of the OWL aPAKE protocol

Project description

owl-py

A Python implementation of the Owl augmented PAKE protocol, based on the Owl paper.

Installation

(its not installable yet)

To install the package, run:

pip install owl-py

Or install directly from the repository:

git clone https://github.com/yourusername/owl-py.git
cd owl-py
pip install -e .

Dependencies

pip install cryptography

Features

  • Secure Password-Based Authentication: Implements the OWL (Optimal Password Authenticated Key Exchange) protocol
  • Zero-Knowledge Proofs: Password is never transmitted or revealed
  • Standard Elliptic Curves: Support for P-256, P-384, P-521

Setup

The client and server must use the same configuration of elliptic curve and server identity. The configuration object can be created as follows:

from owl_common import Config, Curves

config = Config(
    curve=Curves.P256,
    serverId="example.com"
)

The possible values of Curves are:

  • Curves.P256 - NIST P-256 curve (recommended for most uses)
  • Curves.P384 - NIST P-384 curve (higher security)
  • Curves.P521 - NIST P-521 curve (maximum security)

This configuration can then be used to set up the client and server:

from owl_client import OwlClient
from owl_server import OwlServer

client = OwlClient(config)
server = OwlServer(config)

Messages

The Owl server and client use messages for input and output. Messages can be serialized to JSON with the serialize() method. Messages can be deserialized using the deserialize() method. This method takes either a dict object or its string representation and returns a message object or a DeserializationError if the input was not a valid message.

There are 6 message classes:

  • RegistrationRequest - Contains values output by OwlClient.register and used by OwlServer.register
  • UserCredentials - Contains user credentials to be stored permanently in the database alongside the username
  • AuthInitRequest - Contains values output by OwlClient.authInit and used by OwlServer.authInit
  • AuthInitialValues - Temporary values output by OwlServer.authInit and used by OwlServer.authFinish to be stored in the database alongside the username. After OwlServer.authFinish is complete, these values can be deleted
  • AuthInitResponse - Contains values output by OwlServer.authInit and used by OwlClient.authFinish
  • AuthFinishRequest - Contains values output by OwlClient.authFinish and used by OwlServer.authFinish

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is released under the MIT License. See the LICENSE file for details.

Acknowledgments

Made with ❤️ in Python

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

owl_crypto_py-1.0.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owl_crypto_py-1.0.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file owl_crypto_py-1.0.2.tar.gz.

File metadata

  • Download URL: owl_crypto_py-1.0.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for owl_crypto_py-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c75e67c9e882b74ae3df8cc8031bf7f232c663f0e2920767e24bf10cc51eeb58
MD5 e348c8045513db8919c0632ff75f1f98
BLAKE2b-256 e58dfa2af9751167bedb900dd977b4a220249cc3767b4b6ebbad4c0c459a601a

See more details on using hashes here.

File details

Details for the file owl_crypto_py-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: owl_crypto_py-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for owl_crypto_py-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 670a6839dfca7cdda7e581c7a340b2e04acdc04c1665715e9ed7ccc99e0f8e49
MD5 c6bcb2af9289f2f930ecca6754e9fe5f
BLAKE2b-256 008c72538917fa685b59ede22fa18b697227077c146ffd629566d95e56294c1f

See more details on using hashes here.

Supported by

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