Okay, let's break down the size of a rainbow table for 18-character passwords using the full character set (lowercase letters, uppercase letters, numbers, and symbols).
1. Character Set Size:
- Lowercase letters: 26
- Uppercase letters: 26
- Numbers: 10
- Symbols: Let's assume a reasonable set of symbols. A common set might include:
!@#$%^&*()_+=- This gives us 20 symbols.
- Total characters in the set: 26 + 26 + 10 + 20 = 82
2. Total Possible Passwords:
Since each of the 18 characters can be any of the 82 characters in the set, the total number of possible passwords is:
8218
This is a very large number. Let's calculate it:
8218 ≈ 2.25 x 1036
That's 2.25 followed by 36 zeros! It's an incredibly huge number.
3. Rainbow Table Size:
A rainbow table stores hashes and their corresponding plaintexts (passwords). The size of the rainbow table is determined by the size of the hash values and the number of passwords it needs to store.
-
Hash Size: The size of the hash depends on the hashing algorithm used. Common choices include:
- MD5: 128 bits (16 bytes)
- SHA-1: 160 bits (20 bytes)
- SHA-256: 256 bits (32 bytes)
- SHA-512: 512 bits (64 bytes)
Let's assume we're using SHA-256, as it's a widely used and reasonably secure hashing algorithm. This means each entry in the rainbow table will be 32 bytes (256 bits) long.
-
Number of Entries: The rainbow table needs to store all possible passwords. Therefore, the number of entries is equal to the total number of possible passwords, which is 8218.
-
Rainbow Table Size (in bytes):
Rainbow Table Size = (Number of Entries) * (Hash Size)
Rainbow Table Size = (8218) * 32 bytes
Rainbow Table Size ≈ (2.25 x 1036) * 32 bytes
Rainbow Table Size ≈ 7.2 x 1037 bytes
-
Rainbow Table Size (in terabytes):
1 terabyte (TB) = 1012 bytes
Rainbow Table Size ≈ (7.2 x 1037 bytes) / (1012 bytes/TB)
Rainbow Table Size ≈ 7.2 x 1025 TB
This is an absolutely astronomical number! It's far beyond any conceivable storage capacity currently available or likely to be available in the foreseeable future. It's roughly 7.2 followed by 25 zeros.
In Summary:
A rainbow table containing all possible 18-character passwords using the full character set (alphanumeric and symbols) and using SHA-256 hashing would be approximately 7.2 x 1025 terabytes. This is an unfathomably large amount of data. It's practically impossible to store or manage.
Important Considerations:
- Hashing Algorithm: The choice of hashing algorithm significantly impacts the size of the rainbow table. Stronger hashing algorithms (like SHA-512) result in larger hash sizes and, therefore, larger rainbow tables.
- Practicality: Building and using a rainbow table of this size is not feasible due to storage limitations and computational requirements. Modern password security relies on salting and key derivation functions (like bcrypt, Argon2) to make rainbow table attacks much more difficult. Salting adds a random value to each password before hashing, making precomputed rainbow tables useless.
- Password Complexity: The more complex the password (longer, more diverse characters), the larger the search space and the more computationally expensive it becomes to crack passwords.