Choosing a Secure Master Seed
Relevant source files
The following files were used as context for generating this wiki page:
The Master Seed is the single most critical component in the qib13 system. It serves as the root of trust and the primary source of entropy for the deterministic generation of all encoding and deviation systems. The entire security and reproducibility of the qib13 tool depend on the secrecy and integrity of the Master Seed. A properly chosen Master Seed ensures that the simple, memorable 13-character generator codes are protected by strong cryptography.
This document outlines the role of the Master Seed, how it is used within the system, its security implications, and best practices for choosing and managing it. The security of the generator code is directly tied to the security of the Master Seed; if the Master Seed is compromised, the system's security is significantly reduced.
Sources: README.md:12-18, 30-33
The Role of the Master Seed
The Master Seed is a string of any length that acts as the foundation for generating the "Original" and "Deviation" encoding systems. Its primary function is to seed a cryptographically secure deterministic random number generator (RNG), which in turn creates the unique matrices and permutations for each encoding system. This ensures that the same Master Seed will always produce the exact same set of encoding systems, making the process reproducible.
The diagram below illustrates the flow from the Master Seed to the final generated systems.
This diagram shows how the Master Seed is the initial input for the random number generator, which then deterministically creates all encoding systems.
Sources: README.md:12-14, 30-33, index.html:184-189, 810-817, 820-828
How the Master Seed is Used
The Master Seed is utilized during the "Generate Systems" phase. The user can either provide a custom seed or use a hardcoded default value.
Sources: index.html:92-99, 703-720
System Generation Process
When the user initiates system generation, the Master Seed string is combined with a unique suffix for each encoding system. This combined string is then used to initialize the CryptoSeededRandom class.
- Original System (System 1): The seed for the RNG is
masterSeed + "-original-1". - Deviation Systems (System 2 to N): The seed for the RNG is
masterSeed + "-deviation-" + i, whereiis the system number.
This process ensures that each encoding system is derived from the same Master Seed but is unique due to the different suffixes.
The following sequence diagram shows the user interaction and internal logic for generating systems with a custom seed.
Sources: index.html:703-748, 810-817, 820-828
Default Master Seed
For convenience and initial testing, the application includes a hardcoded default Master Seed. If the user attempts to generate systems without providing a custom seed, this default value is used. The UI provides a warning to the user in this case, as using the default seed is not recommended for secure applications.
- Default Value:
xtphkxlzrkleosumdxykzmmhzdtaqdsfbzimlwglctrcezpffqtbfhbiakksgwauprtbhfflulpnrbhghbvpnwqhyozkjgsavudi
// index.html:186-187
let currentMasterSeed = "xtphkxlzrkleosumdxykzmmhzdtaqdsfbzimlwglctrcezpffqtbfhbiakksgwauprtbhfflulpnrbhghbvpnwqhyozkjgsavudi";
Sources: index.html:186-187, 707-711, 743
User-Provided Master Seed
The primary and recommended method is for the user to provide their own unique Master Seed via the text input field in the "Generate Reproducible Systems" section.
<!-- index.html:93-94 -->
<label for="masterSeed">Master Seed:</label>
<input type="text" id="masterSeed" placeholder="Enter your master seed">
This value is retrieved by the generateSystems() function and becomes the currentMasterSeed for the session.
Sources: index.html:93-94, 704
Security Implications
The security of the entire qib13 system is anchored to the secrecy of the Master Seed.
Sources: README.md:58-63, 114-117
Entropy and Security Model
The total entropy of the system is a combination of the Master Seed's entropy, the generator code's entropy, and the deviation index's entropy. The formula is:
Total System Entropy = (L × log₂(26)) + 61.1 + log₂(N) bits
Where:
Lis the length of the Master Seed.61.1bits is the approximate entropy of the 13-character generator code.Nis the number of deviation systems.
As the formula shows, a longer Master Seed (L) dramatically increases the total entropy and, therefore, the security of the system.
The security model can be summarized as follows:
| Condition | Security Level | Vulnerability |
|---|---|---|
| Master Seed is Secret | High | Computationally infeasible to brute-force the Master Seed and generator code. |
| Master Seed is Compromised | Low | Security reduces to the generator code's entropy (~61.1 bits), which is vulnerable to brute-force attacks. |
Sources: README.md:50-71, 114-117
Threats and Limitations
- Master Seed Compromise: This is the most significant threat. If an attacker gains access to the Master Seed, they can reproduce all encoding systems and brute-force the 13-character generator code to recover the final 55-character seed.
- Secure Storage: The Master Seed must be stored securely. Since long seeds are recommended for high entropy, they cannot be easily memorized, necessitating a secure storage solution.
- Predictable Seeds: Using weak, short, or predictable Master Seeds negates the security benefits of the system.
Sources: README.md:61-63, 114-120
Best Practices for Choosing a Master Seed
While the source code does not enforce rules for Master Seed creation, the documentation and system design strongly imply the following best practices:
- Use a Custom Seed: Always provide your own unique Master Seed. Do not rely on the default seed for any real-world use case. The UI explicitly warns against this.
Sources: README.md:32-33, index.html:743 - Maximize Length and Complexity: A longer Master Seed provides significantly more entropy. Use a long string of random characters. The
README.mdprovides an example of a very long seed for this purpose.
Sources: README.md:34, 51-52, 124-125 - Store it Securely: Treat the Master Seed like a primary password or private key. Store it in a password manager or other encrypted storage. Do not store it in plaintext.
Sources: README.md:117-118 - Do Not Share It: The Master Seed is the "key to the kingdom." It should never be shared. Anyone who has it can decode any seed generated with it.
Sources: README.md:59-60
Conclusion
The Master Seed is the cornerstone of the qib13 system's security and reproducibility. Its role is to deterministically generate a complex set of encoding systems from a single, secret input. The security of the user's data relies almost entirely on the strength and secrecy of this seed. By following best practices—using a long, complex, and unique custom seed and storing it securely—users can leverage qib13 to protect their information effectively.
Sources: README.md:12-14, 114-117, 127-133