swarmauri_crypto_pgp 0.3.0.dev4__tar.gz → 0.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swarmauri_crypto_pgp-0.11.0/NOTICE +7 -0
- swarmauri_crypto_pgp-0.11.0/PKG-INFO +430 -0
- swarmauri_crypto_pgp-0.11.0/README.md +400 -0
- {swarmauri_crypto_pgp-0.3.0.dev4 → swarmauri_crypto_pgp-0.11.0}/pyproject.toml +57 -7
- {swarmauri_crypto_pgp-0.3.0.dev4 → swarmauri_crypto_pgp-0.11.0}/swarmauri_crypto_pgp/PGPCrypto.py +60 -19
- swarmauri_crypto_pgp-0.3.0.dev4/PKG-INFO +0 -146
- swarmauri_crypto_pgp-0.3.0.dev4/README.md +0 -118
- {swarmauri_crypto_pgp-0.3.0.dev4 → swarmauri_crypto_pgp-0.11.0}/LICENSE +0 -0
- {swarmauri_crypto_pgp-0.3.0.dev4 → swarmauri_crypto_pgp-0.11.0}/swarmauri_crypto_pgp/__init__.py +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_crypto_pgp
|
|
3
|
+
Version: 0.11.0
|
|
4
|
+
Summary: OpenPGP (GnuPG) + AES-GCM crypto provider for Swarmauri
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Keywords: swarmauri,sdk,standards,crypto,pgp,cryptography
|
|
9
|
+
Author: Jacob Stewart
|
|
10
|
+
Author-email: jacob@swarmauri.com
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Topic :: Security :: Cryptography
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Requires-Dist: cryptography (>=41)
|
|
25
|
+
Requires-Dist: python-gnupg (>=0.5.0)
|
|
26
|
+
Requires-Dist: swarmauri_base
|
|
27
|
+
Requires-Dist: swarmauri_core
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# swarmauri_crypto_pgp
|
|
31
|
+
|
|
32
|
+
<!-- readme-standards:begin branding -->
|
|
33
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
34
|
+
<p align="center"><strong>swarmauri_crypto_pgp</strong></p>
|
|
35
|
+
<p align="center">OpenPGP (GnuPG) + AES-GCM crypto provider for Swarmauri</p>
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://pypi.org/project/swarmauri_crypto_pgp/"><img alt="pypi: swarmauri_crypto_pgp" src="https://img.shields.io/pypi/v/swarmauri_crypto_pgp?labelColor=1E293B&color=1D4ED8"></a>
|
|
38
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
39
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
40
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml"><img alt="Layer: standards" src="https://img.shields.io/static/v1?label=Layer&message=standards&labelColor=1E293B&color=6D28D9"></a>
|
|
41
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
42
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
43
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
44
|
+
</p>
|
|
45
|
+
<p align="center">
|
|
46
|
+
<a href="https://pypi.org/project/swarmauri_crypto_pgp/"><img alt="Monthly PyPI downloads: swarmauri_crypto_pgp" src="https://img.shields.io/pypi/dm/swarmauri_crypto_pgp?labelColor=1E293B&color=0E7490"></a>
|
|
47
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/README.md"><img alt="README hits: swarmauri_crypto_pgp" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/40-standards/swarmauri_crypto_pgp/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
48
|
+
</p>
|
|
49
|
+
<p align="center">
|
|
50
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
51
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
52
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
53
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
54
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
55
|
+
</p>
|
|
56
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
57
|
+
<!-- readme-standards:end branding -->
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Overview
|
|
62
|
+
|
|
63
|
+
### Summary
|
|
64
|
+
|
|
65
|
+
`swarmauri_crypto_pgp`: OpenPGP (GnuPG) + AES-GCM crypto provider for Swarmauri
|
|
66
|
+
|
|
67
|
+
### Why This Package
|
|
68
|
+
|
|
69
|
+
`swarmauri_crypto_pgp` isolates this responsibility: OpenPGP (GnuPG) + AES-GCM crypto provider for Swarmauri. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py) exposes `PGPCrypto`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
70
|
+
|
|
71
|
+
### When to Use
|
|
72
|
+
|
|
73
|
+
Choose `swarmauri_crypto_pgp` when your integration needs openPGP (GnuPG) + AES-GCM crypto provider for Swarmauri. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
74
|
+
|
|
75
|
+
### Features
|
|
76
|
+
|
|
77
|
+
- `PGPCrypto`: Concrete implementation of the ICrypto contract using AES-GCM and
|
|
78
|
+
|
|
79
|
+
### Non-Goals
|
|
80
|
+
|
|
81
|
+
`swarmauri_crypto_pgp` owns openPGP (GnuPG) + AES-GCM crypto provider for Swarmauri. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Getting Started
|
|
86
|
+
|
|
87
|
+
### Prerequisites
|
|
88
|
+
|
|
89
|
+
Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml) declares runtime dependencies including `swarmauri-core`, `swarmauri-base`, `cryptography`, `python-gnupg`. Read the example’s inputs and service requirements before execution.
|
|
90
|
+
|
|
91
|
+
### Installation
|
|
92
|
+
|
|
93
|
+
Choose the tool that matches your workflow:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# pip
|
|
97
|
+
pip install swarmauri_crypto_pgp
|
|
98
|
+
|
|
99
|
+
# Poetry
|
|
100
|
+
poetry add swarmauri_crypto_pgp
|
|
101
|
+
|
|
102
|
+
# uv
|
|
103
|
+
uv add swarmauri_crypto_pgp
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### uv
|
|
107
|
+
|
|
108
|
+
<!-- readme-standards:begin installation.uv -->
|
|
109
|
+
```bash
|
|
110
|
+
uv add swarmauri_crypto_pgp
|
|
111
|
+
```
|
|
112
|
+
<!-- readme-standards:end installation.uv -->
|
|
113
|
+
|
|
114
|
+
#### pip
|
|
115
|
+
|
|
116
|
+
<!-- readme-standards:begin installation.pip -->
|
|
117
|
+
```bash
|
|
118
|
+
python -m pip install swarmauri_crypto_pgp
|
|
119
|
+
```
|
|
120
|
+
<!-- readme-standards:end installation.pip -->
|
|
121
|
+
|
|
122
|
+
#### Poetry
|
|
123
|
+
|
|
124
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
125
|
+
```bash
|
|
126
|
+
poetry add swarmauri_crypto_pgp
|
|
127
|
+
```
|
|
128
|
+
<!-- readme-standards:end installation.poetry -->
|
|
129
|
+
|
|
130
|
+
### Quick Start
|
|
131
|
+
|
|
132
|
+
The snippet below mirrors the asynchronous usage exercised in the tests. It
|
|
133
|
+
creates a symmetric `KeyRef`, encrypts plaintext, and decrypts the resulting
|
|
134
|
+
`AEADCiphertext` back to bytes.
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
**Working with recipients**
|
|
138
|
+
|
|
139
|
+
- Call `encrypt_for_many` with recipient public keys to either produce an
|
|
140
|
+
AES-GCM ciphertext with OpenPGP-wrapped session keys (default) or
|
|
141
|
+
per-recipient sealed blobs by passing `enc_alg="OpenPGP-SEAL"`.
|
|
142
|
+
- Use `seal` / `unseal` for single-recipient OpenPGP public-key encryption.
|
|
143
|
+
- `wrap` and `unwrap` offer direct access to OpenPGP-based key encapsulation.
|
|
144
|
+
|
|
145
|
+
#### Example
|
|
146
|
+
|
|
147
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
148
|
+
Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/docs/readme/quick_start.py).
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
import asyncio
|
|
152
|
+
|
|
153
|
+
from swarmauri_crypto_pgp import PGPCrypto
|
|
154
|
+
from swarmauri_core.crypto.types import ExportPolicy, KeyRef, KeyType, KeyUse
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
async def main() -> None:
|
|
158
|
+
crypto = PGPCrypto()
|
|
159
|
+
|
|
160
|
+
# Symmetric key for AES-256-GCM
|
|
161
|
+
sym = KeyRef(
|
|
162
|
+
kid="sym1",
|
|
163
|
+
version=1,
|
|
164
|
+
type=KeyType.SYMMETRIC,
|
|
165
|
+
uses=(KeyUse.ENCRYPT, KeyUse.DECRYPT),
|
|
166
|
+
export_policy=ExportPolicy.SECRET_WHEN_ALLOWED,
|
|
167
|
+
material=b"\x00" * 32,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
ct = await crypto.encrypt(sym, b"hello OpenPGP")
|
|
171
|
+
pt = await crypto.decrypt(sym, ct)
|
|
172
|
+
|
|
173
|
+
print(pt)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == "__main__":
|
|
177
|
+
asyncio.run(main())
|
|
178
|
+
```
|
|
179
|
+
<!-- readme-standards:end example.quick-start -->
|
|
180
|
+
|
|
181
|
+
#### Expected Result
|
|
182
|
+
|
|
183
|
+
The example demonstrates the documented `swarmauri_crypto_pgp` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Usage
|
|
188
|
+
|
|
189
|
+
### Common Workflows
|
|
190
|
+
|
|
191
|
+
<!-- readme-standards:begin example.usage -->
|
|
192
|
+
Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/docs/readme/usage.py).
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
import asyncio
|
|
196
|
+
|
|
197
|
+
from swarmauri_crypto_pgp import PGPCrypto
|
|
198
|
+
from swarmauri_core.crypto.types import ExportPolicy, KeyRef, KeyType, KeyUse
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
async def main() -> None:
|
|
202
|
+
crypto = PGPCrypto()
|
|
203
|
+
|
|
204
|
+
# Symmetric key for AES-256-GCM
|
|
205
|
+
sym = KeyRef(
|
|
206
|
+
kid="sym1",
|
|
207
|
+
version=1,
|
|
208
|
+
type=KeyType.SYMMETRIC,
|
|
209
|
+
uses=(KeyUse.ENCRYPT, KeyUse.DECRYPT),
|
|
210
|
+
export_policy=ExportPolicy.SECRET_WHEN_ALLOWED,
|
|
211
|
+
material=b"\x00" * 32,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
ct = await crypto.encrypt(sym, b"hello OpenPGP")
|
|
215
|
+
pt = await crypto.decrypt(sym, ct)
|
|
216
|
+
|
|
217
|
+
print(pt)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
if __name__ == "__main__":
|
|
221
|
+
asyncio.run(main())
|
|
222
|
+
```
|
|
223
|
+
<!-- readme-standards:end example.usage -->
|
|
224
|
+
|
|
225
|
+
### Configuration
|
|
226
|
+
|
|
227
|
+
Configure `swarmauri_crypto_pgp` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
228
|
+
|
|
229
|
+
### Error Handling
|
|
230
|
+
|
|
231
|
+
The inspected `swarmauri_crypto_pgp` source raises `RuntimeError`, `UnsupportedAlgorithm`, `ValueError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
232
|
+
|
|
233
|
+
### Best Practices
|
|
234
|
+
|
|
235
|
+
Use the explicit `swarmauri_crypto_pgp` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `PGPCrypto`; an import or successful installation alone does not establish its runtime guarantees.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Package Boundary
|
|
240
|
+
|
|
241
|
+
### What It Owns
|
|
242
|
+
|
|
243
|
+
`swarmauri_crypto_pgp` is located in `standards` and owns openPGP (GnuPG) + AES-GCM crypto provider for Swarmauri. Source-declared APIs include `PGPCrypto`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml) records its direct dependency boundary.
|
|
244
|
+
|
|
245
|
+
### Public API and Import Surfaces
|
|
246
|
+
|
|
247
|
+
Import namespace: `swarmauri_crypto_pgp`.
|
|
248
|
+
|
|
249
|
+
Source-declared exports or types: `PGPCrypto`.
|
|
250
|
+
|
|
251
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
252
|
+
|
|
253
|
+
### Entry Points
|
|
254
|
+
|
|
255
|
+
<!-- readme-standards:begin entry-points -->
|
|
256
|
+
- `peagen.plugins.cryptos` → `pgp` → `swarmauri_crypto_pgp:PGPCrypto`
|
|
257
|
+
- `swarmauri.cryptos` → `PGPCrypto` → `swarmauri_crypto_pgp:PGPCrypto`
|
|
258
|
+
<!-- readme-standards:end entry-points -->
|
|
259
|
+
|
|
260
|
+
The provider is registered under the `swarmauri.cryptos` entry-point as
|
|
261
|
+
`PGPCrypto`.
|
|
262
|
+
|
|
263
|
+
### Injected Dependencies
|
|
264
|
+
|
|
265
|
+
The direct installation dependencies of `swarmauri_crypto_pgp` are `swarmauri-core`, `swarmauri-base`, `cryptography`, `python-gnupg`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py).
|
|
266
|
+
|
|
267
|
+
### Protocol Consumers
|
|
268
|
+
|
|
269
|
+
No direct package-manifest dependency on `swarmauri_crypto_pgp` was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.
|
|
270
|
+
|
|
271
|
+
### Extensions
|
|
272
|
+
|
|
273
|
+
For `swarmauri_crypto_pgp`, use the source-declared public interfaces (`PGPCrypto`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Operations and Readiness
|
|
278
|
+
|
|
279
|
+
### Operational Requirements
|
|
280
|
+
|
|
281
|
+
Operate `swarmauri_crypto_pgp` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
282
|
+
|
|
283
|
+
### Health and Observability
|
|
284
|
+
|
|
285
|
+
This README does not establish a standalone health endpoint for `swarmauri_crypto_pgp`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
286
|
+
|
|
287
|
+
### Security and Resource Limits
|
|
288
|
+
|
|
289
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py). The `swarmauri_crypto_pgp` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
290
|
+
|
|
291
|
+
### Compatibility
|
|
292
|
+
|
|
293
|
+
This source version of `swarmauri_crypto_pgp` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Verification
|
|
298
|
+
|
|
299
|
+
### Tests
|
|
300
|
+
|
|
301
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_crypto_pgp` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
302
|
+
|
|
303
|
+
- [tests/example/test_readme_example.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/tests/example/test_readme_example.py)
|
|
304
|
+
- [tests/unit/test_PGPCrypto.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/tests/unit/test_PGPCrypto.py)
|
|
305
|
+
|
|
306
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
307
|
+
|
|
308
|
+
### Certification Status
|
|
309
|
+
|
|
310
|
+
No external certification is asserted for `swarmauri_crypto_pgp` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
311
|
+
|
|
312
|
+
### Evidence
|
|
313
|
+
|
|
314
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## FAQ
|
|
319
|
+
|
|
320
|
+
### Why
|
|
321
|
+
|
|
322
|
+
**Why select this package?** `swarmauri_crypto_pgp` provides openPGP (GnuPG) + AES-GCM crypto provider for Swarmauri; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
323
|
+
|
|
324
|
+
### How
|
|
325
|
+
|
|
326
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_crypto_pgp`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py) for the exact types and signatures involved.
|
|
327
|
+
|
|
328
|
+
### When
|
|
329
|
+
|
|
330
|
+
**When should I validate an upgrade?** Recheck `swarmauri_crypto_pgp` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Documentation and Related Packages
|
|
335
|
+
|
|
336
|
+
### More Documentation
|
|
337
|
+
|
|
338
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/swarmauri_crypto_pgp/PGPCrypto.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml) provide the supporting context for `swarmauri_crypto_pgp`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
339
|
+
|
|
340
|
+
### Related Packages
|
|
341
|
+
|
|
342
|
+
- [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
|
|
343
|
+
- [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
|
|
344
|
+
|
|
345
|
+
### Project Links
|
|
346
|
+
|
|
347
|
+
<!-- readme-standards:begin project-links -->
|
|
348
|
+
- [pypi: swarmauri_crypto_pgp](https://pypi.org/project/swarmauri_crypto_pgp/)
|
|
349
|
+
<!-- readme-standards:end project-links -->
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Contributing
|
|
354
|
+
|
|
355
|
+
### How to Contribute
|
|
356
|
+
|
|
357
|
+
If you want to contribute to swarmauri-sdk, read up on our
|
|
358
|
+
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
359
|
+
that will help you get started.
|
|
360
|
+
|
|
361
|
+
### Development Setup
|
|
362
|
+
|
|
363
|
+
Work from the `pkgs/40-standards/swarmauri_crypto_pgp` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
364
|
+
|
|
365
|
+
### Notes for Maintainers
|
|
366
|
+
|
|
367
|
+
**Swarmauri Crypto PGP**
|
|
368
|
+
|
|
369
|
+
`PGPCrypto` is an OpenPGP (GnuPG-backed) crypto provider that implements the
|
|
370
|
+
`ICrypto` contract from `swarmauri_core`. It combines modern AEAD primitives
|
|
371
|
+
with OpenPGP public-key operations so that the same component can handle
|
|
372
|
+
symmetrical encryption, public-key key wrapping, and hybrid envelopes.
|
|
373
|
+
|
|
374
|
+
**Features at a glance**
|
|
375
|
+
|
|
376
|
+
- **Symmetric AEAD** ? AES-256-GCM powers `encrypt` and `decrypt`.
|
|
377
|
+
- **Key wrapping** ? `wrap` and `unwrap` delegate to GnuPG to protect random or
|
|
378
|
+
supplied key material with a recipient's public/private key pair.
|
|
379
|
+
- **Hybrid envelopes** ? `encrypt_for_many` supports both traditional
|
|
380
|
+
KEM+AEAD (shared ciphertext + wrapped session key) and OpenPGP sealed mode for
|
|
381
|
+
per-recipient ciphertexts.
|
|
382
|
+
- **Sealing convenience** ? `seal` and `unseal` provide single-recipient
|
|
383
|
+
OpenPGP public-key encryption without managing the envelope structure.
|
|
384
|
+
|
|
385
|
+
**System requirements**
|
|
386
|
+
|
|
387
|
+
- Python 3.10 ? 3.13.
|
|
388
|
+
- [GnuPG](https://gnupg.org/) available on the `PATH` (required by
|
|
389
|
+
`python-gnupg`).
|
|
390
|
+
|
|
391
|
+
**Key material expectations**
|
|
392
|
+
|
|
393
|
+
- `encrypt` / `decrypt`: `KeyRef.material` must be 16/24/32 bytes for AES-GCM.
|
|
394
|
+
- `wrap` / `encrypt_for_many`: `KeyRef.public` must be ASCII-armored OpenPGP
|
|
395
|
+
public key bytes.
|
|
396
|
+
- `unwrap` / `unseal`: `KeyRef.material` must be ASCII-armored OpenPGP private
|
|
397
|
+
key bytes. Supply a passphrase via `KeyRef.tags["passphrase"]` when needed.
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Governance
|
|
402
|
+
|
|
403
|
+
### Ownership and Decision Making
|
|
404
|
+
|
|
405
|
+
Changes to `swarmauri_crypto_pgp` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
406
|
+
|
|
407
|
+
### Standards and Policies
|
|
408
|
+
|
|
409
|
+
`swarmauri_crypto_pgp` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
410
|
+
|
|
411
|
+
### Lifecycle and Migration
|
|
412
|
+
|
|
413
|
+
The `swarmauri_crypto_pgp` source version is `0.11.0`.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## License and Attribution
|
|
418
|
+
|
|
419
|
+
### License
|
|
420
|
+
|
|
421
|
+
<!-- readme-standards:begin license -->
|
|
422
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/LICENSE).
|
|
423
|
+
<!-- readme-standards:end license -->
|
|
424
|
+
|
|
425
|
+
### Notices
|
|
426
|
+
|
|
427
|
+
<!-- readme-standards:begin notices -->
|
|
428
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_crypto_pgp/NOTICE) for attribution.
|
|
429
|
+
<!-- readme-standards:end notices -->
|
|
430
|
+
|