DIDComm Messaging implemented with swappable backends.
Project description
didcomm-messaging-python
This is a minimal but flexible implementation of DIDComm Messaging. To learn more about DIDComm Messaging, check out the spec or visit didcomm.org to learn about DIDComm Messaging protocols defined by the community.
Usage
Overview
This library has the following core components (as outlined in the layer cake architecture diagram above):
CryptoService
The CryptoService provides the core cryptographic capabilities needed to encrypt and decrypt DIDComm Messages. This service is designed to be implemented by users of this library; however, an implementation using Aries Askar is available as an extra (install the askar
extra to use it). Additional implementations may be added as extras in the future (i.e. an implementation using Authlib's JWE implementation or perhaps an implementation backed by an HSM). The service is seprate from but closely coupled with the SecretsManager. Both must use the same public and private key representations.
[!WARNING] TODO:
- More details on implementing your own CryptoService
- More details on using the included Askar CryptoService
SecretsManager
The SecretsManager is responsible for retrieving secrets for use by the CryptoService. It is notable that the secret value need not literally contain the value of a private key. For example, in the included Askar implementation, an Askar Key
value is retrieved. This object in python does permit you to retrieve the bytes of the secret key from Askar if you choose; however, this is not necessary for the operation of the library. This enables Askar to keep the private key value down in the Rust layer where it can better ensure security of the key (zeroizing memory, etc.). This is not so distant from interacting with an HSM; as long as the SecretKey
value retrieved by the SecretsManager can be used by the CryptoService to perform the required cryptographic operations, exactly what is stored inside of the SecretKey
object is irrelevant.
[!WARNING] TODO:
- More details on implementing your own SecretsManager
- More details on the included AskarSecretsManager
DIDResolver
This component provides a fairly generic DID Resolution interface. Users of this library will provide a resolver implementation for the DID Methods they care about. Implementations of did:peer:2 and did:peer:4 are included as part of the did_peer
extra.
[!WARNING] TODO:
- More details on PrefixResolver
- More details on implementing your own DIDResolver
PackagingService
The PackagingService is responsible for the core functions of packing and unpacking messages. It depends on the CryptoService, the SecretsManager, and the DIDResolver to accomplish this.
[!WARNING] TODO:
- More details on PackagingService
RoutingService
The RoutingService is responsible for preparing messages for forwarding to a mediator. It depends on the PackagingService and the DIDResolver to accomplish this.
[!WARNING] TODO:
- More details on RoutingService
DIDCommMessaging
The DIDCommMessaging interface is the main entrypoint for interacting with this library. It utilizes all the layers below to prepare messages for other parties.
[!WARNING] TODO:
- More details on DIDCommMessaging
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 Distribution
Built Distribution
File details
Details for the file didcomm_messaging-0.1.2a3.tar.gz
.
File metadata
- Download URL: didcomm_messaging-0.1.2a3.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.18.2 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c8fad89a146837daef8013ccb94df4d5ff9ce497463a0e5ed857ba770d4aabd |
|
MD5 | dbb72e379d38046ff5b42e1c34250982 |
|
BLAKE2b-256 | b4d4ddc2e36cb20be25eb45c71c960a69ccc21c83f3249328df9e3eec2c0de7d |
File details
Details for the file didcomm_messaging-0.1.2a3-py3-none-any.whl
.
File metadata
- Download URL: didcomm_messaging-0.1.2a3-py3-none-any.whl
- Upload date:
- Size: 50.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.18.2 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3d380d908b05bb88f270cfa71eeeaec637233120438bfc82833f56d03772c14 |
|
MD5 | 0fa0b53971fd5357a59ee5f558a4693c |
|
BLAKE2b-256 | 9c7a9e613bec3bf232d7f91a7b999132557055815256ef410e6a66c88c607454 |