Calculating Time - Generating TOR Onion Vanity Addresses
Calculating Time - Generating Onion Vanity Addresses
Onion addresses are unique identifiers used within the Tor network to access hidden services anonymously. Each .onion
address is derived from an ED25519 cryptographic key pair, ensuring privacy, security, and ownership—if you hold the private key, you effectively hold the address. While generating a standard onion address is straightforward, creating a custom or “vanity” address with specific character patterns can be significantly more resource-intensive. Tools like mkp224o can brute force these desired key pairs, illustrating how even modest increases in the desired complexity can push generation times from mere seconds to several years.
Base-32 omits the numeral digits of 0,1,8,9
References:
- scribblemaniac’s Github Comment
- https://mathway.com
- Artificial Intelligence - ChatGPT 3.5 - Ollama (Model: Llama3:8b)
Equation Breakdown
Calculations (or Trails)
Formula:
\[t = \frac{\log(1-p)}{\log\left(1-\frac{1}{32^n}\right)}\]Formula with Equation Numbering
\[\begin{equation} t = \frac{\log(1-p)}{\log\left(1-\frac{1}{32^n}\right)} \label{eq:main_formula} \end{equation}\]Warning: GitHub Rendering Warning
LaTeX and MathJax may not render correctly on GitHub.
Example
Using \(p = 99\%\) and \(n = 2\):
\[\begin{equation} t = \frac{\log(1-p)}{\log\left(1-\left(\frac{1}{32}\right)^n\right)} \label{eq:example_formula} \end{equation}\]Solving the Equation
Simplify the Numerator
Starting with parentheses, subtract \(0.99\) from \(1\):
\[\log (1 - 0.99) = \log (0.01)\]LOG10 of \(0.01\):
\[\log (0.01) \approx -2\]Thus:
\[\frac{\log (0.01)}{\log \left(1-\left(\frac{1}{32}\right)^2\right)} = \frac{-2} {\log \left(1-\left(\frac{1}{32}\right)^2\right)}\]Simplify the Denominator
Simplify each term:
\[\frac{-2}{\log \left(1-\frac{1^2}{32^2}\right)}\]Since \(1^2 = 1\):
\[\frac{-2}{\log \left(1-\frac{1}{32^2}\right)}\]Raise \(32\) to the power of \(2\):
\[\frac{-2}{\log \left(1-\frac{1}{1024}\right)}\]Write \(1\) as a fraction with a common denominator:
\[\log \left(\frac{1024}{1024}-\frac{1}{1024}\right)\]Combine the numerators:
\[\frac{-2}{\log \left(\frac{1024-1}{1024}\right)}\]Subtract \(1\) from \(1024\):
\[\frac{-2}{\log \left(\frac{1023}{1024}\right)}\]Move the negative in front of the fraction:
\[-\frac{2}{\log \left(\frac{1023}{1024}\right)}\]Results
Exact Form
\[\begin{equation} t = -\frac{2}{\log \left(\frac{1023}{1024}\right)} \label{eq:exact_form} \end{equation}\]Decimal Form
Simplify \(\frac{1023}{1024}\):
\[\frac{1023}{1024} = 0.9990234375\]Take the log of \(0.9990234375\):
\[\log (0.9990234375) = -0.00042432292\]Thus:
\[t = \frac{-2}{-0.00042432292}\]Approximate \(t\):
\[t \approx 4713.391395\ldots\]Probable Data Calculations
Excel Formula The following formula is used to create a data table using the above equation. The table can plot the probable calculations required based on the number of characters defined.
1
LOG10(1-'calculations')/LOG10(1-1/32^'probability')
Calculations Table
Shows the Number of Possible Calculations by Probability and Character Count.
- X-Axis: Character Count (number of characters in the string)
- Y-Axis: Probability (percentage chance of obtaining a specific “string value”)
- Data: The number of calculations required to reach the specified probability, given the character count
50% | 99% | |
---|---|---|
2 | 709 | 4713 |
3 | 22713 | 150900 |
4 | 726817 | 4828869 |
5 | 23258160 | 154523868 |
6 | 744261118 | 4944763833 |
7 | 23816355774 | 158232442728 |
8 | 762123384785 | 5063438167379 |
9 | 24387948313146 | 162030021356198 |
10 | 780414346020669 | 5184960683398420 |
Time Table
Taking the information from Table A, we can assume how much time will be needed to obtain the defined character prefix by the probability level.
We will need an approximation of the compute resources calculations per second.
\[\large \begin{align*} & f=Probable~Calculations~Required \small ~~ (found~in~table~A) \\ & c=Calculation~Per~Second \\ \\ \\ & Seconds~ Needed = \frac{f}{c} \end{align*}\]- X-Axis: Character Count (number of characters in the string)
- Y-Axis: Probability (percentage chance of obtaining a specific “string value”)
- Data: Amount of time needed to process the required calculations. (Assuming the compute resource can process ~35 million calculations per second.)
- Using a Dell XPS 15 - Intel i9-11900H - Thermal Throttling - 14 Treads @ ~ 3.3GHz Resulting ~ 35M Calc Per Second
Characters | 50% Probability | 99% Probability |
---|---|---|
2 | Less than 1 second | Less than 1 second |
3 | Less than 1 second | Less than 1 second |
4 | Less than 1 second | Less than 1 second |
5 | 1 Second | 4 Seconds |
6 | 21 Sec | 2 Min, 21 Sec |
7 | 11 Min, 20 Sec | 15 Min, 21 Sec |
8 | 6 hours | 1 Day, 16 hours |
9 | 8 Days | 53 Days |
10 | 8 Months, 14 Days | 4 Years, 18 Months, 10 Days |
Excel Formula Examples for time
ℹ️ Info: Excel has issues when the value is under zero.
1
LOG10(1-$calculations)/LOG10(1-1/32^$probability)/$CalPerSec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
IF("REF"=0,"0 M, 0 D, 0 hours, 0 M, 0 S",
IF("REF"<60,"0 M, 0 D, 0 hours, 0 M, "&"REF"&" S",
IF("REF"<3600,"0 M, 0 D, 0 hours, "&INT("REF"/60)&" M, "&MOD("REF",60)&" S",
IF("REF"<86400,"0 M, 0 D, "&INT("REF"/3600)&" hours, "&TEXT(INT(("REF"-INT("REF"/3600)*3600)/60),"00")&" M, "&MOD("REF",60)&" S",
IF("REF"<2629746,"0 M, "&INT("REF"/86400)&" D, "&TEXT(INT(("REF"-INT("REF"/86400)*86400)/3600),"00")&" hours, "&TEXT(INT(("REF"-INT("REF"/3600)*3600)/60),"00")&" M, "&MOD("REF",60)&" S",
IF("REF">=2629746,INT("REF"/2629746)&" M, "&TEXT(INT(("REF"-INT("REF"/2629746)*2629746)/86400),"00")&" D, "&TEXT(INT(("REF"-INT("REF"/86400)*86400)/3600),"00")&" hours, "&TEXT(INT(("REF"-INT("REF"/3600)*3600)/60),"00")&" M, "&MOD("REF",60)&" S"
)
)
)
)
))