signedshot 0.1.4__tar.gz → 0.1.5__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.
@@ -1331,7 +1331,7 @@ dependencies = [
1331
1331
 
1332
1332
  [[package]]
1333
1333
  name = "signedshot-validator"
1334
- version = "0.1.4"
1334
+ version = "0.1.5"
1335
1335
  dependencies = [
1336
1336
  "anyhow",
1337
1337
  "base64",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "signedshot-validator"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  edition = "2021"
5
5
  description = "Validator for SignedShot media authenticity proofs"
6
6
  license = "MIT"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 SignedShot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,133 @@
1
+ Metadata-Version: 2.4
2
+ Name: signedshot
3
+ Version: 0.1.5
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.8
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Topic :: Security :: Cryptography
15
+ License-File: LICENSE
16
+ Summary: Validator for SignedShot media authenticity proofs
17
+ Keywords: signedshot,media,authenticity,validation,cryptography
18
+ License: MIT
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Homepage, https://signedshot.io
22
+ Project-URL: Repository, https://github.com/SignedShot/signedshot-validator
23
+
24
+ # SignedShot
25
+
26
+ Verify SignedShot media authenticity proofs in Python.
27
+
28
+ [![PyPI](https://img.shields.io/pypi/v/signedshot)](https://pypi.org/project/signedshot/)
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install signedshot
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ import signedshot
40
+
41
+ # Validate from files
42
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
43
+
44
+ print(result.valid) # True if all checks pass
45
+ print(result.error) # Error message if validation failed
46
+ ```
47
+
48
+ ## Usage
49
+
50
+ ### Validate from Files
51
+
52
+ ```python
53
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
54
+ ```
55
+
56
+ ### Validate from Bytes
57
+
58
+ ```python
59
+ with open("photo.sidecar.json") as f:
60
+ sidecar_json = f.read()
61
+ with open("photo.jpg", "rb") as f:
62
+ media_bytes = f.read()
63
+
64
+ result = signedshot.validate(sidecar_json, media_bytes)
65
+ ```
66
+
67
+ ### Validate with Pre-loaded JWKS
68
+
69
+ Avoid HTTP calls by providing JWKS directly:
70
+
71
+ ```python
72
+ import requests
73
+
74
+ jwks = requests.get("https://api.signedshot.io/.well-known/jwks.json").text
75
+ result = signedshot.validate_with_jwks(sidecar_json, media_bytes, jwks)
76
+ ```
77
+
78
+ ## Validation Result
79
+
80
+ ```python
81
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
82
+
83
+ # Overall result
84
+ result.valid # True/False
85
+ result.version # Sidecar format version
86
+ result.error # Error message (if any)
87
+
88
+ # Capture trust (JWT verification)
89
+ trust = result.capture_trust
90
+ trust["signature_valid"] # JWT signature verified
91
+ trust["issuer"] # API that issued the token
92
+ trust["publisher_id"] # Publisher ID
93
+ trust["device_id"] # Device ID
94
+ trust["capture_id"] # Capture session ID
95
+ trust["method"] # "sandbox", "app_check", or "app_attest"
96
+ trust["app_id"] # App bundle ID (if attested)
97
+ trust["issued_at"] # Unix timestamp
98
+
99
+ # Media integrity (content verification)
100
+ integrity = result.media_integrity
101
+ integrity["content_hash_valid"] # SHA-256 hash matches
102
+ integrity["signature_valid"] # ECDSA signature verified
103
+ integrity["capture_id_match"] # Capture IDs match
104
+ integrity["content_hash"] # SHA-256 of media
105
+ integrity["captured_at"] # ISO8601 timestamp
106
+
107
+ # Export
108
+ result.to_dict() # Convert to dictionary
109
+ result.to_json() # Convert to JSON string
110
+ ```
111
+
112
+ ## What It Validates
113
+
114
+ 1. **Capture Trust (JWT)**
115
+ - Fetches JWKS from issuer
116
+ - Verifies ES256 signature
117
+ - Extracts attestation claims
118
+
119
+ 2. **Media Integrity**
120
+ - Computes SHA-256 of media
121
+ - Verifies ECDSA signature
122
+ - Confirms capture_id matches
123
+
124
+ ## Links
125
+
126
+ - [Documentation](https://signedshot.io/docs)
127
+ - [GitHub](https://github.com/SignedShot/signedshot-validator)
128
+ - [Website](https://signedshot.io)
129
+
130
+ ## License
131
+
132
+ MIT
133
+
@@ -0,0 +1,205 @@
1
+ # SignedShot Validator
2
+
3
+ Verify SignedShot media authenticity proofs. Available as a Rust CLI and Python library.
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/signedshot)](https://pypi.org/project/signedshot/)
6
+ [![CI](https://github.com/SignedShot/signedshot-validator/actions/workflows/ci.yml/badge.svg)](https://github.com/SignedShot/signedshot-validator/actions/workflows/ci.yml)
7
+
8
+ ## Overview
9
+
10
+ SignedShot is an open protocol for proving photos and videos haven't been altered since capture. This validator verifies the cryptographic proofs (sidecars) generated by the SignedShot iOS SDK.
11
+
12
+ ## Installation
13
+
14
+ ### Python (PyPI)
15
+
16
+ ```bash
17
+ pip install signedshot
18
+ ```
19
+
20
+ ### Rust (Cargo)
21
+
22
+ ```bash
23
+ cargo install signedshot-validator
24
+ ```
25
+
26
+ ## Python Library
27
+
28
+ ```python
29
+ import signedshot
30
+
31
+ # Validate from files
32
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
33
+
34
+ print(result.valid) # True/False
35
+ print(result.version) # Sidecar format version
36
+ print(result.error) # Error message if validation failed
37
+
38
+ # Capture trust (JWT verification)
39
+ trust = result.capture_trust
40
+ print(trust["signature_valid"]) # JWT signature verified
41
+ print(trust["issuer"]) # API that issued the token
42
+ print(trust["publisher_id"]) # Publisher ID
43
+ print(trust["device_id"]) # Device ID
44
+ print(trust["capture_id"]) # Capture session ID
45
+ print(trust["method"]) # Attestation: "sandbox", "app_check", or "app_attest"
46
+ print(trust["app_id"]) # App bundle ID (if attested)
47
+ print(trust["issued_at"]) # Unix timestamp
48
+
49
+ # Media integrity (content verification)
50
+ integrity = result.media_integrity
51
+ print(integrity["content_hash_valid"]) # SHA-256 hash matches
52
+ print(integrity["signature_valid"]) # ECDSA signature verified
53
+ print(integrity["capture_id_match"]) # Capture IDs match
54
+ print(integrity["content_hash"]) # SHA-256 of media
55
+ print(integrity["captured_at"]) # ISO8601 timestamp
56
+ ```
57
+
58
+ ### Validate from Bytes
59
+
60
+ ```python
61
+ # Validate from in-memory data
62
+ with open("photo.sidecar.json") as f:
63
+ sidecar_json = f.read()
64
+ with open("photo.jpg", "rb") as f:
65
+ media_bytes = f.read()
66
+
67
+ result = signedshot.validate(sidecar_json, media_bytes)
68
+ ```
69
+
70
+ ### Validate with Pre-loaded JWKS
71
+
72
+ ```python
73
+ # Avoid HTTP call by providing JWKS directly
74
+ import requests
75
+
76
+ jwks = requests.get("https://api.signedshot.io/.well-known/jwks.json").text
77
+ result = signedshot.validate_with_jwks(sidecar_json, media_bytes, jwks)
78
+ ```
79
+
80
+ ### Convert to Dict/JSON
81
+
82
+ ```python
83
+ # Get result as dictionary
84
+ data = result.to_dict()
85
+
86
+ # Get result as JSON string
87
+ json_str = result.to_json()
88
+ ```
89
+
90
+ ## CLI Usage
91
+
92
+ ### Validate Media
93
+
94
+ ```bash
95
+ # Basic validation
96
+ signedshot validate photo.sidecar.json photo.jpg
97
+
98
+ # Output as JSON
99
+ signedshot validate photo.sidecar.json photo.jpg --json
100
+ ```
101
+
102
+ ### Parse Sidecar (without validation)
103
+
104
+ ```bash
105
+ signedshot parse photo.sidecar.json
106
+ ```
107
+
108
+ ### Example Output
109
+
110
+ ```
111
+ Validating sidecar: photo.sidecar.json
112
+ Media file: photo.jpg
113
+ [OK] Sidecar parsed
114
+ [OK] JWT decoded
115
+ Issuer: https://api.signedshot.io
116
+ Publisher: 9a5b1062-a8fe-4871-bdc1-fe54e96cbf1c
117
+ Device: ea5c9bfe-6bbc-4ee2-b82d-0bcfcc185ef1
118
+ Capture: ac85dbd2-d8a8-4d0b-9e39-2feef5f7b19f
119
+ Method: app_check
120
+ App ID: io.signedshot.capture
121
+ [OK] JWT signature verified
122
+ [OK] Content hash matches
123
+ [OK] Media signature verified
124
+ [OK] Capture IDs match
125
+
126
+ ✓ VALID - Media authenticity verified
127
+ ```
128
+
129
+ ## What It Validates
130
+
131
+ ### 1. Capture Trust (JWT)
132
+
133
+ - Fetches JWKS from issuer (or uses provided keys)
134
+ - Verifies ES256 (P-256 ECDSA) signature
135
+ - Extracts claims: publisher, device, capture ID, attestation method
136
+
137
+ ### 2. Media Integrity
138
+
139
+ - Computes SHA-256 hash of media file
140
+ - Compares with `content_hash` in sidecar
141
+ - Verifies ECDSA signature over integrity data
142
+ - Confirms `capture_id` matches JWT
143
+
144
+ ### 3. Cross-Validation
145
+
146
+ - Ensures capture_id in JWT matches capture_id in media_integrity
147
+ - Validates all timestamps and formats
148
+
149
+ ## Building from Source
150
+
151
+ ### Rust CLI
152
+
153
+ ```bash
154
+ git clone https://github.com/SignedShot/signedshot-validator.git
155
+ cd signedshot-validator
156
+
157
+ cargo build --release
158
+ ./target/release/signedshot --help
159
+ ```
160
+
161
+ ### Python Wheels
162
+
163
+ ```bash
164
+ # Install maturin
165
+ pip install maturin
166
+
167
+ # Build wheel
168
+ cd python
169
+ maturin build --release
170
+
171
+ # Install locally
172
+ pip install ../target/wheels/signedshot-*.whl
173
+ ```
174
+
175
+ ## Development
176
+
177
+ ```bash
178
+ # Format
179
+ cargo fmt
180
+
181
+ # Lint
182
+ cargo clippy -- -D warnings
183
+
184
+ # Test
185
+ cargo test
186
+
187
+ # Build
188
+ cargo build --release
189
+ ```
190
+
191
+ ## Related Repositories
192
+
193
+ - [signedshot-api](https://github.com/SignedShot/signedshot-api) - Backend API
194
+ - [signedshot-ios](https://github.com/SignedShot/signedshot-ios) - iOS SDK
195
+
196
+ ## Links
197
+
198
+ - [PyPI Package](https://pypi.org/project/signedshot/)
199
+ - [Website](https://signedshot.io)
200
+ - [Documentation](https://signedshot.io/docs)
201
+ - [Interactive Demo](https://signedshot.io/demo)
202
+
203
+ ## License
204
+
205
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -4,9 +4,9 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "signedshot"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Validator for SignedShot media authenticity proofs"
9
- readme = "README.md"
9
+ readme = "python/README.md"
10
10
  license = { text = "MIT" }
11
11
  requires-python = ">=3.8"
12
12
  classifiers = [
@@ -0,0 +1,109 @@
1
+ # SignedShot
2
+
3
+ Verify SignedShot media authenticity proofs in Python.
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/signedshot)](https://pypi.org/project/signedshot/)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install signedshot
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```python
16
+ import signedshot
17
+
18
+ # Validate from files
19
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
20
+
21
+ print(result.valid) # True if all checks pass
22
+ print(result.error) # Error message if validation failed
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Validate from Files
28
+
29
+ ```python
30
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
31
+ ```
32
+
33
+ ### Validate from Bytes
34
+
35
+ ```python
36
+ with open("photo.sidecar.json") as f:
37
+ sidecar_json = f.read()
38
+ with open("photo.jpg", "rb") as f:
39
+ media_bytes = f.read()
40
+
41
+ result = signedshot.validate(sidecar_json, media_bytes)
42
+ ```
43
+
44
+ ### Validate with Pre-loaded JWKS
45
+
46
+ Avoid HTTP calls by providing JWKS directly:
47
+
48
+ ```python
49
+ import requests
50
+
51
+ jwks = requests.get("https://api.signedshot.io/.well-known/jwks.json").text
52
+ result = signedshot.validate_with_jwks(sidecar_json, media_bytes, jwks)
53
+ ```
54
+
55
+ ## Validation Result
56
+
57
+ ```python
58
+ result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
59
+
60
+ # Overall result
61
+ result.valid # True/False
62
+ result.version # Sidecar format version
63
+ result.error # Error message (if any)
64
+
65
+ # Capture trust (JWT verification)
66
+ trust = result.capture_trust
67
+ trust["signature_valid"] # JWT signature verified
68
+ trust["issuer"] # API that issued the token
69
+ trust["publisher_id"] # Publisher ID
70
+ trust["device_id"] # Device ID
71
+ trust["capture_id"] # Capture session ID
72
+ trust["method"] # "sandbox", "app_check", or "app_attest"
73
+ trust["app_id"] # App bundle ID (if attested)
74
+ trust["issued_at"] # Unix timestamp
75
+
76
+ # Media integrity (content verification)
77
+ integrity = result.media_integrity
78
+ integrity["content_hash_valid"] # SHA-256 hash matches
79
+ integrity["signature_valid"] # ECDSA signature verified
80
+ integrity["capture_id_match"] # Capture IDs match
81
+ integrity["content_hash"] # SHA-256 of media
82
+ integrity["captured_at"] # ISO8601 timestamp
83
+
84
+ # Export
85
+ result.to_dict() # Convert to dictionary
86
+ result.to_json() # Convert to JSON string
87
+ ```
88
+
89
+ ## What It Validates
90
+
91
+ 1. **Capture Trust (JWT)**
92
+ - Fetches JWKS from issuer
93
+ - Verifies ES256 signature
94
+ - Extracts attestation claims
95
+
96
+ 2. **Media Integrity**
97
+ - Computes SHA-256 of media
98
+ - Verifies ECDSA signature
99
+ - Confirms capture_id matches
100
+
101
+ ## Links
102
+
103
+ - [Documentation](https://signedshot.io/docs)
104
+ - [GitHub](https://github.com/SignedShot/signedshot-validator)
105
+ - [Website](https://signedshot.io)
106
+
107
+ ## License
108
+
109
+ MIT
signedshot-0.1.4/PKG-INFO DELETED
@@ -1,63 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: signedshot
3
- Version: 0.1.4
4
- Classifier: Development Status :: 4 - Beta
5
- Classifier: Intended Audience :: Developers
6
- Classifier: License :: OSI Approved :: MIT License
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.8
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Rust
14
- Classifier: Topic :: Security :: Cryptography
15
- Summary: Validator for SignedShot media authenticity proofs
16
- Keywords: signedshot,media,authenticity,validation,cryptography
17
- License: MIT
18
- Requires-Python: >=3.8
19
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
- Project-URL: Homepage, https://signedshot.io
21
- Project-URL: Repository, https://github.com/SignedShot/signedshot-validator
22
-
23
- # SignedShot Validator
24
-
25
- Validator for SignedShot media authenticity proofs.
26
-
27
- ## Overview
28
-
29
- SignedShot is a media authenticity verification system. This validator checks cryptographic proofs (sidecars) that verify media was captured on a legitimate device.
30
-
31
- ## Installation
32
-
33
- ```bash
34
- cargo install signedshot-validator
35
- ```
36
-
37
- ## Usage
38
-
39
- ```bash
40
- signedshot validate photo.sidecar.json
41
- ```
42
-
43
- ## Development
44
-
45
- Run these checks locally before pushing (same as CI):
46
-
47
- ```bash
48
- cargo fmt --check # Check formatting
49
- cargo clippy -- -D warnings # Lint
50
- cargo test # Run tests
51
- cargo build --release # Build
52
- ```
53
-
54
- To fix formatting automatically:
55
-
56
- ```bash
57
- cargo fmt
58
- ```
59
-
60
- ## License
61
-
62
- MIT
63
-
@@ -1,40 +0,0 @@
1
- # SignedShot Validator
2
-
3
- Validator for SignedShot media authenticity proofs.
4
-
5
- ## Overview
6
-
7
- SignedShot is a media authenticity verification system. This validator checks cryptographic proofs (sidecars) that verify media was captured on a legitimate device.
8
-
9
- ## Installation
10
-
11
- ```bash
12
- cargo install signedshot-validator
13
- ```
14
-
15
- ## Usage
16
-
17
- ```bash
18
- signedshot validate photo.sidecar.json
19
- ```
20
-
21
- ## Development
22
-
23
- Run these checks locally before pushing (same as CI):
24
-
25
- ```bash
26
- cargo fmt --check # Check formatting
27
- cargo clippy -- -D warnings # Lint
28
- cargo test # Run tests
29
- cargo build --release # Build
30
- ```
31
-
32
- To fix formatting automatically:
33
-
34
- ```bash
35
- cargo fmt
36
- ```
37
-
38
- ## License
39
-
40
- MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes