Add audio steganography with LSB and spread spectrum modes
Implement two audio embedding modes following the same multi-factor authentication pipeline as image steganography (passphrase + PIN + optional RSA key + optional channel key): - audio_lsb: High-capacity LSB embedding in PCM samples for lossless formats (WAV/FLAC). Uses ChaCha20-keyed sample index selection. - audio_spread: Direct-sequence spread spectrum (DSSS) with ChaCha20- keyed bipolar chip codes, Reed-Solomon error correction, and 3-copy majority-voted length headers. Designed to survive lossy compression. New files: - audio_steganography.py: LSB embed/extract on PCM samples - spread_steganography.py: Spread spectrum embed/extract - audio_utils.py: Format detection, transcoding, validation helpers - tests/test_audio.py: 22 tests covering both modes end-to-end Updated encode.py, decode.py, cli.py (audio-encode/audio-decode commands), constants.py, models.py, exceptions.py, validation.py, __init__.py, and pyproject.toml ([audio] extra). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,13 @@ dct = [
|
||||
"jpeglib>=1.0.0",
|
||||
"reedsolo>=1.7.0",
|
||||
]
|
||||
audio = [
|
||||
"pydub>=0.25.0",
|
||||
"numpy>=2.0.0",
|
||||
"scipy>=1.10.0",
|
||||
"soundfile>=0.12.0",
|
||||
"reedsolo>=1.7.0",
|
||||
]
|
||||
cli = [
|
||||
"click>=8.0.0",
|
||||
"qrcode>=7.30",
|
||||
@@ -86,7 +93,7 @@ api = [
|
||||
"reedsolo>=1.7.0",
|
||||
]
|
||||
all = [
|
||||
"stegasoo[cli,web,api,dct,compression]",
|
||||
"stegasoo[cli,web,api,dct,audio,compression]",
|
||||
]
|
||||
dev = [
|
||||
"stegasoo[all]",
|
||||
@@ -141,6 +148,8 @@ ignore = ["E501"]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# YCbCr colorspace variables (R, G, B, Y, Cb, Cr) are standard names
|
||||
"src/stegasoo/dct_steganography.py" = ["N803", "N806"]
|
||||
# MDCT transform variables (N, X) are standard mathematical names
|
||||
"src/stegasoo/spread_steganography.py" = ["N803", "N806"]
|
||||
# Package __init__.py has imports after try/except and aliases - intentional structure
|
||||
"src/stegasoo/__init__.py" = ["E402"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user