Skip to main content

ap3-functions

Protocol implementations for the AP3 (Agent Privacy-Preserving Protocol) SDK.

ap3-functions ships the cryptographic operation implementations (currently PSI — Private Set Intersection) that the core ap3 SDK composes into end-to-end privacy-preserving agent workflows.

Installation

pip install ap3-functions

This pulls in ap3 automatically.

Usage

from ap3_functions import PSIOperation

initiator = PSIOperation()   # OB: customer holder
receiver  = PSIOperation()   # BB: sanction list holder

# 4-envelope flow: init → msg0 → msg1 → msg2.
# OB commits sid_0 (hidden) in init; BB reveals sid_1 in msg0; OB opens the
# commit and sends psc_msg1 in msg1. session_id = H(sid_0, sid_1).
init  = initiator.start(role="initiator", inputs={"customer_data": "John Doe,ID123"})
msg0  = receiver.receive(role="receiver", message=init["outgoing"], config={"sanction_list": [...]})
msg1  = initiator.process(session_id=init["session_id"],  message=msg0["outgoing"])
msg2  = receiver.process(session_id=msg0["session_id"],  message=msg1["outgoing"])
final = initiator.process(session_id=init["session_id"], message=msg2["outgoing"])
is_match = final["result"]["is_match"]

Most callers use PrivacyAgent.run_intent() instead, which drives the exchange end-to-end over A2A.

Distribution name is ap3-functions (hyphenated), import name is ap3_functions (underscored). This is standard Python packaging convention — the same way pip install scikit-learn gives you import sklearn-style decoupling.

See the AP3 SDK docs for the full API and end-to-end examples.

Platform support

PSI is implemented in pure Python on top of rbcl (libsodium / Ristretto255) and merlin_transcripts (Fiat–Shamir).

It runs anywhere those wheels install — macOS, Linux, and Windows on both x86_64 and arm64.

License

Apache-2.0

Metadata

Release files for ap3-functions 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ap3-functions 1.2.3
File Size Uploaded Provenance Actions
ap3_functions-1.2.3.tar.gz 8.9 kB Without provenance Details for ap3_functions-1.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ap3-functions 1.2.3
File Interpreter ABI Platform Actions
ap3_functions-1.2.3-py3-none-any.whl Python 3 none any Details for ap3_functions-1.2.3-py3-none-any.whl

Total release size: 21.9 kB

Release files / ap3_functions-1.2.3.tar.gz

Download URL ap3_functions-1.2.3.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
324184c29db7970627ed49ceefcd86181492435210cde143db8ea48470b83768
BLAKE2b-256 checksum
How to use checksums
0142ff4de28af1d37de62c7b671ee3ff913797f58449502e1203bb8902bb3d0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / ap3_functions-1.2.3-py3-none-any.whl

Download URL ap3_functions-1.2.3-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
849b8bdfb43e609c8094afe339340f07774a36971d3c4f7a17f630ac2dd51ed8
BLAKE2b-256 checksum
How to use checksums
e9e6c1ea663ef19c55f06bbc77f6bae2255b691a7feb8d5e94d7484ea14b4e7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for ap3-functions 1.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page