Metadata-Version: 2.4
Name: algovoi-revocation-ref
Version: 0.1.0
Summary: Content-addressed revocation references for the AlgoVoi substrate: tamper-evident, chainable revocations for agentic credentials and keys, verified offline from the bytes.
Author-email: AlgoVoi <chopmob@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://algovoi.co.uk
Project-URL: Documentation, https://docs.algovoi.co.uk/keystone
Keywords: jcs,rfc8785,revocation,agentic-payments,algovoi,content-addressed,offline-verifiable
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: algovoi-substrate>=0.4.0
Dynamic: license-file

# algovoi-revocation-ref

Content-addressed revocation references for the AlgoVoi substrate: revoke a
delegation (or other authority) before it expires, tamper-evidently. The
`revocation_ref` is the content hash of the revocation envelope, so any change to
the target, time, reason or revoker changes the ref and is detectable offline.
Revocations chain via `prev_revocation_ref`.

```
revocation_ref = "sha256:" + SHA-256(JCS(RFC 8785)({
    prev_revocation_ref, reason, revoked_at_ms, revoked_ref, revoker_id }))
```

`revoked_at_ms` is an integer-millisecond timestamp; `reason` is one of
`COMPROMISE`, `SUPERSEDED`, `POLICY`, `EXPIRY`, `MANUAL`. Construction,
tamper-detection and chain verification only, fully offline.

## Install

```
pip install algovoi-revocation-ref
```

## Use

```python
from algovoi_revocation_ref import revocation_ref, verify_chain

ref = revocation_ref({
    "revoker_id": "did:web:example.com",
    "revoked_ref": "sha256:" + "a" * 64,
    "reason": "COMPROMISE",
    "revoked_at_ms": 1737000000000,
    "prev_revocation_ref": "",
})
```

Apache-2.0. Byte-identical to the TypeScript twin.
