matrixscroll 0.1.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.
- matrixscroll-0.1.0/.gitignore +35 -0
- matrixscroll-0.1.0/CHANGELOG.md +34 -0
- matrixscroll-0.1.0/CONTRIBUTING.md +61 -0
- matrixscroll-0.1.0/LICENSE +202 -0
- matrixscroll-0.1.0/PKG-INFO +165 -0
- matrixscroll-0.1.0/README.md +130 -0
- matrixscroll-0.1.0/SECURITY.md +62 -0
- matrixscroll-0.1.0/SPEC.md +157 -0
- matrixscroll-0.1.0/controls/agentic_ai_controls.json +107 -0
- matrixscroll-0.1.0/docs/AGENTIC_AI_SECURITY.md +80 -0
- matrixscroll-0.1.0/examples/agentic_ai_evidence_manifest.json +71 -0
- matrixscroll-0.1.0/matrixscroll/__init__.py +62 -0
- matrixscroll-0.1.0/matrixscroll/_core.py +360 -0
- matrixscroll-0.1.0/matrixscroll/cli.py +94 -0
- matrixscroll-0.1.0/matrixscroll/py.typed +1 -0
- matrixscroll-0.1.0/pyproject.toml +86 -0
- matrixscroll-0.1.0/tests/__init__.py +1 -0
- matrixscroll-0.1.0/tests/test_agentic_guidance.py +90 -0
- matrixscroll-0.1.0/tests/test_cli.py +126 -0
- matrixscroll-0.1.0/tests/test_core.py +201 -0
- matrixscroll-0.1.0/tests/test_release_metadata.py +21 -0
- matrixscroll-0.1.0/tests/test_vectors.py +61 -0
- matrixscroll-0.1.0/vectors/README.md +40 -0
- matrixscroll-0.1.0/vectors/_fixture_key.json +5 -0
- matrixscroll-0.1.0/vectors/_generate.py +156 -0
- matrixscroll-0.1.0/vectors/tampered_algorithm.json +13 -0
- matrixscroll-0.1.0/vectors/tampered_device_id.json +13 -0
- matrixscroll-0.1.0/vectors/tampered_field.json +13 -0
- matrixscroll-0.1.0/vectors/tampered_nested.json +28 -0
- matrixscroll-0.1.0/vectors/tampered_public_key.json +13 -0
- matrixscroll-0.1.0/vectors/tampered_schema.json +13 -0
- matrixscroll-0.1.0/vectors/tampered_signature.json +13 -0
- matrixscroll-0.1.0/vectors/unsigned_empty_block.json +6 -0
- matrixscroll-0.1.0/vectors/unsigned_no_block.json +4 -0
- matrixscroll-0.1.0/vectors/valid_nested.json +28 -0
- matrixscroll-0.1.0/vectors/valid_simple.json +13 -0
- matrixscroll-0.1.0/vectors/valid_unicode.json +14 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
*.egg
|
|
7
|
+
.eggs/
|
|
8
|
+
|
|
9
|
+
# Build artifacts
|
|
10
|
+
build/
|
|
11
|
+
dist/
|
|
12
|
+
.wheels/
|
|
13
|
+
|
|
14
|
+
# Test / coverage
|
|
15
|
+
.pytest_cache/
|
|
16
|
+
.coverage
|
|
17
|
+
htmlcov/
|
|
18
|
+
.tox/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
|
|
22
|
+
# Virtual envs
|
|
23
|
+
.venv/
|
|
24
|
+
venv/
|
|
25
|
+
env/
|
|
26
|
+
|
|
27
|
+
# Editors
|
|
28
|
+
.vscode/
|
|
29
|
+
.idea/
|
|
30
|
+
*.swp
|
|
31
|
+
.DS_Store
|
|
32
|
+
|
|
33
|
+
# Matrix Scroll local store (never commit a private key)
|
|
34
|
+
.matrixscroll/
|
|
35
|
+
device.json
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Matrix Scroll Python SDK are documented here. The
|
|
4
|
+
format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-06-19
|
|
8
|
+
|
|
9
|
+
Initial public release. Extracted from the SSX360 reference implementation.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `EmulatedProvider` — software Ed25519 root of trust backed by a local key
|
|
13
|
+
store at `~/.matrixscroll/device.json` (override with `MATRIXSCROLL_HOME`).
|
|
14
|
+
Private seed is written 0600 at file-create time (no write-then-chmod race).
|
|
15
|
+
- `HardwareProvider` — typed stub for the NXP SE050 secure element; reports
|
|
16
|
+
`is_available()` honestly so read-only surfaces can render without crashing
|
|
17
|
+
before the SE050 transport ships.
|
|
18
|
+
- `status()` — soft status surface returning `available`/`reason` without
|
|
19
|
+
raising; `identity_info()` retains the loud-failure behavior used by signing.
|
|
20
|
+
- `sign_manifest()` / `verify_manifest()` — manifest-level helpers using a
|
|
21
|
+
deterministic canonical JSON encoding (sorted keys, ASCII-escaped, NaN
|
|
22
|
+
rejected, `signature` block excluded).
|
|
23
|
+
- `matrixscroll` console script (`status` / `verify` / `sign`) for field
|
|
24
|
+
debugging and release-evidence verification without a host application.
|
|
25
|
+
- Conformance test vectors under `vectors/` for third-party implementations.
|
|
26
|
+
|
|
27
|
+
### Protocol
|
|
28
|
+
- Identity schema: `matrixscroll.identity.v1`.
|
|
29
|
+
- Signature schema: `matrixscroll.signature.v1`.
|
|
30
|
+
- Algorithm: `ed25519`.
|
|
31
|
+
- Device id format: `MS-XXXX-XXXX` (SHA-256 of the raw public key, first 8 hex
|
|
32
|
+
chars, uppercase).
|
|
33
|
+
|
|
34
|
+
[0.1.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.0
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing to Matrix Scroll
|
|
2
|
+
|
|
3
|
+
Thanks for considering a contribution. Matrix Scroll is an open protocol with
|
|
4
|
+
a reference implementation, so contribution standards lean toward "small,
|
|
5
|
+
well-tested, spec-aware."
|
|
6
|
+
|
|
7
|
+
## Ground rules
|
|
8
|
+
|
|
9
|
+
- **Spec changes are breaking changes.** Anything that affects the canonical
|
|
10
|
+
encoding, signature block layout, device id derivation, or the value of
|
|
11
|
+
`SCHEMA` / `SIGNATURE_SCHEMA` requires a schema version bump and a paired PR
|
|
12
|
+
to `SPEC.md` plus new entries in `vectors/`.
|
|
13
|
+
- **Tests required.** New behavior needs a test in `tests/`. Bug fixes need a
|
|
14
|
+
regression test that fails on `main`.
|
|
15
|
+
- **No new runtime dependencies** without discussion in an issue first. The
|
|
16
|
+
surface area of a cryptographic SDK should stay tight.
|
|
17
|
+
- **Signed commits preferred.** Use `git config commit.gpgsign true` or an SSH
|
|
18
|
+
signing key. Once the SSX360 device ships, hardware-signed commits are the
|
|
19
|
+
preferred default.
|
|
20
|
+
|
|
21
|
+
## Development setup
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/SSX360/matrixscroll.git
|
|
25
|
+
cd matrixscroll
|
|
26
|
+
python -m venv .venv
|
|
27
|
+
. .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
pytest -q
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Running the conformance vectors
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pytest tests/test_vectors.py -v
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you implement Matrix Scroll in another language, run your verifier against
|
|
39
|
+
the JSON files in `vectors/`. The expected outcomes are encoded in their file
|
|
40
|
+
names (`valid_*`, `tampered_*`, `unsigned_*`). PRs that add cross-language
|
|
41
|
+
vectors are welcome.
|
|
42
|
+
|
|
43
|
+
## Pull request checklist
|
|
44
|
+
|
|
45
|
+
- [ ] Tests pass locally (`pytest -q`).
|
|
46
|
+
- [ ] New public API has a docstring and is re-exported from
|
|
47
|
+
`matrixscroll/__init__.py` if it's part of the supported surface.
|
|
48
|
+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`.
|
|
49
|
+
- [ ] `SPEC.md` updated if anything wire-format-related changed.
|
|
50
|
+
- [ ] No private keys, no real device ids, and no fixtures generated by a
|
|
51
|
+
production device in test data.
|
|
52
|
+
|
|
53
|
+
## Security
|
|
54
|
+
|
|
55
|
+
See `SECURITY.md`. **Do not file security issues as public PRs.**
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
By contributing you agree that your contributions are licensed under the
|
|
60
|
+
Apache License 2.0 (code) and CC0 1.0 (specification text), matching the
|
|
61
|
+
project licenses.
|
|
@@ -0,0 +1,202 @@
|
|
|
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, notice, 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
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for describing the origin of the Work and
|
|
142
|
+
reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 SSX360 / Matrix Scroll contributors
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: matrixscroll
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Open protocol for hardware-signed AI-assisted code (Ed25519 root of trust, software emulator + SSX360 reference device).
|
|
5
|
+
Project-URL: Homepage, https://matrixscroll.com
|
|
6
|
+
Project-URL: Documentation, https://matrixscroll.com/docs
|
|
7
|
+
Project-URL: Source, https://github.com/SSX360/matrixscroll
|
|
8
|
+
Project-URL: Issues, https://github.com/SSX360/matrixscroll/issues
|
|
9
|
+
Project-URL: Specification, https://github.com/SSX360/matrixscroll/blob/main/SPEC.md
|
|
10
|
+
Project-URL: Reference Device, https://matrixscroll.com/device
|
|
11
|
+
Author-email: SSX360 <security@matrixscroll.com>
|
|
12
|
+
License-Expression: Apache-2.0
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: ai,ed25519,matrixscroll,provenance,root-of-trust,secure-element,signing,ssx360,supply-chain
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Information Technology
|
|
18
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: Security :: Cryptography
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Classifier: Typing :: Typed
|
|
29
|
+
Requires-Python: >=3.10
|
|
30
|
+
Requires-Dist: cryptography>=41.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# Matrix Scroll
|
|
37
|
+
|
|
38
|
+
**Open protocol for hardware-signed AI-assisted code.**
|
|
39
|
+
|
|
40
|
+
Every AI-generated change in your IDE gets cryptographically signed by an
|
|
41
|
+
Ed25519 key sealed in a hardware root of trust. Anyone can verify the result
|
|
42
|
+
offline with a public key and one command.
|
|
43
|
+
|
|
44
|
+
- 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, schemas.
|
|
45
|
+
- 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
|
|
46
|
+
maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
|
|
47
|
+
- 🔐 **Algorithm:** Ed25519 (RFC 8032). Keys never leave the provider.
|
|
48
|
+
- 🧪 **Conformance vectors:** [`vectors/`](vectors/) — for non-Python implementations.
|
|
49
|
+
- 🌐 **Site:** <https://matrixscroll.com>
|
|
50
|
+
- 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050).
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install matrixscroll
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
import matrixscroll
|
|
60
|
+
|
|
61
|
+
# What identity is active on this machine?
|
|
62
|
+
print(matrixscroll.status())
|
|
63
|
+
# {'schema': 'matrixscroll.identity.v1', 'available': True,
|
|
64
|
+
# 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
|
|
65
|
+
|
|
66
|
+
# Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
|
|
67
|
+
signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
|
|
68
|
+
|
|
69
|
+
# Verify, anywhere, offline
|
|
70
|
+
assert matrixscroll.verify_manifest(signed)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## CLI
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
$ matrixscroll status
|
|
77
|
+
{
|
|
78
|
+
"available": true,
|
|
79
|
+
"device_id": "MS-A3F2-9C81",
|
|
80
|
+
"mode": "emulated",
|
|
81
|
+
"public_key": "...",
|
|
82
|
+
"schema": "matrixscroll.identity.v1"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
$ matrixscroll sign release.json > release.signed.json
|
|
86
|
+
$ matrixscroll verify release.signed.json
|
|
87
|
+
{"device_id": "MS-A3F2-9C81", "mode": "emulated", "ok": true, "signed_at": "..."}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`matrixscroll verify` exits **0** on a valid signature, **2** on any failure
|
|
91
|
+
(tampered manifest, missing signature block, wrong schema/algorithm, mismatched
|
|
92
|
+
device id, malformed public key, unreadable file). Pipe it from CI without
|
|
93
|
+
parsing the output.
|
|
94
|
+
|
|
95
|
+
## How it works
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
your IDE / agent / CI
|
|
99
|
+
│
|
|
100
|
+
│ manifest (release, commit, evidence pack, SBOM, anything)
|
|
101
|
+
▼
|
|
102
|
+
matrixscroll.sign_manifest(...)
|
|
103
|
+
│
|
|
104
|
+
│ canonical JSON (sorted keys, ASCII-escaped, no NaN,
|
|
105
|
+
│ signature block excluded from input)
|
|
106
|
+
▼
|
|
107
|
+
IdentityProvider ──► Ed25519 signature
|
|
108
|
+
(Emulated today,
|
|
109
|
+
SSX360 / SE050 tomorrow)
|
|
110
|
+
│
|
|
111
|
+
▼
|
|
112
|
+
signed manifest ──► matrixscroll.verify_manifest(...)
|
|
113
|
+
(anyone, anywhere, offline)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The same Python API serves the local software emulator and the physical
|
|
117
|
+
SSX360 device. Switch with the `MATRIXSCROLL_MODE` environment variable.
|
|
118
|
+
|
|
119
|
+
## Compliance levels
|
|
120
|
+
|
|
121
|
+
| Level | Provider | Backed by | Status |
|
|
122
|
+
| ----- | -------- | --------- | ------ |
|
|
123
|
+
| **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
|
|
124
|
+
| **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
|
|
125
|
+
| **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
|
|
126
|
+
|
|
127
|
+
`status()` exposes the active level via the `mode` and `available` fields so
|
|
128
|
+
read-only dashboards can render before the hardware path is wired.
|
|
129
|
+
|
|
130
|
+
## Storage and trust boundaries
|
|
131
|
+
|
|
132
|
+
- Emulated key store: `~/.matrixscroll/device.json`
|
|
133
|
+
(override with `MATRIXSCROLL_HOME`).
|
|
134
|
+
- The directory is created `0700`; the seed file is opened `0600` with
|
|
135
|
+
`O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
|
|
136
|
+
a race cannot silently clobber an existing key store.
|
|
137
|
+
- A corrupt or truncated store **fails loud** (`IdentityError`) rather than
|
|
138
|
+
silently minting a fresh identity. Identity rotation is an explicit operation.
|
|
139
|
+
- The hardware path holds nothing private on disk — the seed is sealed in the
|
|
140
|
+
secure element.
|
|
141
|
+
|
|
142
|
+
## Reference implementation, not the only one
|
|
143
|
+
|
|
144
|
+
Matrix Scroll is a protocol. This Python package is the reference. We welcome
|
|
145
|
+
implementations in Rust, Go, TypeScript, and embedded C — run them against
|
|
146
|
+
[`vectors/`](vectors/) to self-certify. See `CONTRIBUTING.md`.
|
|
147
|
+
|
|
148
|
+
## Agentic AI guidance proof
|
|
149
|
+
|
|
150
|
+
The repo includes a machine-readable control matrix at
|
|
151
|
+
[`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
|
|
152
|
+
example bounded-agent evidence manifest at
|
|
153
|
+
[`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
|
|
154
|
+
and executable checks in `tests/test_agentic_guidance.py`. These prove each
|
|
155
|
+
claim maps to repo evidence and that signed agent scope changes fail verify.
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
- Code: **Apache-2.0** (`LICENSE`).
|
|
160
|
+
- Specification text (`SPEC.md`, `vectors/`): **CC0 1.0** — public domain.
|
|
161
|
+
|
|
162
|
+
## Security
|
|
163
|
+
|
|
164
|
+
See [`SECURITY.md`](SECURITY.md). Report vulnerabilities privately to
|
|
165
|
+
**security@matrixscroll.com** or via a GitHub Security Advisory.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Matrix Scroll
|
|
2
|
+
|
|
3
|
+
**Open protocol for hardware-signed AI-assisted code.**
|
|
4
|
+
|
|
5
|
+
Every AI-generated change in your IDE gets cryptographically signed by an
|
|
6
|
+
Ed25519 key sealed in a hardware root of trust. Anyone can verify the result
|
|
7
|
+
offline with a public key and one command.
|
|
8
|
+
|
|
9
|
+
- 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, schemas.
|
|
10
|
+
- 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
|
|
11
|
+
maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
|
|
12
|
+
- 🔐 **Algorithm:** Ed25519 (RFC 8032). Keys never leave the provider.
|
|
13
|
+
- 🧪 **Conformance vectors:** [`vectors/`](vectors/) — for non-Python implementations.
|
|
14
|
+
- 🌐 **Site:** <https://matrixscroll.com>
|
|
15
|
+
- 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install matrixscroll
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quickstart
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import matrixscroll
|
|
25
|
+
|
|
26
|
+
# What identity is active on this machine?
|
|
27
|
+
print(matrixscroll.status())
|
|
28
|
+
# {'schema': 'matrixscroll.identity.v1', 'available': True,
|
|
29
|
+
# 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
|
|
30
|
+
|
|
31
|
+
# Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
|
|
32
|
+
signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
|
|
33
|
+
|
|
34
|
+
# Verify, anywhere, offline
|
|
35
|
+
assert matrixscroll.verify_manifest(signed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## CLI
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
$ matrixscroll status
|
|
42
|
+
{
|
|
43
|
+
"available": true,
|
|
44
|
+
"device_id": "MS-A3F2-9C81",
|
|
45
|
+
"mode": "emulated",
|
|
46
|
+
"public_key": "...",
|
|
47
|
+
"schema": "matrixscroll.identity.v1"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
$ matrixscroll sign release.json > release.signed.json
|
|
51
|
+
$ matrixscroll verify release.signed.json
|
|
52
|
+
{"device_id": "MS-A3F2-9C81", "mode": "emulated", "ok": true, "signed_at": "..."}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`matrixscroll verify` exits **0** on a valid signature, **2** on any failure
|
|
56
|
+
(tampered manifest, missing signature block, wrong schema/algorithm, mismatched
|
|
57
|
+
device id, malformed public key, unreadable file). Pipe it from CI without
|
|
58
|
+
parsing the output.
|
|
59
|
+
|
|
60
|
+
## How it works
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
your IDE / agent / CI
|
|
64
|
+
│
|
|
65
|
+
│ manifest (release, commit, evidence pack, SBOM, anything)
|
|
66
|
+
▼
|
|
67
|
+
matrixscroll.sign_manifest(...)
|
|
68
|
+
│
|
|
69
|
+
│ canonical JSON (sorted keys, ASCII-escaped, no NaN,
|
|
70
|
+
│ signature block excluded from input)
|
|
71
|
+
▼
|
|
72
|
+
IdentityProvider ──► Ed25519 signature
|
|
73
|
+
(Emulated today,
|
|
74
|
+
SSX360 / SE050 tomorrow)
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
signed manifest ──► matrixscroll.verify_manifest(...)
|
|
78
|
+
(anyone, anywhere, offline)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The same Python API serves the local software emulator and the physical
|
|
82
|
+
SSX360 device. Switch with the `MATRIXSCROLL_MODE` environment variable.
|
|
83
|
+
|
|
84
|
+
## Compliance levels
|
|
85
|
+
|
|
86
|
+
| Level | Provider | Backed by | Status |
|
|
87
|
+
| ----- | -------- | --------- | ------ |
|
|
88
|
+
| **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
|
|
89
|
+
| **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
|
|
90
|
+
| **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
|
|
91
|
+
|
|
92
|
+
`status()` exposes the active level via the `mode` and `available` fields so
|
|
93
|
+
read-only dashboards can render before the hardware path is wired.
|
|
94
|
+
|
|
95
|
+
## Storage and trust boundaries
|
|
96
|
+
|
|
97
|
+
- Emulated key store: `~/.matrixscroll/device.json`
|
|
98
|
+
(override with `MATRIXSCROLL_HOME`).
|
|
99
|
+
- The directory is created `0700`; the seed file is opened `0600` with
|
|
100
|
+
`O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
|
|
101
|
+
a race cannot silently clobber an existing key store.
|
|
102
|
+
- A corrupt or truncated store **fails loud** (`IdentityError`) rather than
|
|
103
|
+
silently minting a fresh identity. Identity rotation is an explicit operation.
|
|
104
|
+
- The hardware path holds nothing private on disk — the seed is sealed in the
|
|
105
|
+
secure element.
|
|
106
|
+
|
|
107
|
+
## Reference implementation, not the only one
|
|
108
|
+
|
|
109
|
+
Matrix Scroll is a protocol. This Python package is the reference. We welcome
|
|
110
|
+
implementations in Rust, Go, TypeScript, and embedded C — run them against
|
|
111
|
+
[`vectors/`](vectors/) to self-certify. See `CONTRIBUTING.md`.
|
|
112
|
+
|
|
113
|
+
## Agentic AI guidance proof
|
|
114
|
+
|
|
115
|
+
The repo includes a machine-readable control matrix at
|
|
116
|
+
[`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
|
|
117
|
+
example bounded-agent evidence manifest at
|
|
118
|
+
[`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
|
|
119
|
+
and executable checks in `tests/test_agentic_guidance.py`. These prove each
|
|
120
|
+
claim maps to repo evidence and that signed agent scope changes fail verify.
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
- Code: **Apache-2.0** (`LICENSE`).
|
|
125
|
+
- Specification text (`SPEC.md`, `vectors/`): **CC0 1.0** — public domain.
|
|
126
|
+
|
|
127
|
+
## Security
|
|
128
|
+
|
|
129
|
+
See [`SECURITY.md`](SECURITY.md). Report vulnerabilities privately to
|
|
130
|
+
**security@matrixscroll.com** or via a GitHub Security Advisory.
|