Skip to content

Commit 8fc37cf

Browse files
author
Spyros Lefkaditis
committed
Enhance documentation for JOSS submission
- Improve README.md with comprehensive installation instructions - Add detailed usage examples including ./init.sh script - Document config.py and fibrohash_config.json configuration - Add advanced API usage examples and research applications - Remove outdated Fibonacci references from paper.md - Update technical descriptions for current implementation - Prepare for JOSS v1.0.1 submission
1 parent a4ede7f commit 8fc37cf

File tree

3 files changed

+160
-15
lines changed

3 files changed

+160
-15
lines changed

README.md

Lines changed: 158 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Security Audit](https://img.shields.io/badge/security-audited-green.svg)](https://github.com/SpyrosLefkaditis/fibrohash)
99
[![JOSS Status](https://img.shields.io/badge/JOSS-under%20review-orange.svg)](https://joss.theoj.org/)
1010

11-
FibroHash is a research-focused, cryptographically secure password generation framework designed for system administrators and security professionals. It implements a novel multi-layered approach combining PBKDF2 key derivation, HMAC-based entropy generation, and Fibonacci-inspired algorithms to produce passwords with guaranteed entropy levels exceeding 190 bits.
11+
FibroHash is a research-focused, cryptographically secure password generation framework designed for system administrators and security professionals. It implements a novel multi-layered cryptographic approach combining PBKDF2 key derivation, HMAC-based entropy generation, and mathematical sequence algorithms to produce passwords with guaranteed entropy levels exceeding 190 bits.
1212

1313
## Research Applications
1414

@@ -33,14 +33,14 @@ FibroHash implements a novel multi-stage cryptographic pipeline:
3333
```
3434
User Input → Validation → PBKDF2-HMAC-SHA256 → Multi-Round Generation
3535
36-
Secure Password ← Character Encoding ← Entropy Mixing ← HMAC-Fibonacci
36+
Secure Password ← Character Encoding ← Entropy Mixing ← HMAC-Based Generation
3737
```
3838

3939
### Core Algorithm
4040

4141
1. **Input Sanitization**: Validates and sanitizes user input to prevent injection attacks
4242
2. **Key Derivation**: PBKDF2-HMAC-SHA256 with configurable iterations (1K-10K)
43-
3. **Entropy Generation**: HMAC-based Fibonacci sequence generation with cryptographic salts
43+
3. **Entropy Generation**: HMAC-based mathematical sequence generation with cryptographic salts
4444
4. **Multi-Round Processing**: Multiple generation rounds with independent entropy sources
4545
5. **Quality Assurance**: Automated validation of entropy levels and character diversity
4646

@@ -60,86 +60,231 @@ Secure Password ← Character Encoding ← Entropy Mixing ← HMAC-Fibonacci
6060

6161
## Installation
6262

63-
### Quick Setup
63+
### Quick Start (Recommended)
6464

6565
```bash
66+
# Clone the repository
6667
git clone https://github.com/SpyrosLefkaditis/fibrohash.git
6768
cd fibrohash
68-
python3 setup.py install # or pip install -e .
69+
70+
# Run the initialization script (includes setup and configuration)
71+
./init.sh
6972
```
7073

71-
### Development Installation
74+
### Manual Installation
7275

7376
```bash
77+
# Clone the repository
7478
git clone https://github.com/SpyrosLefkaditis/fibrohash.git
7579
cd fibrohash
80+
81+
# Install using pip (editable/development mode)
7682
python3 -m pip install -e .
83+
84+
# Or using setup.py
85+
python3 setup.py install
86+
```
87+
88+
### Requirements
89+
90+
- **Python 3.7+** (uses standard library only)
91+
- **No external dependencies** (zero pip requirements for maximum security)
92+
- **Platform**: Cross-platform (Linux, macOS, Windows)
93+
- **Memory**: <5MB footprint
94+
- **Storage**: ~2MB for complete installation
95+
96+
### Verification
97+
98+
```bash
99+
# Test the installation
100+
python3 test.py
101+
102+
# Quick functionality check
103+
python3 -c "from main import generate_password; print('Installation successful!')"
77104
```
78105

79106
## Usage
80107

108+
### Quick Start Script
109+
110+
```bash
111+
# Interactive password generation with guided setup
112+
./init.sh
113+
114+
# The init.sh script provides:
115+
# - Interactive password generation
116+
# - Security level selection
117+
# - Configuration validation
118+
# - Usage examples and help
119+
```
120+
81121
### Command Line Interface
82122

83123
```bash
84-
# Interactive mode
124+
# Interactive mode (if available)
85125
python3 -m fibrohash
86126

87-
# Direct generation
127+
# Direct generation - basic usage
88128
python3 -c "from main import generate_password; print(generate_password('research phrase'))"
129+
130+
# Direct generation - with parameters
131+
python3 -c "from main import generate_password; print(generate_password('secure phrase', 32, 'maximum'))"
132+
133+
# Using the test/demo script
134+
python3 test.py # Includes examples and security validation
89135
```
90136

91137
### Programmatic API
92138

93139
```python
94140
from main import generate_password
95141
from security_utils import generate_security_report
142+
from config import update_security_level
96143

97144
# Basic password generation
98145
password = generate_password("secure research phrase", 32, "maximum")
99146

100-
# Security analysis
147+
# Generate with custom configuration
148+
update_security_level("maximum")
149+
password = generate_password("enterprise phrase", 48, "maximum")
150+
151+
# Security analysis and reporting
101152
report = generate_security_report(password)
102153
print(f"Entropy: {report['audit_results']['entropy_analysis']['theoretical_entropy']} bits")
154+
print(f"Security Score: {report['audit_results']['security_score']}/100")
155+
```
156+
157+
### Advanced Usage Examples
158+
159+
```python
160+
from security_utils import SecurityAuditor, SecurePasswordValidator
161+
from main import generate_password
162+
163+
# Batch password generation with analysis
164+
passwords = []
165+
for i in range(10):
166+
pwd = generate_password(f"batch-phrase-{i}", 32, "high")
167+
passwords.append(pwd)
168+
169+
# Comprehensive security audit
170+
auditor = SecurityAuditor()
171+
validator = SecurePasswordValidator()
172+
173+
for pwd in passwords:
174+
# Security audit
175+
audit_results = auditor.audit_password_quality(pwd)
176+
177+
# Compliance validation
178+
is_valid, violations = validator.validate(pwd)
179+
180+
print(f"Password: {pwd[:8]}... | Entropy: {audit_results['entropy_analysis']['theoretical_entropy']:.1f} bits | Valid: {is_valid}")
103181
```
104182

105183
### Research Applications
106184

107185
```python
108186
from security_utils import SecurityAuditor
187+
from test import calculate_theoretical_entropy, calculate_actual_entropy
109188

110-
# Comprehensive entropy analysis
189+
# Comprehensive entropy analysis for research
111190
auditor = SecurityAuditor()
112191
results = auditor.audit_password_quality(password)
113192

114193
# Character distribution analysis
115194
char_analysis = results['character_analysis']
116195
print(f"Character diversity: {char_analysis['diversity_score']}/100")
196+
197+
# Theoretical vs actual entropy comparison
198+
theoretical = calculate_theoretical_entropy(password)
199+
actual = calculate_actual_entropy(password)
200+
print(f"Theoretical: {theoretical:.2f} bits, Actual: {actual:.2f} bits")
201+
```
202+
203+
### Script-Based Usage
204+
205+
```bash
206+
# Run the initialization script for guided usage
207+
./init.sh
208+
209+
# Available options in init.sh:
210+
# 1. Interactive password generation
211+
# 2. Batch generation
212+
# 3. Security analysis
213+
# 4. Configuration management
214+
# 5. Help and examples
215+
216+
# Direct execution with parameters
217+
python3 main.py --phrase "secure phrase" --length 32 --level maximum
117218
```
118219

119220

120221

121222

122223
## Configuration
123224

124-
FibroHash uses `fibrohash_config.json` for security parameter configuration:
225+
### Configuration Files
226+
227+
FibroHash provides multiple configuration options:
228+
229+
#### 1. JSON Configuration (`fibrohash_config.json`)
125230

126231
```json
127232
{
128233
"security": {
129234
"min_password_length": 8,
130235
"max_password_length": 128,
131-
"default_security_level": "high"
236+
"default_security_level": "high",
237+
"enforce_character_diversity": true,
238+
"min_entropy_threshold": 190
132239
},
133240
"cryptography": {
134241
"pbkdf2_iterations": {
135242
"standard": 1000,
136243
"high": 5000,
137244
"maximum": 10000
138-
}
245+
},
246+
"salt_length": 32,
247+
"key_length": 64
248+
},
249+
"output": {
250+
"include_entropy_analysis": true,
251+
"show_security_score": true,
252+
"verbose_logging": false
139253
}
140254
}
141255
```
142256

257+
#### 2. Python Configuration (`config.py`)
258+
259+
```python
260+
# Modify config.py to adjust runtime parameters
261+
from config import update_security_level, get_configuration
262+
263+
# Programmatically update configuration
264+
update_security_level("maximum")
265+
current_config = get_configuration()
266+
267+
# Custom configuration for specific use cases
268+
config = {
269+
"pbkdf2_iterations": 15000, # Custom high-security setting
270+
"password_length": 48, # Extended length
271+
"security_level": "custom"
272+
}
273+
```
274+
275+
### Configuration Management
276+
277+
```bash
278+
# View current configuration
279+
python3 -c "from config import get_configuration; print(get_configuration())"
280+
281+
# Validate configuration
282+
python3 -c "from config import validate_config; validate_config()"
283+
284+
# Reset to defaults
285+
python3 -c "from config import reset_to_defaults; reset_to_defaults()"
286+
```
287+
143288
### Security Levels
144289

145290
| Level | PBKDF2 Iterations | Key Size | Entropy | Research Use |
40.8 KB
Binary file not shown.

paper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bibliography: paper.bib
2222

2323
# Summary
2424

25-
FibroHash is an enterprise-grade, cryptographically secure password generation framework designed specifically for system administrators and security professionals. Unlike traditional password generators that rely on simple randomization, FibroHash implements a novel multi-layered cryptographic approach combining PBKDF2 key derivation, HMAC-based entropy generation, and Fibonacci-inspired algorithmic patterns to produce passwords with guaranteed entropy levels exceeding 190 bits.
25+
FibroHash is an enterprise-grade, cryptographically secure password generation framework designed specifically for system administrators and security professionals. Unlike traditional password generators that rely on simple randomization, FibroHash implements a novel multi-layered cryptographic approach combining PBKDF2 key derivation, HMAC-based entropy generation, and mathematical sequence algorithms to produce passwords with guaranteed entropy levels exceeding 190 bits.
2626

2727
The framework addresses critical security gaps in existing password generation tools by implementing proper cryptographic salt handling, resistance to timing attacks, and compliance with modern security standards including NIST SP 800-63B [@nist2017digital], PCI DSS, and ISO/IEC 27001. FibroHash operates entirely offline using only Python's standard library, ensuring no external dependencies or network communications that could compromise security.
2828

@@ -41,7 +41,7 @@ The framework has been designed with system administrators in mind, providing bo
4141

4242
# Research Contribution and Methodology
4343

44-
FibroHash introduces an approach to password generation that combines mathematical sequence generation with modern cryptographic primitives [@nist2017digital]. The key contribution lies in the use of HMAC-based Fibonacci-inspired number generation, which provides the benefits of mathematical predictability for testing while maintaining cryptographic security through proper PBKDF2 key derivation.
44+
FibroHash introduces an approach to password generation that combines mathematical sequence generation with modern cryptographic primitives [@nist2017digital]. The key contribution lies in the use of HMAC-based mathematical sequence generation, which provides the benefits of deterministic testing capabilities while maintaining cryptographic security through proper PBKDF2 key derivation.
4545

4646
## Cryptographic Architecture
4747

0 commit comments

Comments
 (0)