treechain 4.0.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.
- treechain-4.0.0/LICENSE +12 -0
- treechain-4.0.0/PKG-INFO +223 -0
- treechain-4.0.0/README.md +189 -0
- treechain-4.0.0/pyproject.toml +73 -0
- treechain-4.0.0/setup.cfg +4 -0
- treechain-4.0.0/treechain/__init__.py +70 -0
- treechain-4.0.0/treechain/art/__init__.py +84 -0
- treechain-4.0.0/treechain/art/canvas.py +443 -0
- treechain-4.0.0/treechain/art/music.py +479 -0
- treechain-4.0.0/treechain/art/poetry.py +342 -0
- treechain-4.0.0/treechain/art/seal.py +334 -0
- treechain-4.0.0/treechain/art/tattoo.py +449 -0
- treechain-4.0.0/treechain/core/__init__.py +45 -0
- treechain-4.0.0/treechain/core/encryption.py +547 -0
- treechain-4.0.0/treechain/core/glyph_bank.py +2243 -0
- treechain-4.0.0/treechain/core/glyph_rotor.py +230 -0
- treechain-4.0.0/treechain/core/key_source.py +303 -0
- treechain-4.0.0/treechain/core/provenance_store.py +89 -0
- treechain-4.0.0/treechain/dev/__init__.py +194 -0
- treechain-4.0.0/treechain/dev/api.py +392 -0
- treechain-4.0.0/treechain/dev/auth.py +372 -0
- treechain-4.0.0/treechain/dev/config.py +415 -0
- treechain-4.0.0/treechain/dev/dns.py +490 -0
- treechain-4.0.0/treechain/dev/extras.py +800 -0
- treechain-4.0.0/treechain/dev/jwt.py +369 -0
- treechain-4.0.0/treechain/dev/log.py +424 -0
- treechain-4.0.0/treechain/dev/sign.py +408 -0
- treechain-4.0.0/treechain/py.typed +0 -0
- treechain-4.0.0/treechain/utils/__init__.py +18 -0
- treechain-4.0.0/treechain/utils/exceptions.py +25 -0
- treechain-4.0.0/treechain/vault/__init__.py +96 -0
- treechain-4.0.0/treechain/vault/core.py +717 -0
- treechain-4.0.0/treechain.egg-info/PKG-INFO +223 -0
- treechain-4.0.0/treechain.egg-info/SOURCES.txt +36 -0
- treechain-4.0.0/treechain.egg-info/dependency_links.txt +1 -0
- treechain-4.0.0/treechain.egg-info/entry_points.txt +2 -0
- treechain-4.0.0/treechain.egg-info/requires.txt +11 -0
- treechain-4.0.0/treechain.egg-info/top_level.txt +1 -0
treechain-4.0.0/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Proprietary License
|
|
2
|
+
Copyright (c) 2026 TreeChain Labs
|
|
3
|
+
Patent Pending — EP26025007.1
|
|
4
|
+
|
|
5
|
+
All rights reserved. This software and associated documentation
|
|
6
|
+
files are proprietary and confidential. Unauthorized copying,
|
|
7
|
+
modification, distribution, or use of this software, in whole
|
|
8
|
+
or in part, is strictly prohibited without explicit written
|
|
9
|
+
permission from TreeChain Labs.
|
|
10
|
+
|
|
11
|
+
For licensing inquiries: security@treechain.ai
|
|
12
|
+
For more information: treechain.ai
|
treechain-4.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: treechain
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: TreeChain GlyphJammer — Post-quantum steganographic encryption. 133,387 glyphs. Zero knowledge. Patent Pending — EP26025007.1
|
|
5
|
+
Author-email: TreeChain Labs <security@treechain.ai>
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Project-URL: Homepage, https://treechain.ai
|
|
8
|
+
Project-URL: Documentation, https://api-eu.treechain.ai/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/btmaffiliate/glyphjammer-api
|
|
10
|
+
Keywords: encryption,cryptography,steganography,glyph,polyglottal,chacha20,post-quantum,zero-knowledge,hipaa
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Security :: Cryptography
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: cryptography>=41.0.0
|
|
25
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
26
|
+
Provides-Extra: mongo
|
|
27
|
+
Requires-Dist: pymongo>=4.0.0; extra == "mongo"
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# TreeChain SDK v4.0
|
|
36
|
+
|
|
37
|
+
**Patent Pending — EP26025007.1**
|
|
38
|
+
|
|
39
|
+
**The Polyglottal Cipher™ — Invisible Encryption**
|
|
40
|
+
|
|
41
|
+
Encrypt data so it looks like multilingual poetry instead of looking encrypted.
|
|
42
|
+
Normal encryption announces itself as a target — it looks like gibberish and
|
|
43
|
+
everyone knows it's hiding something. TreeChain uses 133,387 glyphs from 180
|
|
44
|
+
languages to make encrypted data look like natural text. Nobody knows it's
|
|
45
|
+
encrypted. This is the third mode — neither plaintext nor obvious ciphertext.
|
|
46
|
+
|
|
47
|
+
- 68ms response time on primary node
|
|
48
|
+
- Validated by Prof. Vincent Rijmen, co-creator of AES
|
|
49
|
+
- Zero-knowledge architecture — we cannot read your data
|
|
50
|
+
- Five-node global mesh: Helsinki, Oregon, Singapore, Ashburn, Render
|
|
51
|
+
|
|
52
|
+
## Security Architecture
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
PRIMARY SECURITY: ChaCha20-Poly1305 (256-bit)
|
|
56
|
+
- Well-audited, misuse-resistant AEAD
|
|
57
|
+
- Same algorithm as Signal, WireGuard, TLS 1.3
|
|
58
|
+
|
|
59
|
+
DEFENSE-IN-DEPTH:
|
|
60
|
+
- Two independent 256-bit keys (K_cipher + K_glyph)
|
|
61
|
+
- Breaking encryption yields glyph-encoded data, not plaintext
|
|
62
|
+
- Attacker needs BOTH keys for semantic plaintext
|
|
63
|
+
|
|
64
|
+
STEGANOGRAPHIC CAMOUFLAGE:
|
|
65
|
+
- 133,387 glyphs balanced across 8 emotions
|
|
66
|
+
- Output resembles multilingual Unicode art
|
|
67
|
+
- Defeats heuristic encryption detection
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install treechain
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from treechain import GlyphJammer, KeySource, EmotionalState
|
|
80
|
+
|
|
81
|
+
# Create with fresh independent keys (recommended)
|
|
82
|
+
jammer = GlyphJammer.create()
|
|
83
|
+
|
|
84
|
+
# Or from environment variable
|
|
85
|
+
jammer = GlyphJammer.from_master(KeySource.env("TREECHAIN_KEY"))
|
|
86
|
+
|
|
87
|
+
# Encrypt
|
|
88
|
+
result = jammer.encrypt("Hello, world!", emotion="joy")
|
|
89
|
+
print(result.glyph_payload)
|
|
90
|
+
# Output: 馏𜽡㌎𬵃𘫙𡢽甎똂𥣶꜃Ꮸ䮁... (looks like multilingual poetry)
|
|
91
|
+
|
|
92
|
+
# Decrypt
|
|
93
|
+
plaintext = jammer.decrypt(result.glyph_payload, result.shield_id)
|
|
94
|
+
print(plaintext)
|
|
95
|
+
# Output: Hello, world!
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Emotions
|
|
99
|
+
|
|
100
|
+
Eight emotional contexts affect glyph selection:
|
|
101
|
+
|
|
102
|
+
| Emotion | Glyphs | Character |
|
|
103
|
+
|---------|--------|-----------|
|
|
104
|
+
| LOVE | 16,674 | ♥ 💜 💗 |
|
|
105
|
+
| JOY | 16,674 | ☀ ✨ 🌟 |
|
|
106
|
+
| MELANCHOLY | 16,674 | 🌙 ☽ ☾ |
|
|
107
|
+
| ANGER | 16,673 | 🔥 ⚡ 💢 |
|
|
108
|
+
| CURIOSITY | 16,673 | ❓ 💭 🔍 |
|
|
109
|
+
| PEACE | 16,673 | ☮ ☯ 🕉 |
|
|
110
|
+
| SORROW | 16,673 | 💧 🌧 💔 |
|
|
111
|
+
| AWE | 16,673 | 🌌 🪐 ⚛ |
|
|
112
|
+
|
|
113
|
+
## Key Management
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
# Option 1: Independent keys (true defense-in-depth)
|
|
117
|
+
jammer = GlyphJammer.create()
|
|
118
|
+
keys = jammer.get_keys() # TreeChainKeys(k_cipher, k_glyph)
|
|
119
|
+
|
|
120
|
+
# Option 2: From master secret (256-bit security)
|
|
121
|
+
jammer = GlyphJammer.from_master(master_key=b"your-32-byte-key")
|
|
122
|
+
|
|
123
|
+
# Option 3: From environment
|
|
124
|
+
jammer = GlyphJammer.from_master(KeySource.env("MY_KEY"))
|
|
125
|
+
|
|
126
|
+
# Option 4: Explicit key pair
|
|
127
|
+
jammer = GlyphJammer.from_keys(k_cipher=cipher_key, k_glyph=glyph_key)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Security Claims
|
|
131
|
+
|
|
132
|
+
### Honest Claims ✓
|
|
133
|
+
|
|
134
|
+
- "256-bit authenticated encryption (ChaCha20-Poly1305)"
|
|
135
|
+
- "Defense-in-depth with independent glyph key"
|
|
136
|
+
- "Breaking encryption reveals glyph data, not plaintext"
|
|
137
|
+
- "Two independent keys required for full compromise"
|
|
138
|
+
- "Steganographic camouflage with 133,387 unique glyphs"
|
|
139
|
+
|
|
140
|
+
### Not Claimed ✗
|
|
141
|
+
|
|
142
|
+
- "512-bit security" (mathematically incorrect)
|
|
143
|
+
- "Multiplicative key strength" (not how crypto works)
|
|
144
|
+
- "Stronger than AES-256" (same security class)
|
|
145
|
+
- "Unbreakable" (nothing is)
|
|
146
|
+
|
|
147
|
+
## API Reference
|
|
148
|
+
|
|
149
|
+
### GlyphJammer
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
class GlyphJammer:
|
|
153
|
+
@classmethod
|
|
154
|
+
def create(seed="default", emotion="love") -> GlyphJammer
|
|
155
|
+
|
|
156
|
+
@classmethod
|
|
157
|
+
def from_master(master_key, seed="default", emotion="love") -> GlyphJammer
|
|
158
|
+
|
|
159
|
+
@classmethod
|
|
160
|
+
def from_keys(k_cipher, k_glyph, seed="default", emotion="love") -> GlyphJammer
|
|
161
|
+
|
|
162
|
+
def encrypt(plaintext, emotion=None, sender="anonymous") -> EncryptionResult
|
|
163
|
+
|
|
164
|
+
def decrypt(glyph_payload, shield_id, metadata=None) -> str
|
|
165
|
+
|
|
166
|
+
def get_keys() -> TreeChainKeys
|
|
167
|
+
|
|
168
|
+
def get_status() -> Dict
|
|
169
|
+
|
|
170
|
+
@staticmethod
|
|
171
|
+
def security_info() -> Dict
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### EncryptionResult
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
@dataclass
|
|
178
|
+
class EncryptionResult:
|
|
179
|
+
glyph_payload: str # Encrypted data as glyphs
|
|
180
|
+
shield_id: str # Unique identifier
|
|
181
|
+
emotion: str # Emotion used
|
|
182
|
+
metadata: Dict # Message metadata
|
|
183
|
+
glyph_art: str # Visual representation (optional)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Upgrading from v3
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
# v3 (old)
|
|
190
|
+
jammer = GlyphJammer(master_key=key)
|
|
191
|
+
glyph_payload, shield_id = jammer.encrypt(text, emotion)
|
|
192
|
+
|
|
193
|
+
# v4 (new) - same API works!
|
|
194
|
+
jammer = GlyphJammer.from_master(master_key=key)
|
|
195
|
+
result = jammer.encrypt(text, emotion=emotion)
|
|
196
|
+
glyph_payload, shield_id = result.glyph_payload, result.shield_id
|
|
197
|
+
|
|
198
|
+
# Or use simple API for backward compatibility
|
|
199
|
+
glyph_payload, shield_id = jammer.encrypt_simple(text, emotion)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## CLI
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Encrypt from command line
|
|
206
|
+
treechain --encrypt "Hello, world!" --json
|
|
207
|
+
|
|
208
|
+
# Decrypt
|
|
209
|
+
treechain --decrypt-glyph "..." --decrypt-shield "gs_..."
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Links
|
|
213
|
+
|
|
214
|
+
- Website: [treechain.ai](https://treechain.ai)
|
|
215
|
+
- API Docs: [api-eu.treechain.ai/docs](https://api-eu.treechain.ai/docs)
|
|
216
|
+
- Support: security@treechain.ai
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
Proprietary — TreeChain Labs
|
|
221
|
+
Patent Pending — EP26025007.1
|
|
222
|
+
|
|
223
|
+
See [LICENSE](LICENSE) for full terms.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# TreeChain SDK v4.0
|
|
2
|
+
|
|
3
|
+
**Patent Pending — EP26025007.1**
|
|
4
|
+
|
|
5
|
+
**The Polyglottal Cipher™ — Invisible Encryption**
|
|
6
|
+
|
|
7
|
+
Encrypt data so it looks like multilingual poetry instead of looking encrypted.
|
|
8
|
+
Normal encryption announces itself as a target — it looks like gibberish and
|
|
9
|
+
everyone knows it's hiding something. TreeChain uses 133,387 glyphs from 180
|
|
10
|
+
languages to make encrypted data look like natural text. Nobody knows it's
|
|
11
|
+
encrypted. This is the third mode — neither plaintext nor obvious ciphertext.
|
|
12
|
+
|
|
13
|
+
- 68ms response time on primary node
|
|
14
|
+
- Validated by Prof. Vincent Rijmen, co-creator of AES
|
|
15
|
+
- Zero-knowledge architecture — we cannot read your data
|
|
16
|
+
- Five-node global mesh: Helsinki, Oregon, Singapore, Ashburn, Render
|
|
17
|
+
|
|
18
|
+
## Security Architecture
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
PRIMARY SECURITY: ChaCha20-Poly1305 (256-bit)
|
|
22
|
+
- Well-audited, misuse-resistant AEAD
|
|
23
|
+
- Same algorithm as Signal, WireGuard, TLS 1.3
|
|
24
|
+
|
|
25
|
+
DEFENSE-IN-DEPTH:
|
|
26
|
+
- Two independent 256-bit keys (K_cipher + K_glyph)
|
|
27
|
+
- Breaking encryption yields glyph-encoded data, not plaintext
|
|
28
|
+
- Attacker needs BOTH keys for semantic plaintext
|
|
29
|
+
|
|
30
|
+
STEGANOGRAPHIC CAMOUFLAGE:
|
|
31
|
+
- 133,387 glyphs balanced across 8 emotions
|
|
32
|
+
- Output resembles multilingual Unicode art
|
|
33
|
+
- Defeats heuristic encryption detection
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install treechain
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from treechain import GlyphJammer, KeySource, EmotionalState
|
|
46
|
+
|
|
47
|
+
# Create with fresh independent keys (recommended)
|
|
48
|
+
jammer = GlyphJammer.create()
|
|
49
|
+
|
|
50
|
+
# Or from environment variable
|
|
51
|
+
jammer = GlyphJammer.from_master(KeySource.env("TREECHAIN_KEY"))
|
|
52
|
+
|
|
53
|
+
# Encrypt
|
|
54
|
+
result = jammer.encrypt("Hello, world!", emotion="joy")
|
|
55
|
+
print(result.glyph_payload)
|
|
56
|
+
# Output: 馏𜽡㌎𬵃𘫙𡢽甎똂𥣶꜃Ꮸ䮁... (looks like multilingual poetry)
|
|
57
|
+
|
|
58
|
+
# Decrypt
|
|
59
|
+
plaintext = jammer.decrypt(result.glyph_payload, result.shield_id)
|
|
60
|
+
print(plaintext)
|
|
61
|
+
# Output: Hello, world!
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Emotions
|
|
65
|
+
|
|
66
|
+
Eight emotional contexts affect glyph selection:
|
|
67
|
+
|
|
68
|
+
| Emotion | Glyphs | Character |
|
|
69
|
+
|---------|--------|-----------|
|
|
70
|
+
| LOVE | 16,674 | ♥ 💜 💗 |
|
|
71
|
+
| JOY | 16,674 | ☀ ✨ 🌟 |
|
|
72
|
+
| MELANCHOLY | 16,674 | 🌙 ☽ ☾ |
|
|
73
|
+
| ANGER | 16,673 | 🔥 ⚡ 💢 |
|
|
74
|
+
| CURIOSITY | 16,673 | ❓ 💭 🔍 |
|
|
75
|
+
| PEACE | 16,673 | ☮ ☯ 🕉 |
|
|
76
|
+
| SORROW | 16,673 | 💧 🌧 💔 |
|
|
77
|
+
| AWE | 16,673 | 🌌 🪐 ⚛ |
|
|
78
|
+
|
|
79
|
+
## Key Management
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
# Option 1: Independent keys (true defense-in-depth)
|
|
83
|
+
jammer = GlyphJammer.create()
|
|
84
|
+
keys = jammer.get_keys() # TreeChainKeys(k_cipher, k_glyph)
|
|
85
|
+
|
|
86
|
+
# Option 2: From master secret (256-bit security)
|
|
87
|
+
jammer = GlyphJammer.from_master(master_key=b"your-32-byte-key")
|
|
88
|
+
|
|
89
|
+
# Option 3: From environment
|
|
90
|
+
jammer = GlyphJammer.from_master(KeySource.env("MY_KEY"))
|
|
91
|
+
|
|
92
|
+
# Option 4: Explicit key pair
|
|
93
|
+
jammer = GlyphJammer.from_keys(k_cipher=cipher_key, k_glyph=glyph_key)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Security Claims
|
|
97
|
+
|
|
98
|
+
### Honest Claims ✓
|
|
99
|
+
|
|
100
|
+
- "256-bit authenticated encryption (ChaCha20-Poly1305)"
|
|
101
|
+
- "Defense-in-depth with independent glyph key"
|
|
102
|
+
- "Breaking encryption reveals glyph data, not plaintext"
|
|
103
|
+
- "Two independent keys required for full compromise"
|
|
104
|
+
- "Steganographic camouflage with 133,387 unique glyphs"
|
|
105
|
+
|
|
106
|
+
### Not Claimed ✗
|
|
107
|
+
|
|
108
|
+
- "512-bit security" (mathematically incorrect)
|
|
109
|
+
- "Multiplicative key strength" (not how crypto works)
|
|
110
|
+
- "Stronger than AES-256" (same security class)
|
|
111
|
+
- "Unbreakable" (nothing is)
|
|
112
|
+
|
|
113
|
+
## API Reference
|
|
114
|
+
|
|
115
|
+
### GlyphJammer
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
class GlyphJammer:
|
|
119
|
+
@classmethod
|
|
120
|
+
def create(seed="default", emotion="love") -> GlyphJammer
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_master(master_key, seed="default", emotion="love") -> GlyphJammer
|
|
124
|
+
|
|
125
|
+
@classmethod
|
|
126
|
+
def from_keys(k_cipher, k_glyph, seed="default", emotion="love") -> GlyphJammer
|
|
127
|
+
|
|
128
|
+
def encrypt(plaintext, emotion=None, sender="anonymous") -> EncryptionResult
|
|
129
|
+
|
|
130
|
+
def decrypt(glyph_payload, shield_id, metadata=None) -> str
|
|
131
|
+
|
|
132
|
+
def get_keys() -> TreeChainKeys
|
|
133
|
+
|
|
134
|
+
def get_status() -> Dict
|
|
135
|
+
|
|
136
|
+
@staticmethod
|
|
137
|
+
def security_info() -> Dict
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### EncryptionResult
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
@dataclass
|
|
144
|
+
class EncryptionResult:
|
|
145
|
+
glyph_payload: str # Encrypted data as glyphs
|
|
146
|
+
shield_id: str # Unique identifier
|
|
147
|
+
emotion: str # Emotion used
|
|
148
|
+
metadata: Dict # Message metadata
|
|
149
|
+
glyph_art: str # Visual representation (optional)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Upgrading from v3
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
# v3 (old)
|
|
156
|
+
jammer = GlyphJammer(master_key=key)
|
|
157
|
+
glyph_payload, shield_id = jammer.encrypt(text, emotion)
|
|
158
|
+
|
|
159
|
+
# v4 (new) - same API works!
|
|
160
|
+
jammer = GlyphJammer.from_master(master_key=key)
|
|
161
|
+
result = jammer.encrypt(text, emotion=emotion)
|
|
162
|
+
glyph_payload, shield_id = result.glyph_payload, result.shield_id
|
|
163
|
+
|
|
164
|
+
# Or use simple API for backward compatibility
|
|
165
|
+
glyph_payload, shield_id = jammer.encrypt_simple(text, emotion)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## CLI
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Encrypt from command line
|
|
172
|
+
treechain --encrypt "Hello, world!" --json
|
|
173
|
+
|
|
174
|
+
# Decrypt
|
|
175
|
+
treechain --decrypt-glyph "..." --decrypt-shield "gs_..."
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Links
|
|
179
|
+
|
|
180
|
+
- Website: [treechain.ai](https://treechain.ai)
|
|
181
|
+
- API Docs: [api-eu.treechain.ai/docs](https://api-eu.treechain.ai/docs)
|
|
182
|
+
- Support: security@treechain.ai
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
Proprietary — TreeChain Labs
|
|
187
|
+
Patent Pending — EP26025007.1
|
|
188
|
+
|
|
189
|
+
See [LICENSE](LICENSE) for full terms.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "treechain"
|
|
7
|
+
version = "4.0.0"
|
|
8
|
+
description = "TreeChain GlyphJammer — Post-quantum steganographic encryption. 133,387 glyphs. Zero knowledge. Patent Pending — EP26025007.1"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "Proprietary"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "TreeChain Labs", email = "security@treechain.ai"}
|
|
13
|
+
]
|
|
14
|
+
keywords = [
|
|
15
|
+
"encryption",
|
|
16
|
+
"cryptography",
|
|
17
|
+
"steganography",
|
|
18
|
+
"glyph",
|
|
19
|
+
"polyglottal",
|
|
20
|
+
"chacha20",
|
|
21
|
+
"post-quantum",
|
|
22
|
+
"zero-knowledge",
|
|
23
|
+
"hipaa",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 4 - Beta",
|
|
27
|
+
"Intended Audience :: Developers",
|
|
28
|
+
"License :: Other/Proprietary License",
|
|
29
|
+
"Operating System :: OS Independent",
|
|
30
|
+
"Programming Language :: Python :: 3",
|
|
31
|
+
"Programming Language :: Python :: 3.9",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Topic :: Security :: Cryptography",
|
|
36
|
+
]
|
|
37
|
+
requires-python = ">=3.9"
|
|
38
|
+
dependencies = [
|
|
39
|
+
"cryptography>=41.0.0",
|
|
40
|
+
"python-dotenv>=1.0.0",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
mongo = ["pymongo>=4.0.0"]
|
|
45
|
+
dev = [
|
|
46
|
+
"pytest>=7.0.0",
|
|
47
|
+
"pytest-cov>=4.0.0",
|
|
48
|
+
"black>=23.0.0",
|
|
49
|
+
"mypy>=1.0.0",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[project.urls]
|
|
53
|
+
Homepage = "https://treechain.ai"
|
|
54
|
+
Documentation = "https://api-eu.treechain.ai/docs"
|
|
55
|
+
Repository = "https://github.com/btmaffiliate/glyphjammer-api"
|
|
56
|
+
|
|
57
|
+
[project.scripts]
|
|
58
|
+
treechain = "treechain.env.cli:main"
|
|
59
|
+
|
|
60
|
+
[tool.setuptools.packages.find]
|
|
61
|
+
include = ["treechain*"]
|
|
62
|
+
|
|
63
|
+
[tool.setuptools.package-data]
|
|
64
|
+
"treechain" = ["py.typed"]
|
|
65
|
+
|
|
66
|
+
[tool.black]
|
|
67
|
+
line-length = 100
|
|
68
|
+
target-version = ["py39", "py310", "py311", "py312"]
|
|
69
|
+
|
|
70
|
+
[tool.mypy]
|
|
71
|
+
python_version = "3.9"
|
|
72
|
+
warn_return_any = true
|
|
73
|
+
warn_unused_configs = true
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TreeChain SDK v4.0
|
|
3
|
+
|
|
4
|
+
The Polyglottal Cipher™ - Invisible Encryption
|
|
5
|
+
|
|
6
|
+
SECURITY ARCHITECTURE:
|
|
7
|
+
PRIMARY: ChaCha20-Poly1305 (256-bit)
|
|
8
|
+
DEFENSE-IN-DEPTH: Independent glyph key (256-bit)
|
|
9
|
+
CAMOUFLAGE: 133,387 glyphs across 8 emotions
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
from treechain import GlyphJammer, KeySource, EmotionalState
|
|
13
|
+
|
|
14
|
+
# Create with fresh independent keys (recommended)
|
|
15
|
+
jammer = GlyphJammer.create()
|
|
16
|
+
|
|
17
|
+
# Or from environment variable
|
|
18
|
+
jammer = GlyphJammer.from_master(KeySource.env("MY_KEY"))
|
|
19
|
+
|
|
20
|
+
# Encrypt
|
|
21
|
+
result = jammer.encrypt("Hello!", emotion="joy")
|
|
22
|
+
print(result.glyph_payload) # Looks like multilingual poetry
|
|
23
|
+
|
|
24
|
+
# Decrypt
|
|
25
|
+
plaintext = jammer.decrypt(result.glyph_payload, result.shield_id)
|
|
26
|
+
|
|
27
|
+
Version: 4.0.0
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
__version__ = "4.0.0"
|
|
31
|
+
__author__ = "TreeChain Labs"
|
|
32
|
+
|
|
33
|
+
from treechain.core import (
|
|
34
|
+
# Main encryption
|
|
35
|
+
GlyphJammer,
|
|
36
|
+
TreeChainKeys,
|
|
37
|
+
EncryptionResult,
|
|
38
|
+
generate_independent_keys,
|
|
39
|
+
derive_keys_from_master,
|
|
40
|
+
|
|
41
|
+
# Glyph system
|
|
42
|
+
GlyphRotor,
|
|
43
|
+
GlyphBank,
|
|
44
|
+
EmotionalState,
|
|
45
|
+
get_glyph_bank,
|
|
46
|
+
|
|
47
|
+
# Key management
|
|
48
|
+
KeySource,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
# Version
|
|
53
|
+
"__version__",
|
|
54
|
+
|
|
55
|
+
# Main API
|
|
56
|
+
"GlyphJammer",
|
|
57
|
+
"TreeChainKeys",
|
|
58
|
+
"EncryptionResult",
|
|
59
|
+
"generate_independent_keys",
|
|
60
|
+
"derive_keys_from_master",
|
|
61
|
+
|
|
62
|
+
# Glyph system
|
|
63
|
+
"GlyphRotor",
|
|
64
|
+
"GlyphBank",
|
|
65
|
+
"EmotionalState",
|
|
66
|
+
"get_glyph_bank",
|
|
67
|
+
|
|
68
|
+
# Key management
|
|
69
|
+
"KeySource",
|
|
70
|
+
]
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GlyphArt — Your Secrets as Art
|
|
3
|
+
|
|
4
|
+
Transform encrypted messages into beautiful visual and auditory art.
|
|
5
|
+
Poetry, tattoos, paintings, sigils, and music — all encrypted, all beautiful.
|
|
6
|
+
|
|
7
|
+
Modules:
|
|
8
|
+
GlyphPoetry - Secrets as multilingual verse
|
|
9
|
+
GlyphTattoo - Secrets as tattoo designs
|
|
10
|
+
GlyphCanvas - Secrets as visual art
|
|
11
|
+
GlyphSeal - Personal sigils
|
|
12
|
+
GlyphMusic - Secrets as melodies
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
from glyphart import GlyphPoetry, GlyphTattoo, GlyphCanvas, GlyphSeal, GlyphMusic
|
|
16
|
+
|
|
17
|
+
# Poetry
|
|
18
|
+
poet = GlyphPoetry(key="secret")
|
|
19
|
+
poem = poet.compose("I love you", style="haiku")
|
|
20
|
+
|
|
21
|
+
# Tattoo
|
|
22
|
+
artist = GlyphTattoo(key="secret")
|
|
23
|
+
design = artist.design("Never forget", style="runic_band")
|
|
24
|
+
design.save("tattoo.svg")
|
|
25
|
+
|
|
26
|
+
# Canvas
|
|
27
|
+
canvas = GlyphCanvas(key="secret")
|
|
28
|
+
art = canvas.paint("Revolution", style="mandala")
|
|
29
|
+
art.save("revolution.svg")
|
|
30
|
+
|
|
31
|
+
# Seal
|
|
32
|
+
forge = GlyphSeal(key="secret")
|
|
33
|
+
seal = forge.create("Brandon Myers", style="royal")
|
|
34
|
+
seal.save("seal.svg")
|
|
35
|
+
|
|
36
|
+
# Music
|
|
37
|
+
composer = GlyphMusic(key="secret")
|
|
38
|
+
melody = composer.compose("Secret melody", style="lullaby")
|
|
39
|
+
print(melody.to_abc())
|
|
40
|
+
|
|
41
|
+
License: AGPL-3.0
|
|
42
|
+
Copyright (c) 2025 TreeChain Labs
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
__version__ = "1.0.0"
|
|
46
|
+
__author__ = "Bran (Brandon) Myers"
|
|
47
|
+
__license__ = "AGPL-3.0"
|
|
48
|
+
|
|
49
|
+
from .poetry import GlyphPoetry, Poem, PoetryStyle
|
|
50
|
+
from .tattoo import GlyphTattoo, TattooDesign, TattooStyle
|
|
51
|
+
from .canvas import GlyphCanvas, Artwork, ArtStyle
|
|
52
|
+
from .seal import GlyphSeal, Seal, SealStyle
|
|
53
|
+
from .music import GlyphMusic, Melody, Note, MusicStyle
|
|
54
|
+
|
|
55
|
+
__all__ = [
|
|
56
|
+
# Version
|
|
57
|
+
"__version__",
|
|
58
|
+
|
|
59
|
+
# Poetry
|
|
60
|
+
"GlyphPoetry",
|
|
61
|
+
"Poem",
|
|
62
|
+
"PoetryStyle",
|
|
63
|
+
|
|
64
|
+
# Tattoo
|
|
65
|
+
"GlyphTattoo",
|
|
66
|
+
"TattooDesign",
|
|
67
|
+
"TattooStyle",
|
|
68
|
+
|
|
69
|
+
# Canvas
|
|
70
|
+
"GlyphCanvas",
|
|
71
|
+
"Artwork",
|
|
72
|
+
"ArtStyle",
|
|
73
|
+
|
|
74
|
+
# Seal
|
|
75
|
+
"GlyphSeal",
|
|
76
|
+
"Seal",
|
|
77
|
+
"SealStyle",
|
|
78
|
+
|
|
79
|
+
# Music
|
|
80
|
+
"GlyphMusic",
|
|
81
|
+
"Melody",
|
|
82
|
+
"Note",
|
|
83
|
+
"MusicStyle",
|
|
84
|
+
]
|