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 byOwlClient.registerand used byOwlServer.registerUserCredentials- Contains user credentials to be stored permanently in the database alongside the usernameAuthInitRequest- Contains values output byOwlClient.authInitand used byOwlServer.authInitAuthInitialValues- Temporary values output byOwlServer.authInitand used byOwlServer.authFinishto be stored in the database alongside the username. AfterOwlServer.authFinishis complete, these values can be deletedAuthInitResponse- Contains values output byOwlServer.authInitand used byOwlClient.authFinishAuthFinishRequest- Contains values output byOwlClient.authFinishand used byOwlServer.authFinish
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file owl_crypto_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: owl_crypto_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d5357b46061f40e1f5b2c6048103ac3a248d557f5fdab4adf407af11bc7320
|
|
| MD5 |
28743a998100e61e1a29769943ba9289
|
|
| BLAKE2b-256 |
aeb7e2150c367e5d820c528951ffc4c7d8378070a9753e13c91cbe05387668e0
|