Repository navigation
Expand file tree
/
Copy pathstrhide.sample.toml
More file actions
281 lines (257 loc) · 11.3 KB
/
Copy pathstrhide.sample.toml
File metadata and controls
281 lines (257 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# ==============================================================================
# strhide - Sample Configuration File
# ==============================================================================
# This is an annotated configuration template for strhide: a smart,
# format-preserving, lossless data hiding tool.
#
# HOW TO USE THIS FILE:
# ---------------------
# 1. Executable-adjacent configuration:
# Place this file as `strhide.toml` (or `config.toml`) in the directory
# next to the `strhide` binary.
#
# 2. User-level configuration:
# Copy this file to your user configuration directory:
# - Linux / macOS: ~/.config/strhide/config.toml (or ~/.strhide/config.toml)
# - Windows: %APPDATA%\strhide\config.toml (or %USERPROFILE%\.strhide\config.toml)
#
# 3. System-wide configuration:
# Copy this file to the system configuration directory:
# - Linux / macOS: /etc/strhide/config.toml
# - Windows: %ProgramData%\strhide\config.toml
#
# Note: Current working directory (CWD) is intentionally NOT searched.
#
# 4. Explicit path:
# Specify any configuration file on the command line using -c or --config:
# strhide -c /path/to/custom-config.toml write carrier.png -t "secret"
#
# CONFIGURATION PRECEDENCE (Highest to Lowest):
# ---------------------------------------------
# 1. Explicit CLI arguments & flags (e.g. -p, -s, --no-backup, --stealth)
# 2. Environment variables (STRHIDE_PASSWORD, STRHIDE_TEXT)
# 3. Configuration file (CLI -c/--config > exe dir > user config > system config)
# 4. Built-in application defaults
#
# NOTE ON CREDENTIALS:
# Configuration files do NOT support storing passwords or password file paths.
# Passwords must be provided via -p, --password-file, STRHIDE_PASSWORD, or
# interactive terminal prompts.
#
# FORMAT RULES:
# -------------
# - All keys are OPTIONAL. Unset or commented-out keys use built-in defaults.
# - Keys are flat at the top level, except for one optional `[stego]` table
# (section 12) which groups the content-domain defaults.
# - Unrecognized keys will trigger a warning:
# [WARNING] Unknown key '...' in config file '...' (ignored).
# ==============================================================================
# ------------------------------------------------------------------------------
# 1. Hiding Strategy
# ------------------------------------------------------------------------------
# Default hiding strategy for the `write` command.
#
# Options:
# "auto" - (Default) Automatically selects the cleanest, least detectable,
# and format-compliant strategy based on payload size and carrier.
# "ask" - Prompt interactively to choose among supported strategies
# (single carrier only; incompatible with multiple batch carriers).
# "<name>"- Explicit strategy name. Examples:
# PNG: "chunk" (IDAT/ancillary chunk injection), "eof" (appended)
# JPEG: "app_segment" (APP marker segment), "eof"
# WebP: "riff_chunk", "eof"
# HEIF: "box_uuid", "eof"
# MP4: "box_uuid", "eof"
# WAV: "riff_chunk", "eof"
# ZIP: "pre_cd_inject" (central directory injection), "eof"
# PDF: "incremental" (revision update), "eof"
# PE: "pe_codebits" (code padding/slack), "pe_slack", "pe_overlay", "eof"
# MKV: "ebml_void", "eof"
#
# Run `strhide list` to see all supported strategies and their static limits.
# Run `strhide inspect <carrier>` to see capacity limits for a specific file.
#
# strategy = "auto"
# ------------------------------------------------------------------------------
# 2. Backup Creation
# ------------------------------------------------------------------------------
# Controls whether a backup file (<carrier>.bak) is created when modifying
# a carrier file in place with `--in-place`. (Note: when writing to default
# <carrier>-out.<ext> or an output path, the original carrier is untouched and
# no .bak is created).
#
# Applies to: `write`, `restore` (with `--in-place`)
# Type: boolean (true | false)
# Default: true
# CLI override: --no-backup
#
# Setting this to false disables creating .bak files when carriers are modified in place.
#
# backup = true
# ------------------------------------------------------------------------------
# 3. Timestamp Preservation
# ------------------------------------------------------------------------------
# Controls whether original carrier file modification timestamps (mtime)
# are preserved when writing payloads.
#
# Applies to: `write`
# Type: boolean (true | false)
# Default: true
# CLI override: --no-preserve-time
#
# Preserving timestamps helps prevent basic forensic detection based on file
# modification time changes.
#
# preserve_time = true
# ------------------------------------------------------------------------------
# 4. Interactive Encryption Prompt
# ------------------------------------------------------------------------------
# Determines whether strhide prompts for a password when writing a carrier
# without any password supplied.
#
# Applies to: `write`
# Type: boolean (true | false)
# Default: false
# CLI override: -e, --encrypt
#
# NOTE ON ENCRYPTION:
# In strhide, every payload envelope is Deflate-compressed and AES-256-GCM
# encrypted on disk. When no password is provided, a built-in key mask is used
# so carriers never leak plaintext payloads, hashes, or filenames.
# Setting `encrypt = true` treats lack of a password as an interactive prompt
# request, asking for password confirmation on interactive terminals (TTY).
#
# encrypt = false
# ------------------------------------------------------------------------------
# 5. Stealth Mode
# ------------------------------------------------------------------------------
# Enables stealth mode by default.
#
# Applies to: `write`
# Type: boolean (true | false)
# Default: false
# CLI override: --stealth
#
# In stealth mode, all static envelope signatures and structural markers are
# replaced with values derived from the encryption password via PBKDF2/HKDF.
# A file hidden in stealth mode cannot be detected as containing a strhide
# envelope without knowledge of the password.
#
# REQUIREMENTS:
# - Stealth mode REQUIRES a password (via -p, --password-file,
# or STRHIDE_PASSWORD).
# - Stealth mode is INCOMPATIBLE with a password hint (`hint`).
#
# stealth = false
# ------------------------------------------------------------------------------
# 6. Passwords and Credentials (NOT SUPPORTED IN CONFIG)
# ------------------------------------------------------------------------------
# Hardcoded passwords (`password`) and password files (`password_file`) are NOT
# supported in configuration files to prevent credential leakage on disk.
# Supply credentials via:
# - Command line flag: -p <PASSWORD> or --password-file <FILE>
# - Environment variable: STRHIDE_PASSWORD
# - Interactive prompt: -e, --encrypt
# ------------------------------------------------------------------------------
# 7. Password Hint
# ------------------------------------------------------------------------------
# Default hint stored alongside the encrypted envelope.
#
# Applies to: `write`
# Type: string (maximum length: 1024 bytes)
# Default: not set (None)
# CLI override: -H <TEXT>, --hint <TEXT>
#
# The hint is stored in cleartext inside the envelope header and is displayed
# to whoever tries to read or extract the payload without providing the correct
# password.
#
# NOTE: Incompatible with `stealth = true`. If stealth mode is enabled, the hint
# is automatically suppressed.
#
# hint = "Personal vault - usual phrase with exclamation mark"
# ------------------------------------------------------------------------------
# 8. Escape Sequence Decoding
# ------------------------------------------------------------------------------
# Controls whether C-style escape sequences are decoded in -t/--text payloads.
#
# Applies to: `write`, `embed`
# Type: boolean (true | false)
# Default: false
# CLI override: --unescape
#
# When enabled, escape sequences such as:
# \n (newline), \r (carriage return), \t (tab),
# \xHH (hex byte), \uXXXX / \u{XXXXXX} (Unicode code points)
# in `-t/--text` strings will be decoded before embedding. Unrecognized or
# malformed escape sequences are left unchanged.
#
# unescape = false
# ------------------------------------------------------------------------------
# 9. Stego Private Dialect (REMOVED FROM THE CLI/CONFIG SURFACE)
# ------------------------------------------------------------------------------
# `stego_secret` and `stego_domain` are no longer recognized keys. A no-password
# `embed` uses the public built-in constant, and `extract` needs nothing but the
# password (if one was used) — the carrier is self-describing about everything
# else. A private no-password dialect (custom secret, HKDF domain, wire-format
# identity) is compile-time territory: bind a library `Dialect` (see
# `StegoProfile::with_default_secret` / `with_stego_domain`) in a custom build.
# Leftover keys in an old config file are reported as unknown and ignored.
# ------------------------------------------------------------------------------
# 10. Interface Language
# ------------------------------------------------------------------------------
# User interface language for CLI help, status reports, and diagnostics.
#
# Applies to: all commands
# Type: string ("en" | "zh")
# Default: auto-detect from environment (STRHIDE_LANG/LANG) or system OS locale
# CLI override: --lang <en|zh>
# Env override: STRHIDE_LANG
#
# lang = "zh"
# ------------------------------------------------------------------------------
# 11. Content-Domain Defaults (`[stego]` table)
# ------------------------------------------------------------------------------
# Defaults for `embed` and `capacity`. These mirror exactly three flags —
# --safety, --enforce-safety, --algorithm — because those are the knobs a
# deployment wants to pin once instead of repeating on every command line.
# Per-format tuning parameters (--p1-window, --neighbor-weight, ...) stay
# flag-only: they are experimentation knobs, not policy.
#
# An explicit CLI flag always wins over the configured default.
#
# [stego]
# safety = "high" # paranoid | high | balanced
# enforce_safety = false # true = refuse payloads above the tier instead of warning
# algorithm = "auto" # auto | hill | suniw | uerd | juniward | ...
# ==============================================================================
# COMMON CONFIGURATION PROFILES (Examples)
# ==============================================================================
# Below are ready-to-use profiles for different scenarios. Uncomment the lines
# in the profile that fits your workflow.
#
# Profile A: High Stealth & Security
# ----------------------------------
# Maximum deniability, derived stealth signatures.
# Supply password via: STRHIDE_PASSWORD env var or CLI -p / --password-file.
#
# stealth = true
# preserve_time = true
# backup = true
#
# Profile B: CI/CD & Automated Scripting
# ---------------------------------------
# Non-interactive, no backup file clutter, C-style escapes decoded:
#
# strategy = "auto"
# backup = false
# unescape = true
#
# Profile C: General Personal Vault
# ----------------------------------
# Safe defaults, auto backup, helpful hint for recovery:
#
# backup = true
# preserve_time = true
# hint = "Remember: childhood pet name + birthday year"
# ==============================================================================