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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ap3_functions-1.2.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ap3_functions-1.2.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file ap3_functions-1.2.2.tar.gz.

File metadata

  • Download URL: ap3_functions-1.2.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for ap3_functions-1.2.2.tar.gz
Algorithm Hash digest
SHA256 9da27840447978b07eebfcd6da6d2b726b7ae4bafeb9e23d852bc776750819da
MD5 dda1a1159a2ca7db44de8c8a81812711
BLAKE2b-256 2278880ddf25ae11b483cdc99fc8a915ec4c838f5cb7e274515e66414522b572

See more details on using hashes here.

File details

Details for the file ap3_functions-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ap3_functions-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 928e196cfe0dfd67d816f2e312818eb8c15b13183cabc2f7d82a2e3d05674df0
MD5 9c966e22b99533b076878c0343b802dc
BLAKE2b-256 9b00e73b940d698ec313521a96309b7020c77b2d5ed74bf3d4c1d66392e7a0c1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page