Complete collection of Enigma V300 option key algorithm implementations
This repository contains four complete implementations of the Fluke option key calculator for NetTool and other Fluke network testing devices. All implementations provide the same functionality using different programming paradigms and languages.
Each implementation is standalone and produces identical output. Choose based on your language preference:
Python (Functional):
python python/enigma_v300_functions.py -n 0003333016 4
# Output: Option Key: 5dab ade1 12ddPython (Object-Oriented):
python python/enigma_v300_classes.py -n 0003333016 4
# Output: Option Key: 5dab ade1 12ddC:
cd c
cmake -S . -B build && cmake --build build
./build/enigma_v300_pure_c -n 0003333016 4
# Output: Option Key: 5dab ade1 12ddC++:
cd cpp
cmake -S . -B build && cmake --build build
./build/enigma_v300_pure_cpp -n 0003333016 4
# Output: Option Key: 5dab ade1 12ddThis repository includes 4 standalone implementations of the Enigma V300 algorithms:
| Implementation | Location | Description | Best For |
|---|---|---|---|
| Python Functions | python/enigma_v300_functions.py |
Standalone functional Python script | Functional programming enthusiasts, simple scripts |
| Python Classes | python/enigma_v300_classes.py |
Standalone OOP Python script | OOP enthusiasts, educational purposes |
| C | c/ |
Pure C11 implementation | Embedded systems, portability, performance |
| C++ | cpp/ |
Modern C++20 implementation | High-performance applications, C++ projects |
Standalone script using pure functions (no classes).
Location: python/enigma_v300_functions.py
Usage:
python python/enigma_v300_functions.py -n 0003333016 4Standalone script using object-oriented programming.
Location: python/enigma_v300_classes.py
Usage:
python python/enigma_v300_classes.py -n 0003333016 4Pure C11 implementation for maximum portability and performance.
Location: c/
Build:
cd c
cmake -S . -B build
cmake --build buildUsage:
./build/enigma_v300_pure_c -n 0003333016 4Quick compile:
cd c
gcc -std=c11 src/main.c src/enigma_v300_pure_c.c -o enigma
./enigma -n 0003333016 4See c/README.md for details.
Modern C++20 implementation with namespaces and STL.
Location: cpp/
Build:
cd cpp
cmake -S . -B build
cmake --build buildUsage:
./build/enigma_v300_pure_cpp -n 0003333016 4Quick compile:
cd cpp
g++ -std=c++20 src/enigma_v300_pure_cpp.cpp -o enigma
./enigma -n 0003333016 4See cpp/README.md for details.
All implementations support these commands:
Key Generation:
-n / --nettool SERIAL OPTION- Generate NetTool keys (10-digit serial, numeric option)-e / --encrypt SERIAL OPTION PRODUCT- Create keys for other products (7-digit serial, 3-digit option, product code)-l / --linkrunner SERIAL OPTION- Generate LinkRunner Pro keys (7-digit serial, option)
Key Validation:
-x / --check-nettool KEY SERIAL- Validate a NetTool key-d / --decrypt KEY- Decode a key and print the embedded serial/option/product information
Utility:
-h / --help / -?- Display help information-V / --version- Display version information--list-products- List all known product codes--list-options CODE- List available options for a product code
Python-only options:
--verbose- Enable debug logging--logfile FILE- Log to file (rotates at 10MB)
- 3001 - NetTool Series II
- 7001 - LinkRunner Pro Duo
- 6963 - EtherScope/MetroScope
- 6964 - OneTouch AT
- 2186 - OptiView XG
- 1890 - ClearSight Analyzer
- 1895 - iClearSight Analyzer
All implementations produce identical outputs for these test cases:
NetTool (Serial: 0003333016, Option: 4):
Expected: 5dab ade1 12dd
EtherScope/MetroScope (Serial: 0000607, Option: 7, Product: 6963):
Expected: 6406 2579 4859 7747
All 4 implementations are automatically tested on every push using GitHub Actions. The CI workflow:
- Tests each implementation independently
- Verifies all implementations produce identical output
- Runs C implementation unit tests
- Validates both test cases (NetTool and EtherScope)
Python implementations:
# Run pytest suite
pytest tests/test_enigma_v300.py -v
# Test Python Functions directly
python python/enigma_v300_functions.py -n 0003333016 4
# Test Python Classes directly
python python/enigma_v300_classes.py -n 0003333016 4C implementation:
cd c
cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build
ctest --test-dir build --output-on-failureC++ implementation:
cd cpp
cmake -S . -B build
cmake --build build
./build/enigma_v300_pure_cpp -n 0003333016 4
./build/enigma_v300_pure_cpp -e 0000607 7 6963enigma-v300/
├── python/ # Python implementations
│ ├── tests/
│ │ └── test_enigma_v300.py
│ ├── enigma_v300_functions.py
│ └── enigma_v300_classes.py
├── c/ # C11 implementation
│ ├── src/
│ ├── tests/
│ └── CMakeLists.txt
├── cpp/ # C++20 implementation
│ ├── src/
│ ├── tests/
│ └── CMakeLists.txt
├── .github/ # CI/CD pipelines
├── pyproject.toml
├── CHANGELOG.md
└── README.md
This project implements two ciphers:
- Used for NetTool devices with 10-digit serial numbers
- Hex-based encryption with XOR and rotor substitution
- Produces 12-character hex keys
- Used for other Fluke devices with 7-digit serial numbers
- Alphanumeric encryption with dual rotors (base-10 and base-26)
- Produces 16-character alphanumeric keys
- Includes checksum validation
- 3.0.1 - Added standalone Python functional and class-based implementations
- 3.0.0 - Initial unified release with Python SDK, C, and C++ implementations
This software is licensed under the MIT License. See the LICENSE file for details.
Kris Armstrong
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Found a bug or have a feature request? Please use our issue templates:
Please read our Pull Request template and ensure:
- All 4 implementations remain consistent
- Tests pass locally and in CI/CD
- Documentation is updated
fluke nettool option-keys encryption enigma python c cpp cryptography network-testing ci-cd github-actions
Run the full local checks:
./check.sh