aia-verify 0.1.1__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.
- aia_verify-0.1.1/LICENSE +201 -0
- aia_verify-0.1.1/MANIFEST.in +2 -0
- aia_verify-0.1.1/MODULES +81 -0
- aia_verify-0.1.1/NOTICE +2 -0
- aia_verify-0.1.1/PKG-INFO +178 -0
- aia_verify-0.1.1/README.md +147 -0
- aia_verify-0.1.1/SPECIFICATION.md +765 -0
- aia_verify-0.1.1/examples/bundle.json +150 -0
- aia_verify-0.1.1/examples/bundle.verified.txt +15 -0
- aia_verify-0.1.1/pyproject.toml +83 -0
- aia_verify-0.1.1/setup.cfg +4 -0
- aia_verify-0.1.1/src/aia/__init__.py +123 -0
- aia_verify-0.1.1/src/aia/attest/__init__.py +104 -0
- aia_verify-0.1.1/src/aia/attest/agent_identity.py +166 -0
- aia_verify-0.1.1/src/aia/attest/agent_policy.py +939 -0
- aia_verify-0.1.1/src/aia/attest/answer_pdf.py +492 -0
- aia_verify-0.1.1/src/aia/attest/bundle.py +248 -0
- aia_verify-0.1.1/src/aia/attest/canonical.py +175 -0
- aia_verify-0.1.1/src/aia/attest/comparison_verify.py +176 -0
- aia_verify-0.1.1/src/aia/attest/envelope.py +369 -0
- aia_verify-0.1.1/src/aia/attest/evidence.py +495 -0
- aia_verify-0.1.1/src/aia/attest/evidence_verify.py +437 -0
- aia_verify-0.1.1/src/aia/attest/governed_verify.py +432 -0
- aia_verify-0.1.1/src/aia/attest/keychain.py +548 -0
- aia_verify-0.1.1/src/aia/attest/merkle.py +181 -0
- aia_verify-0.1.1/src/aia/attest/messages/de.json +248 -0
- aia_verify-0.1.1/src/aia/attest/messages/en.json +248 -0
- aia_verify-0.1.1/src/aia/attest/record_proof.py +180 -0
- aia_verify-0.1.1/src/aia/attest/records.py +1132 -0
- aia_verify-0.1.1/src/aia/attest/render.py +1266 -0
- aia_verify-0.1.1/src/aia/attest/signing.py +1095 -0
- aia_verify-0.1.1/src/aia/attest/tee.py +560 -0
- aia_verify-0.1.1/src/aia/attest/tee_roots/README.md +78 -0
- aia_verify-0.1.1/src/aia/attest/tree.py +1008 -0
- aia_verify-0.1.1/src/aia/attest/usage.py +190 -0
- aia_verify-0.1.1/src/aia/attest/uuid7.py +36 -0
- aia_verify-0.1.1/src/aia/attest/verify.py +912 -0
- aia_verify-0.1.1/src/aia/contracts/__init__.py +325 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/__init__.py +117 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/approval.schema.json +36 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/common.schema.json +315 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/dkg-read.schema.json +290 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/policy-decision.schema.json +408 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/record-tree.schema.json +55 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/record.schema.json +496 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/role.schema.json +300 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/step.schema.json +582 -0
- aia_verify-0.1.1/src/aia/contracts/agent_step/v1/tool-call.schema.json +135 -0
- aia_verify-0.1.1/src/aia/i18n.py +69 -0
- aia_verify-0.1.1/src/aia/pqc/__init__.py +34 -0
- aia_verify-0.1.1/src/aia/pqc/keylen.py +174 -0
- aia_verify-0.1.1/src/aia/web/static/brand/email.json +266 -0
- aia_verify-0.1.1/src/aia/web/static/brand/fonts.css +171 -0
- aia_verify-0.1.1/src/aia/web/static/brand/tokens.json +1289 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/PKG-INFO +178 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/SOURCES.txt +58 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/dependency_links.txt +1 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/entry_points.txt +2 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/requires.txt +10 -0
- aia_verify-0.1.1/src/aia_verify.egg-info/top_level.txt +1 -0
aia_verify-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
aia_verify-0.1.1/MODULES
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Every file the `aia-verify` distribution ships, one per line (OP#883).
|
|
2
|
+
#
|
|
3
|
+
# This file is the DISTRIBUTION, not a description of it: `scripts/ci/build_verifier.py`
|
|
4
|
+
# stages exactly these paths, refuses a closure that reaches outside them, and refuses
|
|
5
|
+
# a wheel that lacks one of them; `tests/unit/test_verifier_packaging.py` runs the same
|
|
6
|
+
# checks. The verifier is the attestation package the deployment signs with, so an
|
|
7
|
+
# auditor runs the code that wrote the bundle, with only the dependencies a laptop needs:
|
|
8
|
+
# pydantic, rfc8785, liboqs-python and cryptography (web3 only for `--online`).
|
|
9
|
+
#
|
|
10
|
+
# Widening the list is a decision somebody writes down: a module that reaches the
|
|
11
|
+
# platform (`aia.services`, a database driver, the API) would put the server behind
|
|
12
|
+
# `pip install aia-verify`, and the gate names the import that did it.
|
|
13
|
+
|
|
14
|
+
aia/__init__.py
|
|
15
|
+
# The one catalogue loader (English and German), shared with the web's pages: render.py
|
|
16
|
+
# writes a report in the reader's language through it.
|
|
17
|
+
aia/i18n.py
|
|
18
|
+
|
|
19
|
+
# The one ML-DSA key-length guard, shared with the platform's crypto layer.
|
|
20
|
+
aia/pqc/__init__.py
|
|
21
|
+
aia/pqc/keylen.py
|
|
22
|
+
|
|
23
|
+
aia/attest/__init__.py
|
|
24
|
+
aia/attest/agent_identity.py
|
|
25
|
+
# The agent policy language and its evaluator: a disclosed decision is re-evaluated against
|
|
26
|
+
# the policy version it cites (819-agent-governance D-17).
|
|
27
|
+
aia/attest/agent_policy.py
|
|
28
|
+
# An answer exported as a PDF (823 D-13): its files, its statement and its checks.
|
|
29
|
+
aia/attest/answer_pdf.py
|
|
30
|
+
aia/attest/bundle.py
|
|
31
|
+
aia/attest/canonical.py
|
|
32
|
+
# A comparison's bundle (UC-1, OP#1400): its items against the digest, its read, each decision.
|
|
33
|
+
aia/attest/comparison_verify.py
|
|
34
|
+
aia/attest/envelope.py
|
|
35
|
+
# The content id (823 D-2): the verifier recomputes it from a disclosed form.
|
|
36
|
+
aia/attest/evidence.py
|
|
37
|
+
# The evidence checks of a read's or a commit's bundle (823 D-9).
|
|
38
|
+
aia/attest/evidence_verify.py
|
|
39
|
+
# What bundle 1.5 adds: a run's tree, its tool manifests, the policy versions its decisions
|
|
40
|
+
# cite and the records that register them (OP#1250, OP#885), and the checks each record of
|
|
41
|
+
# a bundle passes alone.
|
|
42
|
+
aia/attest/governed_verify.py
|
|
43
|
+
aia/attest/record_proof.py
|
|
44
|
+
aia/attest/keychain.py
|
|
45
|
+
aia/attest/merkle.py
|
|
46
|
+
aia/attest/records.py
|
|
47
|
+
aia/attest/render.py
|
|
48
|
+
# The report's own words, by language: what each check establishes, every heading and label.
|
|
49
|
+
aia/attest/messages/de.json
|
|
50
|
+
aia/attest/messages/en.json
|
|
51
|
+
aia/attest/signing.py
|
|
52
|
+
aia/attest/tee.py
|
|
53
|
+
aia/attest/tree.py
|
|
54
|
+
# What a step or a model call used (OP#932): the report and the tree print it.
|
|
55
|
+
aia/attest/usage.py
|
|
56
|
+
aia/attest/uuid7.py
|
|
57
|
+
aia/attest/verify.py
|
|
58
|
+
# The vendored design files render.py draws a report with (scripts/vendor_brand.py writes
|
|
59
|
+
# them): an exported answer's pdf-report check re-renders its report from them, and
|
|
60
|
+
# `--render` writes one. Only the three the renderer reads.
|
|
61
|
+
aia/web/static/brand/email.json
|
|
62
|
+
aia/web/static/brand/fonts.css
|
|
63
|
+
aia/web/static/brand/tokens.json
|
|
64
|
+
# Where pinned TEE vendor roots go (tee.py DEFAULT_ROOTS_DIR); it ships with its README
|
|
65
|
+
# and no root, so trusting a vendor stays a decision the auditor makes.
|
|
66
|
+
aia/attest/tee_roots/README.md
|
|
67
|
+
|
|
68
|
+
# A version "3" record is checked against the written contract it names, and a run's
|
|
69
|
+
# record tree against its schema and rules (798-agent-step-contract D-21, D-16): the
|
|
70
|
+
# contract loader and the agent step contract's schemas, with jsonschema and referencing.
|
|
71
|
+
aia/contracts/__init__.py
|
|
72
|
+
aia/contracts/agent_step/__init__.py
|
|
73
|
+
aia/contracts/agent_step/v1/approval.schema.json
|
|
74
|
+
aia/contracts/agent_step/v1/common.schema.json
|
|
75
|
+
aia/contracts/agent_step/v1/dkg-read.schema.json
|
|
76
|
+
aia/contracts/agent_step/v1/policy-decision.schema.json
|
|
77
|
+
aia/contracts/agent_step/v1/record-tree.schema.json
|
|
78
|
+
aia/contracts/agent_step/v1/record.schema.json
|
|
79
|
+
aia/contracts/agent_step/v1/role.schema.json
|
|
80
|
+
aia/contracts/agent_step/v1/step.schema.json
|
|
81
|
+
aia/contracts/agent_step/v1/tool-call.schema.json
|
aia_verify-0.1.1/NOTICE
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aia-verify
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Verify an AIA attestation disclosure bundle on your own machine, offline
|
|
5
|
+
Author: 013a
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://013a.tech
|
|
8
|
+
Keywords: aia,attestation,audit,verifier,post-quantum,ml-dsa
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Information Technology
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Security :: Cryptography
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: NOTICE
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.13
|
|
22
|
+
Requires-Dist: rfc8785<0.2,>=0.1.4
|
|
23
|
+
Requires-Dist: cryptography>=42.0.0
|
|
24
|
+
Requires-Dist: liboqs-python==0.16.0
|
|
25
|
+
Requires-Dist: jsonschema<5,>=4.18
|
|
26
|
+
Requires-Dist: referencing<1,>=0.30
|
|
27
|
+
Requires-Dist: pypdf<7,>=6.19
|
|
28
|
+
Provides-Extra: online
|
|
29
|
+
Requires-Dist: web3<9,>=7; extra == "online"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# aia-verify
|
|
33
|
+
|
|
34
|
+
Verify an AIA attestation disclosure bundle on your own machine, with no access to the
|
|
35
|
+
deployment that made it and no network.
|
|
36
|
+
|
|
37
|
+
An AIA deployment signs a record of every action its agents take. A **disclosure
|
|
38
|
+
bundle** is one record with everything needed to check it: the record, its post-quantum
|
|
39
|
+
and classical signatures, the deployment's key history back to its root key, and the
|
|
40
|
+
record's place in a sealed batch. [SPECIFICATION.md](SPECIFICATION.md) defines the
|
|
41
|
+
format, so you can also check a bundle with code of your own.
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
`aia-verify` needs Python 3.10 or newer and the liboqs C library (below). Install it
|
|
46
|
+
into a virtual environment from PyPI, or from a wheel you were given:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 -m venv aia-verify && . aia-verify/bin/activate
|
|
50
|
+
pip install aia-verify
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### liboqs
|
|
54
|
+
|
|
55
|
+
The post-quantum signatures (ML-DSA-87, FIPS 204, on records; SLH-DSA, FIPS 205, on the
|
|
56
|
+
key history) are verified by liboqs through `liboqs-python`, which must load the liboqs
|
|
57
|
+
release it was made for, 0.16.0. Either route works:
|
|
58
|
+
|
|
59
|
+
1. **Build liboqs 0.16.0 yourself**, or install your operating system's package of that
|
|
60
|
+
release. A build with only the two mechanisms the verifier uses takes a minute and
|
|
61
|
+
needs git, CMake and a C compiler:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone --depth 1 --branch 0.16.0 https://github.com/open-quantum-safe/liboqs
|
|
65
|
+
cmake -S liboqs -B liboqs/build -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON \
|
|
66
|
+
-DOQS_USE_OPENSSL=OFF -DOQS_MINIMAL_BUILD="SIG_ml_dsa_87;SIG_slh_dsa_pure_sha2_256s" \
|
|
67
|
+
-DCMAKE_INSTALL_PREFIX="$HOME/_oqs"
|
|
68
|
+
cmake --build liboqs/build --parallel && cmake --build liboqs/build --target install
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`liboqs-python` looks in `$HOME/_oqs`, or where `OQS_INSTALL_PATH` points.
|
|
72
|
+
2. **Let `liboqs-python` build it.** When it finds no liboqs, its first use downloads the
|
|
73
|
+
matching release and builds all of it into `$HOME/_oqs`. That needs git, CMake, a C
|
|
74
|
+
compiler, network for that one build, and several minutes.
|
|
75
|
+
|
|
76
|
+
After either route the verifier needs no network.
|
|
77
|
+
|
|
78
|
+
A key history whose root was created under the round-3 name `SPHINCS+-SHA2-256s-simple`
|
|
79
|
+
needs a liboqs release that still has it (0.15 or earlier): see section 4.1 of the
|
|
80
|
+
specification.
|
|
81
|
+
|
|
82
|
+
## Verify a bundle
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
aia-verify bundle.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
It prints what the record states, one line per check, and the verdict:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
record 01a10823-452d-7451-bdf1-cc53e9e04502 llm_call 2026-10-04T18:18:11.615528Z
|
|
92
|
+
model example-model:7b (provider ollama)
|
|
93
|
+
...
|
|
94
|
+
PASS bundle-shape strict parse OK
|
|
95
|
+
PASS signatures ML-DSA-87 required + Ed25519 checked
|
|
96
|
+
...
|
|
97
|
+
BUNDLE VALID
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
A failed check is a sentence naming the field that was changed. The exit code is 0 for
|
|
101
|
+
a valid bundle, 1 for an invalid one and 2 when the file cannot be read as a bundle.
|
|
102
|
+
|
|
103
|
+
| Option | What it does |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `--expected-root FINGERPRINT` | Fail unless the key history ends at this root key, the fingerprint the audited organisation gave you. Without it, the report prints the root for you to compare. |
|
|
106
|
+
| `--render report.html` | Also write the record and the verdict as one HTML page. |
|
|
107
|
+
| `--language en` or `--language de` | The language of that page, English or German. Without it, your terminal's language (`LANG`) decides, and any other language is English. Each check's own sentence stays in English beneath its explanation. |
|
|
108
|
+
| `--document FILE` or `--document FILE=PATH` | For an answer or a search: check a file you hold against the digest each citation of it signed. One changed byte fails those citations; a renamed file still verifies. Give `PATH` when the file name matches several cited documents. Repeatable. |
|
|
109
|
+
| `--online [--rpc-url URL]` | Also check the batch root on its public chain. Needs `pip install 'aia-verify[online]'` and network. |
|
|
110
|
+
|
|
111
|
+
`python -m aia.attest.verify` is the same program.
|
|
112
|
+
|
|
113
|
+
## Verify an exported answer
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
aia-verify answer-<record id>.pdf
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
An answer exported as a PDF carries its signed records and the report its pages print.
|
|
120
|
+
The verifier checks that every byte of the file is the one the organisation signed when
|
|
121
|
+
it exported it, each embedded record as for a bundle, and that the report is the one the
|
|
122
|
+
records render, then prints `ANSWER VALID` or `ANSWER INVALID`. `--document`,
|
|
123
|
+
`--expected-root` and `--online` work as for a bundle.
|
|
124
|
+
|
|
125
|
+
## Verify a comparison
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
aia-verify comparison.json --render report.html
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
A comparison of a product's registered dossiers with a site's documents carries the
|
|
132
|
+
signed read of every table both sides cite and each person's signed decision. The
|
|
133
|
+
verifier checks each record as for a bundle, that the items are the ones compared and
|
|
134
|
+
signed, and that each decision shown, reason included, is the one signed for its item,
|
|
135
|
+
then prints `COMPARISON VALID` or `COMPARISON INVALID`. One changed byte of a cited table
|
|
136
|
+
or one changed word of a decision fails it. Since 0.1.1.
|
|
137
|
+
|
|
138
|
+
## What a valid bundle proves
|
|
139
|
+
|
|
140
|
+
The record is unaltered; it was signed by a key the deployment's root key issued and had
|
|
141
|
+
not revoked at the record's time; and it sits in the sealed batch whose root the bundle
|
|
142
|
+
names. Binding that root key to the organisation is your step: compare the root the
|
|
143
|
+
report prints with the fingerprint the organisation communicated, or pass it as
|
|
144
|
+
`--expected-root`.
|
|
145
|
+
|
|
146
|
+
For an answer or a search, the bundle also carries what was asked, the answer and the
|
|
147
|
+
passages it was given, each checked against the digests the record signed. A value the
|
|
148
|
+
organisation erased since (a person's question, a removed document's text) is reported
|
|
149
|
+
withheld: the record still verifies without it.
|
|
150
|
+
|
|
151
|
+
For an agent's run, the bundle carries every record of the run, the policy each decision
|
|
152
|
+
cites with its rules, and the records that registered those policies, the agent's role and
|
|
153
|
+
the build's tools in the organisation's chain. Each decision is re-evaluated against its own
|
|
154
|
+
policy, so "this step was allowed by this rule" is something you check, not something you
|
|
155
|
+
are told.
|
|
156
|
+
|
|
157
|
+
The bundle's `disclosed_at`, `anchor`, `verification` and informational `policy_context`
|
|
158
|
+
snapshot, the batch's `batch_id` and `schema_version`, and the chain's `prev_record_hash`
|
|
159
|
+
(of each record it carries) are covered by no check: section 7 of the specification says
|
|
160
|
+
why.
|
|
161
|
+
|
|
162
|
+
## Try it
|
|
163
|
+
|
|
164
|
+
[`examples/bundle.json`](examples/bundle.json) is a complete bundle signed by keys made
|
|
165
|
+
for the example and discarded, so it proves nothing about any deployment;
|
|
166
|
+
[`examples/bundle.verified.txt`](examples/bundle.verified.txt) is the output above in
|
|
167
|
+
full. Change any byte of a signed field and run it again.
|
|
168
|
+
|
|
169
|
+
## Source
|
|
170
|
+
|
|
171
|
+
AIA's release pipeline writes this repository: each release commits the verifier's
|
|
172
|
+
code, which is the attestation code an AIA deployment signs with, and tags it. Changes
|
|
173
|
+
are not merged here: open an issue, or report a vulnerability privately under the
|
|
174
|
+
repository's Security tab.
|
|
175
|
+
|
|
176
|
+
## Licence
|
|
177
|
+
|
|
178
|
+
Apache-2.0: [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# aia-verify
|
|
2
|
+
|
|
3
|
+
Verify an AIA attestation disclosure bundle on your own machine, with no access to the
|
|
4
|
+
deployment that made it and no network.
|
|
5
|
+
|
|
6
|
+
An AIA deployment signs a record of every action its agents take. A **disclosure
|
|
7
|
+
bundle** is one record with everything needed to check it: the record, its post-quantum
|
|
8
|
+
and classical signatures, the deployment's key history back to its root key, and the
|
|
9
|
+
record's place in a sealed batch. [SPECIFICATION.md](SPECIFICATION.md) defines the
|
|
10
|
+
format, so you can also check a bundle with code of your own.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
`aia-verify` needs Python 3.10 or newer and the liboqs C library (below). Install it
|
|
15
|
+
into a virtual environment from PyPI, or from a wheel you were given:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python3 -m venv aia-verify && . aia-verify/bin/activate
|
|
19
|
+
pip install aia-verify
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### liboqs
|
|
23
|
+
|
|
24
|
+
The post-quantum signatures (ML-DSA-87, FIPS 204, on records; SLH-DSA, FIPS 205, on the
|
|
25
|
+
key history) are verified by liboqs through `liboqs-python`, which must load the liboqs
|
|
26
|
+
release it was made for, 0.16.0. Either route works:
|
|
27
|
+
|
|
28
|
+
1. **Build liboqs 0.16.0 yourself**, or install your operating system's package of that
|
|
29
|
+
release. A build with only the two mechanisms the verifier uses takes a minute and
|
|
30
|
+
needs git, CMake and a C compiler:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone --depth 1 --branch 0.16.0 https://github.com/open-quantum-safe/liboqs
|
|
34
|
+
cmake -S liboqs -B liboqs/build -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON \
|
|
35
|
+
-DOQS_USE_OPENSSL=OFF -DOQS_MINIMAL_BUILD="SIG_ml_dsa_87;SIG_slh_dsa_pure_sha2_256s" \
|
|
36
|
+
-DCMAKE_INSTALL_PREFIX="$HOME/_oqs"
|
|
37
|
+
cmake --build liboqs/build --parallel && cmake --build liboqs/build --target install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`liboqs-python` looks in `$HOME/_oqs`, or where `OQS_INSTALL_PATH` points.
|
|
41
|
+
2. **Let `liboqs-python` build it.** When it finds no liboqs, its first use downloads the
|
|
42
|
+
matching release and builds all of it into `$HOME/_oqs`. That needs git, CMake, a C
|
|
43
|
+
compiler, network for that one build, and several minutes.
|
|
44
|
+
|
|
45
|
+
After either route the verifier needs no network.
|
|
46
|
+
|
|
47
|
+
A key history whose root was created under the round-3 name `SPHINCS+-SHA2-256s-simple`
|
|
48
|
+
needs a liboqs release that still has it (0.15 or earlier): see section 4.1 of the
|
|
49
|
+
specification.
|
|
50
|
+
|
|
51
|
+
## Verify a bundle
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
aia-verify bundle.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
It prints what the record states, one line per check, and the verdict:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
record 01a10823-452d-7451-bdf1-cc53e9e04502 llm_call 2026-10-04T18:18:11.615528Z
|
|
61
|
+
model example-model:7b (provider ollama)
|
|
62
|
+
...
|
|
63
|
+
PASS bundle-shape strict parse OK
|
|
64
|
+
PASS signatures ML-DSA-87 required + Ed25519 checked
|
|
65
|
+
...
|
|
66
|
+
BUNDLE VALID
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A failed check is a sentence naming the field that was changed. The exit code is 0 for
|
|
70
|
+
a valid bundle, 1 for an invalid one and 2 when the file cannot be read as a bundle.
|
|
71
|
+
|
|
72
|
+
| Option | What it does |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `--expected-root FINGERPRINT` | Fail unless the key history ends at this root key, the fingerprint the audited organisation gave you. Without it, the report prints the root for you to compare. |
|
|
75
|
+
| `--render report.html` | Also write the record and the verdict as one HTML page. |
|
|
76
|
+
| `--language en` or `--language de` | The language of that page, English or German. Without it, your terminal's language (`LANG`) decides, and any other language is English. Each check's own sentence stays in English beneath its explanation. |
|
|
77
|
+
| `--document FILE` or `--document FILE=PATH` | For an answer or a search: check a file you hold against the digest each citation of it signed. One changed byte fails those citations; a renamed file still verifies. Give `PATH` when the file name matches several cited documents. Repeatable. |
|
|
78
|
+
| `--online [--rpc-url URL]` | Also check the batch root on its public chain. Needs `pip install 'aia-verify[online]'` and network. |
|
|
79
|
+
|
|
80
|
+
`python -m aia.attest.verify` is the same program.
|
|
81
|
+
|
|
82
|
+
## Verify an exported answer
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
aia-verify answer-<record id>.pdf
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
An answer exported as a PDF carries its signed records and the report its pages print.
|
|
89
|
+
The verifier checks that every byte of the file is the one the organisation signed when
|
|
90
|
+
it exported it, each embedded record as for a bundle, and that the report is the one the
|
|
91
|
+
records render, then prints `ANSWER VALID` or `ANSWER INVALID`. `--document`,
|
|
92
|
+
`--expected-root` and `--online` work as for a bundle.
|
|
93
|
+
|
|
94
|
+
## Verify a comparison
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
aia-verify comparison.json --render report.html
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
A comparison of a product's registered dossiers with a site's documents carries the
|
|
101
|
+
signed read of every table both sides cite and each person's signed decision. The
|
|
102
|
+
verifier checks each record as for a bundle, that the items are the ones compared and
|
|
103
|
+
signed, and that each decision shown, reason included, is the one signed for its item,
|
|
104
|
+
then prints `COMPARISON VALID` or `COMPARISON INVALID`. One changed byte of a cited table
|
|
105
|
+
or one changed word of a decision fails it. Since 0.1.1.
|
|
106
|
+
|
|
107
|
+
## What a valid bundle proves
|
|
108
|
+
|
|
109
|
+
The record is unaltered; it was signed by a key the deployment's root key issued and had
|
|
110
|
+
not revoked at the record's time; and it sits in the sealed batch whose root the bundle
|
|
111
|
+
names. Binding that root key to the organisation is your step: compare the root the
|
|
112
|
+
report prints with the fingerprint the organisation communicated, or pass it as
|
|
113
|
+
`--expected-root`.
|
|
114
|
+
|
|
115
|
+
For an answer or a search, the bundle also carries what was asked, the answer and the
|
|
116
|
+
passages it was given, each checked against the digests the record signed. A value the
|
|
117
|
+
organisation erased since (a person's question, a removed document's text) is reported
|
|
118
|
+
withheld: the record still verifies without it.
|
|
119
|
+
|
|
120
|
+
For an agent's run, the bundle carries every record of the run, the policy each decision
|
|
121
|
+
cites with its rules, and the records that registered those policies, the agent's role and
|
|
122
|
+
the build's tools in the organisation's chain. Each decision is re-evaluated against its own
|
|
123
|
+
policy, so "this step was allowed by this rule" is something you check, not something you
|
|
124
|
+
are told.
|
|
125
|
+
|
|
126
|
+
The bundle's `disclosed_at`, `anchor`, `verification` and informational `policy_context`
|
|
127
|
+
snapshot, the batch's `batch_id` and `schema_version`, and the chain's `prev_record_hash`
|
|
128
|
+
(of each record it carries) are covered by no check: section 7 of the specification says
|
|
129
|
+
why.
|
|
130
|
+
|
|
131
|
+
## Try it
|
|
132
|
+
|
|
133
|
+
[`examples/bundle.json`](examples/bundle.json) is a complete bundle signed by keys made
|
|
134
|
+
for the example and discarded, so it proves nothing about any deployment;
|
|
135
|
+
[`examples/bundle.verified.txt`](examples/bundle.verified.txt) is the output above in
|
|
136
|
+
full. Change any byte of a signed field and run it again.
|
|
137
|
+
|
|
138
|
+
## Source
|
|
139
|
+
|
|
140
|
+
AIA's release pipeline writes this repository: each release commits the verifier's
|
|
141
|
+
code, which is the attestation code an AIA deployment signs with, and tags it. Changes
|
|
142
|
+
are not merged here: open an issue, or report a vulnerability privately under the
|
|
143
|
+
repository's Security tab.
|
|
144
|
+
|
|
145
|
+
## Licence
|
|
146
|
+
|
|
147
|
+
Apache-2.0: [LICENSE](LICENSE) and [NOTICE](NOTICE).
|