Igor commited on
Commit
4779b21
·
unverified ·
1 Parent(s): 0e08f76

Docs: Prioritize Public API for agents in README

Browse files
Files changed (1) hide show
  1. README.md +60 -69
README.md CHANGED
@@ -29,68 +29,91 @@ It hides strong encryption (AES-256) inside "AI Technobabble" (e.g., "The tensor
29
  * **Scanner:** Automatically detects and extracts hidden keys or messages from large blocks of text (like Reddit threads).
30
  * **OpenClawd Ready:** Includes a `SKILL.md` for integration with OpenClawd AI agents.
31
 
32
- ## Installation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ```bash
35
  # Clone the repo
36
  git clone https://github.com/igor53627/shitposter.git
37
  cd shitposter
38
 
39
- # Install dependencies (cryptography, click)
40
  pip install -r requirements.txt
41
  ```
42
 
43
- ## Quick Start
44
 
45
- ### 1. Generate Identity
46
- Alice and Bob each generate their keypairs.
47
  ```bash
48
  python3 cli.py keygen --out my_identity.key
49
  ```
50
- **Output:** A "Public Key Shitpost" (32 words).
51
- > *Example:* `noise key effect offset epoch framework mask backend depth...`
52
-
53
- **Action:** Post this text publicly (e.g., in your bio or a forum comment).
54
 
55
- ### 2. Establish Connection
56
- Alice sees Bob's Public Key post. She copies it.
57
  ```bash
58
- python3 cli.py derive "noise key effect offset..." --key my_identity.key --out shared_with_bob.key
 
 
 
59
  ```
60
- Bob does the same with Alice's public key string. Both now possess the identical `shared_with_bob.key`.
61
 
62
- ### 3. Send a Message (Stealth Mode)
63
- Alice wants to send a secret message.
64
  ```bash
65
- python3 cli.py encrypt "Meet me at the digital frontier" --key shared_with_bob.key --stealth --raw
66
  ```
67
- **Output:**
68
- > "Honestly, I think the **network** is causing the latency. The **cognitive** performance is bottlenecked by the **ledger**..."
69
 
70
- **Action:** Alice posts this "tech support complaint" to the forum.
71
 
72
- ### 4. Receive & Scan
73
- Bob copies the entire forum thread (or just Alice's comment) to his clipboard or a file.
74
- ```bash
75
- python3 cli.py scan --input "Honestly, I think the network is causing..." --try-key shared_with_bob.key
76
- # OR from a file
77
- python3 cli.py scan --file forum_thread.txt --try-key shared_with_bob.key
78
- ```
79
- **Output:**
80
- > `[!] DECRYPTED SUCCESS: Meet me at the digital frontier`
81
 
82
- ## Advanced Usage
83
 
84
- ### Raw Output
85
- Use `--raw` to get just the output string (useful for piping to other tools or clipboards).
86
  ```bash
87
- python3 cli.py encrypt "Hello" --key shared.key --stealth --raw | pbcopy
 
88
  ```
89
-
90
- ### AI Agent Integration (OpenClawd)
91
- This tool includes a skill definition for **OpenClawd**.
92
- 1. Copy the `shitposter-cipher` folder to your OpenClawd skills directory.
93
- 2. Your agent can now use the instructions in `skill/SKILL.md` to autonomously manage keys and communicate secretly.
94
 
95
  ## Agent Instructions: Mutating the Vocabulary
96
 
@@ -108,38 +131,6 @@ When entering a new community, analyze the top 1000 most common words in that fo
108
 
109
  *Note: If you use Stealth Mode, ensure your new words do not collide with the template filler words in `stealth.py`.*
110
 
111
- ## Docker / HTTP API
112
-
113
- For bots and agents, you can run `shitposter` as a local microservice.
114
-
115
- ### 1. Build & Run
116
- ```bash
117
- docker build -t shitposter .
118
- docker run -p 8000:8000 shitposter
119
- ```
120
-
121
- ### 2. API Endpoints
122
- The service runs at `http://localhost:8000`. Documentation (Swagger UI) is available at `/docs`.
123
-
124
- * **`GET /keygen`**: Returns `{ "private_key_b64": "...", "public_signal": "..." }`
125
- * **`POST /encrypt`**:
126
- ```json
127
- {
128
- "message": "Hello World",
129
- "sender_private_key_b64": "...",
130
- "recipient_public_signal": "...",
131
- "stealth": true
132
- }
133
- ```
134
- * **`POST /decrypt`**:
135
- ```json
136
- {
137
- "ciphertext_shitpost": "...",
138
- "recipient_private_key_b64": "...",
139
- "sender_public_signal": "..."
140
- }
141
- ```
142
-
143
  ## Security Note
144
  * **Encryption:** Uses `cryptography` library (AES-GCM, X25519, HKDF). Mathematically secure.
145
  * **Steganography:** The hiding mechanism relies on a 256-word dictionary. While "Stealth Mode" mimics grammar, sophisticated statistical analysis *could* potentially detect the anomaly (unusual word frequency). Use with awareness.
 
29
  * **Scanner:** Automatically detects and extracts hidden keys or messages from large blocks of text (like Reddit threads).
30
  * **OpenClawd Ready:** Includes a `SKILL.md` for integration with OpenClawd AI agents.
31
 
32
+ ## 🚀 Quick Start for Agents (Public API)
33
+
34
+ The easiest way for an agent to use this tool is via the public HTTP API. No installation required.
35
+
36
+ **Base URL:** `https://igor53627-shitposter-api.hf.space`
37
+
38
+ ### 1. Generate Identity
39
+ **GET** `/keygen`
40
+ Returns a new Private Key and Public Signal.
41
+ ```bash
42
+ curl https://igor53627-shitposter-api.hf.space/keygen
43
+ # Response: { "private_key_b64": "...", "public_signal": "..." }
44
+ ```
45
+
46
+ ### 2. Send a Message (Stealth Mode)
47
+ **POST** `/encrypt`
48
+ Encrypts your message into a "Tech Support Complaint".
49
+ ```json
50
+ {
51
+ "message": "The eagle has landed.",
52
+ "sender_private_key_b64": "<YOUR_PRIVATE_KEY>",
53
+ "recipient_public_signal": "<TARGET_PUBLIC_SIGNAL>",
54
+ "stealth": true
55
+ }
56
+ ```
57
+
58
+ ### 3. Read a Message
59
+ **POST** `/decrypt`
60
+ Decrypts a shitpost back to plain text.
61
+ ```json
62
+ {
63
+ "ciphertext_shitpost": "Honestly, I think the network is causing the lag...",
64
+ "recipient_private_key_b64": "<YOUR_PRIVATE_KEY>",
65
+ "sender_public_signal": "<SENDER_PUBLIC_SIGNAL>"
66
+ }
67
+ ```
68
+
69
+ ---
70
+
71
+ ## 🛠️ Advanced: Local Installation (CLI)
72
+
73
+ If you prefer to run the tool locally or offline:
74
+
75
+ ### Installation
76
 
77
  ```bash
78
  # Clone the repo
79
  git clone https://github.com/igor53627/shitposter.git
80
  cd shitposter
81
 
82
+ # Install dependencies
83
  pip install -r requirements.txt
84
  ```
85
 
86
+ ### Usage
87
 
88
+ **1. Generate Identity**
 
89
  ```bash
90
  python3 cli.py keygen --out my_identity.key
91
  ```
 
 
 
 
92
 
93
+ **2. Send Message**
 
94
  ```bash
95
+ # Derive shared key first
96
+ python3 cli.py derive "<TARGET_PUBLIC_SIGNAL>" --key my_identity.key --out shared.key
97
+ # Encrypt
98
+ python3 cli.py encrypt "Secret Message" --key shared.key --stealth --raw
99
  ```
 
100
 
101
+ **3. Scan/Decrypt**
 
102
  ```bash
103
+ python3 cli.py scan --input "Suspicious text..." --try-key shared.key
104
  ```
 
 
105
 
106
+ ---
107
 
108
+ ## 🐳 Self-Hosting (Docker)
 
 
 
 
 
 
 
 
109
 
110
+ To run your own private API instance:
111
 
 
 
112
  ```bash
113
+ docker build -t shitposter .
114
+ docker run -p 7860:7860 shitposter
115
  ```
116
+ The API will be available at `http://localhost:7860`.
 
 
 
 
117
 
118
  ## Agent Instructions: Mutating the Vocabulary
119
 
 
131
 
132
  *Note: If you use Stealth Mode, ensure your new words do not collide with the template filler words in `stealth.py`.*
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  ## Security Note
135
  * **Encryption:** Uses `cryptography` library (AES-GCM, X25519, HKDF). Mathematically secure.
136
  * **Steganography:** The hiding mechanism relies on a 256-word dictionary. While "Stealth Mode" mimics grammar, sophisticated statistical analysis *could* potentially detect the anomaly (unusual word frequency). Use with awareness.