credenshare 0.1.2__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.
- credenshare-0.1.2/.gitignore +13 -0
- credenshare-0.1.2/CRYPTO_WIRE_SPEC.md +346 -0
- credenshare-0.1.2/LICENSE +201 -0
- credenshare-0.1.2/NOTICE +8 -0
- credenshare-0.1.2/PKG-INFO +256 -0
- credenshare-0.1.2/README.md +224 -0
- credenshare-0.1.2/VERSIONING.md +237 -0
- credenshare-0.1.2/pyproject.toml +77 -0
- credenshare-0.1.2/src/credenshare/__init__.py +106 -0
- credenshare-0.1.2/src/credenshare/client.py +581 -0
- credenshare-0.1.2/src/credenshare/conformance/__init__.py +308 -0
- credenshare-0.1.2/src/credenshare/conformance/__main__.py +50 -0
- credenshare-0.1.2/src/credenshare/conformance/vectors.v1.json +131 -0
- credenshare-0.1.2/src/credenshare/crypto.py +452 -0
- credenshare-0.1.2/src/credenshare/errors.py +234 -0
- credenshare-0.1.2/src/credenshare/webhooks.py +126 -0
- credenshare-0.1.2/tests/test_client.py +432 -0
- credenshare-0.1.2/tests/test_conformance.py +314 -0
- credenshare-0.1.2/tests/test_error_hierarchy.py +161 -0
- credenshare-0.1.2/tests/test_input_hardening.py +86 -0
- credenshare-0.1.2/tests/test_public_surface.py +43 -0
- credenshare-0.1.2/tests/test_vectors_integrity.py +104 -0
- credenshare-0.1.2/tests/test_webhooks.py +150 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# CredenShare wire and crypto specification
|
|
2
|
+
|
|
3
|
+
**Version 1 · normative**
|
|
4
|
+
|
|
5
|
+
This document defines the cryptographic constructions and wire formats a CredenShare client
|
|
6
|
+
must implement. It is the normative reference for the application in this repository and for
|
|
7
|
+
every SDK (Python, Go, Rust, Node), which are independent implementations in separate
|
|
8
|
+
repositories.
|
|
9
|
+
|
|
10
|
+
**The spec is normative, not any implementation.** Rev 3 of `API_PLATFORM_PLAN.md` decided
|
|
11
|
+
that public and private code stay completely separate — no shared crypto package, because a
|
|
12
|
+
module the production app depends on is a supply-chain surface, and for a product whose whole
|
|
13
|
+
claim is that we cannot read customer data, that is the wrong surface to open. The cost of
|
|
14
|
+
that decision is five independent implementations that can drift; the mitigation is this
|
|
15
|
+
document plus `conformance/vectors.v1.json`, which every implementation must reproduce.
|
|
16
|
+
|
|
17
|
+
Conformance vectors are **data**. They are vendored and compared, never imported. Data crosses
|
|
18
|
+
the boundary between public and private code; code does not.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 0. Conventions
|
|
23
|
+
|
|
24
|
+
| term | meaning |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `base64` | standard base64 with padding (RFC 4648 §4) |
|
|
27
|
+
| `base64url` | URL-safe base64, **no padding** (RFC 4648 §5) |
|
|
28
|
+
| `‖` | byte concatenation |
|
|
29
|
+
| `utf8(s)` | UTF-8 encoding of string `s`, no BOM |
|
|
30
|
+
|
|
31
|
+
Byte lengths are exact. A field described as 16 bytes is always 16 bytes.
|
|
32
|
+
|
|
33
|
+
Key words follow RFC 2119.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 1. Primitives
|
|
38
|
+
|
|
39
|
+
| primitive | parameters |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Hash | SHA-256 |
|
|
42
|
+
| KDF | HKDF-SHA-256 (RFC 5869), extract-and-expand |
|
|
43
|
+
| AEAD | AES-256-GCM, 96-bit IV, 128-bit tag |
|
|
44
|
+
| Curve | NIST P-256 (secp256r1), ECDH |
|
|
45
|
+
| Password KDF | PBKDF2-HMAC-SHA-256, 600,000 iterations |
|
|
46
|
+
|
|
47
|
+
**`hkdf(ikm, salt, info, len)`** denotes HKDF-SHA-256 with `info = utf8(info)`. An empty salt
|
|
48
|
+
is a zero-length byte string, **not** a block of zero bytes — implementations that pad an
|
|
49
|
+
absent salt will produce different output and fail conformance.
|
|
50
|
+
|
|
51
|
+
AES-GCM output is `ciphertext ‖ tag` in a single buffer, matching WebCrypto. Implementations
|
|
52
|
+
whose AEAD returns tag and ciphertext separately MUST concatenate in that order.
|
|
53
|
+
|
|
54
|
+
P-256 public keys are the **uncompressed** point encoding: `0x04 ‖ X(32) ‖ Y(32)`, 65 bytes.
|
|
55
|
+
|
|
56
|
+
### 1.1 Domain separation
|
|
57
|
+
|
|
58
|
+
Every derivation from the same input keying material uses a distinct `info` string. This is
|
|
59
|
+
what allows the access token to be handed to the server while the content key is not.
|
|
60
|
+
|
|
61
|
+
| `info` | purpose |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `content` | content encryption key, no passcode |
|
|
64
|
+
| `content\|<passcode>` | content encryption key with a passcode |
|
|
65
|
+
| `access` | access token |
|
|
66
|
+
| `verify` | passcode verifier |
|
|
67
|
+
| `crs-ecdh-p256-scalar` | seed → private scalar |
|
|
68
|
+
| `crs-request-submission` | ECDH shared secret → wrapping key |
|
|
69
|
+
| `custody` | API credential custody secret → keypair seed (§3.1) |
|
|
70
|
+
|
|
71
|
+
Implementations MUST NOT add, rename or reuse these strings. A collision silently makes two
|
|
72
|
+
different secrets equal.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 2. Content encryption
|
|
77
|
+
|
|
78
|
+
Used for shares, pastes and secure-request submissions.
|
|
79
|
+
|
|
80
|
+
### 2.1 The content key and the fragment
|
|
81
|
+
|
|
82
|
+
A content key is **32 random bytes** from a cryptographically secure source.
|
|
83
|
+
|
|
84
|
+
It is transported in the URL fragment, which browsers never send to a server:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
fragment = "1" ‖ base64url(contentKey)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The fragment is **bare** — a single leading version character, no `k=` prefix. A key=value
|
|
91
|
+
appendix reads as optional and invites truncation by link-mangling clients, and a truncated
|
|
92
|
+
fragment must fail closed rather than appear to be a well-formed link missing a part.
|
|
93
|
+
|
|
94
|
+
Parsing MUST reject, distinguishably:
|
|
95
|
+
|
|
96
|
+
| condition | reason |
|
|
97
|
+
|---|---|
|
|
98
|
+
| empty or absent | `missing-key` |
|
|
99
|
+
| leading character is not `1` | `malformed-key` |
|
|
100
|
+
| body is not valid base64url | `malformed-key` |
|
|
101
|
+
| decoded length ≠ 32 | `malformed-key` |
|
|
102
|
+
|
|
103
|
+
The distinction matters to users: "your link is incomplete" and "this expired" look identical
|
|
104
|
+
on screen and have opposite remedies.
|
|
105
|
+
|
|
106
|
+
### 2.2 Encryption
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
salt = 16 random bytes
|
|
110
|
+
iv = 12 random bytes
|
|
111
|
+
key = hkdf(contentKey, salt, passcode ? "content|" + passcode : "content", 32)
|
|
112
|
+
body = AES-256-GCM(key, iv, utf8(JSON.stringify(fields)))
|
|
113
|
+
blob = base64(salt ‖ iv ‖ body)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`blob` uses **standard** base64, not base64url: it travels in a JSON body, never in a URL.
|
|
117
|
+
|
|
118
|
+
The passcode is mixed into `info`, **never into the salt**. Salt and info serve different
|
|
119
|
+
purposes, and putting the passcode in the salt would make the derivation depend on a value
|
|
120
|
+
that must stay reproducible from stored data alone.
|
|
121
|
+
|
|
122
|
+
The plaintext is the JSON serialization of the field array. Unknown members MUST be preserved
|
|
123
|
+
on decrypt and re-emitted unchanged.
|
|
124
|
+
|
|
125
|
+
#### 2.2.1 The field object
|
|
126
|
+
|
|
127
|
+
This was missing from rev 1, and its absence is the kind of gap that costs an afternoon: a
|
|
128
|
+
share built with the wrong member names still encrypts, still posts, still decrypts, and
|
|
129
|
+
still renders — with every field label blank. Nothing errors. Caught by opening an
|
|
130
|
+
API-created share in a real browser and noticing the values had no names against them.
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
[
|
|
134
|
+
{ "key": "Database password", "value": "s3cr3t", "type": "password" },
|
|
135
|
+
{ "key": "Host", "value": "db.internal.example", "type": "text" }
|
|
136
|
+
]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| Member | Required | Notes |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| `key` | yes | The field's visible **label**. Not an identifier — it is what the recipient reads. Blank renders as an unlabelled row. |
|
|
142
|
+
| `value` | yes | The field's content. |
|
|
143
|
+
| `type` | yes | One of `text`, `password`, `date`, `multiline`, `markdown`, `source_code`. Decides rendering: `password` is masked behind a reveal, `source_code` is syntax-highlighted, `markdown` is rendered. |
|
|
144
|
+
| `selectedProgrammingLanguage` | no | Language hint for `source_code`. |
|
|
145
|
+
| `filename` | no | For `source_code`/`markdown`, offers the recipient a Download button using this name. |
|
|
146
|
+
|
|
147
|
+
`key` is the member name for the label because that is what the field array has always used
|
|
148
|
+
and the recipient view reads it directly. It is **not** `label`, `name` or `title`; those are
|
|
149
|
+
silently ignored, which is precisely the failure described above.
|
|
150
|
+
|
|
151
|
+
An unrecognised `type` MUST be treated as `text` rather than rejected — a newer sender must
|
|
152
|
+
not be able to make an older reader fail on content it can otherwise display perfectly.
|
|
153
|
+
|
|
154
|
+
Decryption MUST reject a blob shorter than `16 + 12 + 16` bytes before attempting anything
|
|
155
|
+
else, and MUST treat AEAD authentication failure as an ordinary decryption failure — a wrong
|
|
156
|
+
passcode and a tampered blob are indistinguishable by design.
|
|
157
|
+
|
|
158
|
+
### 2.3 Access token
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
accessToken = base64url(hkdf(contentKey, "", "access", 32))
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The **salt is empty** so the token is reproducible from the fragment alone, on any device,
|
|
165
|
+
with no stored state. The server stores only a hash of it and learns nothing about the
|
|
166
|
+
content key, because HKDF's domain separation makes the `access` output independent of the
|
|
167
|
+
`content` output.
|
|
168
|
+
|
|
169
|
+
### 2.4 Passcode verifier
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
verifier = base64url(hkdf(utf8(passcode), "", "verify", 32))
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
One-way on purpose: the server can check an attempt without gaining the ability to decrypt.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 3. Seed-derived P-256 keypairs
|
|
180
|
+
|
|
181
|
+
Secure-request keys, zero-knowledge account keys and team keys are all stored as a **32-byte
|
|
182
|
+
seed** rather than a serialized keypair. The seed reconstructs the keypair anywhere, which is
|
|
183
|
+
what lets an entire private key live in a URL fragment.
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
wide = hkdf(seed, "", "crs-ecdh-p256-scalar", 48)
|
|
187
|
+
scalar = (bigEndianInt(wide) mod (n - 1)) + 1 // n = P-256 group order
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
48 bytes rather than 32 is deliberate: the extra 128 bits make the modular bias negligible.
|
|
191
|
+
This is the standard hash-to-field construction. Adding 1 after reducing mod `n-1` yields a
|
|
192
|
+
scalar in `[1, n-1]`, excluding zero, which is not a valid private key.
|
|
193
|
+
|
|
194
|
+
`scalar` is encoded big-endian in exactly 32 bytes. The public key is `scalar · G` in
|
|
195
|
+
uncompressed form.
|
|
196
|
+
|
|
197
|
+
> P-256 rather than X25519 because WebCrypto support for X25519 is still uneven across
|
|
198
|
+
> browsers, and the property required here — that the private key cannot be recovered from
|
|
199
|
+
> the published public key — holds equally.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## 3.1 API credential custody
|
|
204
|
+
|
|
205
|
+
An API credential is:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
crs_sk_live_<keyId>.<authSecret>.<custodySecret>
|
|
209
|
+
│ │ └ NEVER transmitted
|
|
210
|
+
│ └ the bearer credential; only its SHA-256 is stored
|
|
211
|
+
└ opaque public id
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Clients MUST send only the first two parts. A server receiving all three MUST refuse the
|
|
215
|
+
request: the custody half has been disclosed, and that credential should be rotated.
|
|
216
|
+
|
|
217
|
+
The custody keypair is derived locally:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
seed = hkdf(utf8(custodySecret), "", "custody", 32)
|
|
221
|
+
publicKey = scalar · G (uncompressed, per §3)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Only `publicKey` is uploaded.
|
|
225
|
+
|
|
226
|
+
**Why a second secret rather than deriving custody from the auth secret.** The auth secret
|
|
227
|
+
is transmitted on every request, so deriving custody from it would mean the server *could*
|
|
228
|
+
reconstruct the private key and decrypt. Not that it would — that it could, which is
|
|
229
|
+
precisely what zero-knowledge is meant to eliminate. Splitting the credential removes the
|
|
230
|
+
capability instead of promising restraint. It is the same reasoning as the URL fragment,
|
|
231
|
+
applied to a credential.
|
|
232
|
+
|
|
233
|
+
Two consequences follow, and both are load-bearing rather than incidental:
|
|
234
|
+
|
|
235
|
+
- Any machine holding the credential derives the same keypair, so multi-runner and
|
|
236
|
+
ephemeral-container automation need no local state.
|
|
237
|
+
- Revoking the key revokes custody in the same motion. The wraps remain and nothing can
|
|
238
|
+
open them.
|
|
239
|
+
|
|
240
|
+
The empty salt is deliberate and matches §2.3: the derivation must be reproducible from
|
|
241
|
+
the credential alone, anywhere, with nothing stored.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## 4. ECDH wrapping
|
|
246
|
+
|
|
247
|
+
Used to wrap a key to a published public key: request submissions, and zero-knowledge wraps
|
|
248
|
+
to an account key, a team key or an API key.
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
ephemeral = fresh random P-256 keypair // per operation, never reused
|
|
252
|
+
sharedSecret = ECDH(ephemeral.private, recipientPublic) // 32-byte X coordinate
|
|
253
|
+
salt = 16 random bytes
|
|
254
|
+
iv = 12 random bytes
|
|
255
|
+
wrappingKey = hkdf(sharedSecret, salt, "crs-request-submission", 32)
|
|
256
|
+
body = AES-256-GCM(wrappingKey, iv, payload)
|
|
257
|
+
wrapped = base64(0x01 ‖ ephemeral.public(65) ‖ salt(16) ‖ iv(12) ‖ body)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The leading byte is the wrap format version, currently `1`. A reader MUST reject any other
|
|
261
|
+
value rather than guessing.
|
|
262
|
+
|
|
263
|
+
Wrapping a 32-byte payload therefore produces **142 bytes**, or 192 base64 characters:
|
|
264
|
+
`1 + 65 + 16 + 12 + 32 + 16`. That arithmetic is a useful field check.
|
|
265
|
+
|
|
266
|
+
**The ephemeral keypair MUST be freshly generated per wrap.** The conformance vector derives
|
|
267
|
+
it from a seed only so the fixture is reproducible; reusing an ephemeral key across wraps
|
|
268
|
+
leaks the relationship between them.
|
|
269
|
+
|
|
270
|
+
Unwrapping reverses this using the recipient's seed-derived private key. It MUST reject a
|
|
271
|
+
blob shorter than `1 + 65 + 16 + 12 + 16` bytes.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 5. Passphrase envelope (zero-knowledge account keys)
|
|
276
|
+
|
|
277
|
+
The account key seed is wrapped under a key derived from a **generated** passphrase.
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
alphabet = "23456789ABCDEFGHJKMNPQRSTVWXYZ" // 30 symbols
|
|
281
|
+
length = 24 characters // ≈ 117.8 bits
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Crockford-style: no `I`, `L`, `O`, `U`, `1` or `0`, because the user transcribes this off a
|
|
285
|
+
screen exactly once and `l` versus `1` is where that goes wrong. Generation MUST use rejection
|
|
286
|
+
sampling, not `random % 30`, which would bias toward the first symbols and quietly cost
|
|
287
|
+
entropy in the one secret with no server-side rate limit in front of it.
|
|
288
|
+
|
|
289
|
+
The passphrase is **generated, never user-chosen**: a chosen secret is a dictionary target
|
|
290
|
+
handed to an attacker alongside the ciphertext.
|
|
291
|
+
|
|
292
|
+
Normalization before use: strip spaces and hyphens, uppercase.
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
wrappingKey = PBKDF2-HMAC-SHA-256(utf8(normalize(passphrase)), salt, 600000) → 32 bytes
|
|
296
|
+
wrapped = base64(iv(12) ‖ AES-256-GCM(wrappingKey, iv, seed))
|
|
297
|
+
kdfSalt = base64url(salt(16))
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Wrapping a 32-byte seed yields 60 bytes, or 80 base64 characters: `12 + 32 + 16`.
|
|
301
|
+
|
|
302
|
+
The salt is stored beside the wrapped blob, not inside it.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 6. Versioning
|
|
307
|
+
|
|
308
|
+
Two independent version numbers, deliberately:
|
|
309
|
+
|
|
310
|
+
- **Fragment version** — the leading character of the fragment. Currently `1`.
|
|
311
|
+
- **Wrap version** — the leading byte of an ECDH-wrapped blob. Currently `1`.
|
|
312
|
+
|
|
313
|
+
A bump to either is a **breaking change**. The rollout order is fixed and MUST be observed:
|
|
314
|
+
|
|
315
|
+
1. The spec and conformance vectors publish the new version.
|
|
316
|
+
2. Every SDK ships support for reading it.
|
|
317
|
+
3. Only then may any implementation begin emitting it.
|
|
318
|
+
|
|
319
|
+
Emitting before readers exist strands content that cannot be opened. Treating a version bump
|
|
320
|
+
as a one-line change is the failure this ordering exists to prevent.
|
|
321
|
+
|
|
322
|
+
Readers MUST reject unknown versions rather than attempting a best-effort parse.
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## 7. Conformance
|
|
327
|
+
|
|
328
|
+
`conformance/vectors.v1.json` is normative. An implementation conforms when it reproduces
|
|
329
|
+
every vector exactly.
|
|
330
|
+
|
|
331
|
+
The vectors cover derivations, encodings, and — more importantly — **decrypting and unwrapping
|
|
332
|
+
material produced by a different implementation**. The derivation cases catch drift early; the
|
|
333
|
+
decrypt and unwrap cases are what actually prove interoperability, because passing them means
|
|
334
|
+
the implementation can read what another one wrote.
|
|
335
|
+
|
|
336
|
+
The vectors are generated by `scripts/gen-conformance-vectors.mjs`, which implements this
|
|
337
|
+
document from scratch against `node:crypto` and imports nothing from the application. That
|
|
338
|
+
independence is the point: if the generator used the app's crypto, the vectors would merely
|
|
339
|
+
restate whatever the app does, and an app bug would become the standard every SDK is held to.
|
|
340
|
+
|
|
341
|
+
All vector inputs are synthetic and key nothing real. Salts, IVs and ephemeral scalars are
|
|
342
|
+
fixed so the fixture is reproducible; production code MUST use fresh random values.
|
|
343
|
+
|
|
344
|
+
**Every implementation gates on these vectors**: a CI check in this repository asserts the
|
|
345
|
+
vendored copy has not diverged from the published fixture and that the application satisfies
|
|
346
|
+
it, and each SDK gates its releases the same way.
|
|
@@ -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 2026 CredenShare Inc.
|
|
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.
|
credenshare-0.1.2/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
CredenShare SDK for Python
|
|
2
|
+
Copyright 2026 CredenShare Inc.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0. See LICENSE.
|
|
5
|
+
|
|
6
|
+
This SDK is open source because it has to be. It performs the encryption, so the claim that
|
|
7
|
+
CredenShare cannot read your data is only checkable if the code doing the encrypting can be
|
|
8
|
+
read. A closed client would make that claim unverifiable.
|