How many public keys with the length of 64 characters (in the range 0-9 or A-F) can be formed? Assume a public-key cryptography system with the length of 64 characters (in the range 0-9 and a-f in hexadecimal).
Below is an example of a public key:
6d28cf8e17e4682fbe6285e72b21aa26f094d8dbd18f7828358f822b428d069f

How many of such keys can be formed?
While I think that the correct answer is $16^{64} = 1.15792089×10^{77}$, based on the Permutation formula, the answer would be different: $\frac{64!}{(64-16)!} = 1.02213465×10^{28}$.
Does this mean that the total number of possible keys with 16 letters and with the length of 64 cannot be considered a kind of permutation?
 A: Your solution is correct.
The permutation formula $$P(n, k) = \frac{n!}{(n - k)!}$$ only applies when the elements in the permutation are all distinct. It is used to count arrangements (ordered selections) of $k$ elements selected from a set with $n$ elements.  We use it for problems such as finding the number of ways of selecting a president, secretary, and treasurer from a mathematics club if no person can hold more than one office.  There are $$P(20, 3) = \frac{20!}{(20 - 3)!} = \frac{20!}{17!} = \frac{20 \cdot 19 \cdot 18 \cdot 17!}{17!} = 20 \cdot 19 \cdot 18$$
such selections since there are $20$ ways of selecting the president, $19$ ways of selecting the secretary from among the remaining members of the club, and $18$ ways of selecting the treasurer from among the remaining members of the club.
Strictly speaking, the elements in a permutation must be distinct.  That said, the problem you solved is sometimes called a permutation with repetition, meaning ordered arrangements of $k$ elements selected from a set elements when repetition is permitted.  The number of such strings is $n^k$ since there are $n$ possible choices for each of the $k$ positions in the string.  In your case, $n = 16$ since there are $16$ available characters and $k = 64$ since the string has length $64$, giving $16^{64}$ possible public keys.
