Solve: $2^{256} = 95^x$ ... what is $x$?

88 Views Asked by At

I expect the result to be around $40$, but I do not know how to get there?

Not necessary to read:

I'm doing this because I'm wondering how many (printable!) characters I need for a password strength of $256$ bit. $256$ bit is $2^{256}$ possibilities. In theory it would take $32$ characters, IF every character had $8$ totally random bits. But since I'm restricted to the printable characters, I only get 95 (space until ~) possibilities per $8$ bits (instead of $256$). That is how I came up with the equation above - which I think is correct, I just don't know how to solve it.

2

There are 2 best solutions below

1
On BEST ANSWER

Take logs:

$$ 256 \log_2 2 = x \log_2 95 $$

and then solve for $x$.

0
On

Take the logarithm of both sides to calculate the answer. The logarithm is the inverse of the exponential function. This link talks about them, in case you haven’t been introduced.

Thus, the answer is found as follows: $$95^x=2^{256}$$ $$\log_{95}\left(95^x\right)=\log_{95}\left(2^{256}\right)$$ $$x=256 \log_{95}2$$ $$x=\frac{256\log_2{2}}{\log_2 95}$$ $$x=\frac{256}{\log_295}$$