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.1.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.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: owl_crypto_py-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 823677a0b97e44abfc09a6afcc4f44e73a6b54212c1974b923371784705c1b39
MD5 db29b2737311ecec5ccc0760140548fc
BLAKE2b-256 f37813a8e38a3dc44112cec54967970b3bf7097a83d642bb6d6f51e72339e0ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: owl_crypto_py-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6ae5bac8a24a42c8c60dde02456b496920b2bc663b0034a8cc4bd5007d502df
MD5 376e7597e37bd9b0a31688779063cef4
BLAKE2b-256 ecb0439aab6f8e880e0c66060e1688a57cd9c6c4dc2cc1d921947ce90905c923

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