Bump version to 4.0.1 with Web UI improvements

- Update version to 4.0.1 across constants.py, __init__.py, pyproject.toml, README
- Refactor channel key UI from radio buttons to select dropdown
- Add LED indicator and key capsule CSS styles
- Reorganize encode/decode forms: RSA key section moved up, PIN + Channel in row
- Streamline channel key JavaScript for dropdown-based selection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Aaron D. Lee
2026-01-02 16:43:25 -05:00
parent 6fa4b447db
commit d94ee7be90
12 changed files with 477 additions and 307 deletions

View File

@@ -1,5 +1,5 @@
"""
Stegasoo - Secure Steganography with Multi-Factor Authentication (v4.0.0)
Stegasoo - Secure Steganography with Multi-Factor Authentication (v4.0.1)
Changes in v4.0.0:
- Added channel key support for deployment/group isolation
@@ -7,11 +7,11 @@ Changes in v4.0.0:
- encode() and decode() now accept channel_key parameter
"""
__version__ = "4.0.0"
__version__ = "4.0.1"
# Core functionality
from .encode import encode
from .decode import decode, decode_file
from .decode import decode, decode_file, decode_text
# Credential generation
from .generate import (
@@ -153,11 +153,12 @@ DCT_BYTES_PER_PIXEL = 0.125
__all__ = [
# Version
"__version__",
# Core
"encode",
"decode",
"decode_file",
"decode_text",
# Generation
"generate_pin",

View File

@@ -1,5 +1,5 @@
"""
Stegasoo Constants and Configuration (v4.0.0 - Channel Key Support)
Stegasoo Constants and Configuration (v4.0.1 - Channel Key Support)
Central location for all magic numbers, limits, and crypto parameters.
All version numbers, limits, and configuration values should be defined here.
@@ -21,7 +21,7 @@ from pathlib import Path
# VERSION
# ============================================================================
__version__ = "4.0.0"
__version__ = "4.0.1"
# ============================================================================
# FILE FORMAT

View File

@@ -624,12 +624,15 @@ def get_active_channel_key() -> Optional[str]:
return get_channel_key()
def get_channel_fingerprint() -> Optional[str]:
def get_channel_fingerprint(key: Optional[str] = None) -> Optional[str]:
"""
Get a display-safe fingerprint of the configured channel key.
Get a display-safe fingerprint of a channel key.
Args:
key: Channel key (if None, uses configured key)
Returns:
Masked key like "ABCD-••••-••••-••••-••••-••••-••••-3456" or None
"""
from .channel import get_channel_fingerprint as _get_fingerprint
return _get_fingerprint()
return _get_fingerprint(key)

View File

@@ -56,23 +56,24 @@ EXT_TO_FORMAT = {
}
# =============================================================================
# OVERHEAD CONSTANTS (v3.2.0 - Updated for date-independent format)
# OVERHEAD CONSTANTS (v4.0.0 - Updated for channel key support)
# =============================================================================
# v3.2.0 Header format (no date field):
# v4.0.0 Header format (with flags byte for channel key indicator):
# Magic: 4 bytes (\x89ST3)
# Version: 1 byte (4 for v3.2.0)
# Version: 1 byte (5 for v4.0.0)
# Flags: 1 byte (bit 0 = has channel key)
# Salt: 32 bytes
# IV: 12 bytes
# Tag: 16 bytes
# -----------------
# Total: 65 bytes
# Total: 66 bytes
#
# Previous v3.1.0 had date field (10 bytes + 1 byte length) = 76 bytes header
# The old value of 104 was incorrect even for v3.1.0
# v3.2.0 had 65 bytes (no flags byte)
# v3.1.0 had date field (10 bytes + 1 byte length) = 76 bytes header
HEADER_OVERHEAD = 65 # v3.2.0: Magic + version + salt + iv + tag
HEADER_OVERHEAD = 66 # v4.0.0: Magic + version + flags + salt + iv + tag
LENGTH_PREFIX = 4 # 4 bytes for payload length in LSB embedding
ENCRYPTION_OVERHEAD = HEADER_OVERHEAD + LENGTH_PREFIX # 69 bytes total
ENCRYPTION_OVERHEAD = HEADER_OVERHEAD + LENGTH_PREFIX # 70 bytes total
# DCT output format options (v3.0.1)
DCT_OUTPUT_PNG = 'png'