I'm doing a small research project collecting information on minikeys. In that research process I've come across a couple of questions that I have been unable to answer in relation to the assumed keyspace of the version one minikey. The said mini key, was used primarily by Casascius Series 1 coins, and consisted of the following parameters
- Generated using Base58 encoding scheme
- Consists of a total of 22 Characters, of which 21 are random, with the 1st character being a capital S prefix
Has the following requirements to be considered well formatted:
- If the minikey appended by a ? at the end of the string hashed using SHA256 results in the first byte being 00, the string is a well formatted minikey
Key Question: Is there any way to calculate the potential number of keys within the massive 58^21 keyspace that would be considered properly formatted?
My current suspicion is that it's not possible to do so because the validation involves hashing and the entire input of the entire minikey input would be needed to generate a proper hash (meaning potentially in order to calculate the possible number of valid keys, every potential key, of a impossibly large keyspace would need to be generated, which is currently impossible). However I am asking this question with the hope that this suspicion is incorrect and that it is somehow possible to calculate the possible number of valid well formatted keys.
For reading on this subject I would recommend checking out:
https://en.bitcoin.it/wiki/Mini_private_key_format
Be warned, the python script needs minor modifications to run on Python2.7
Bold is for key questions Italics if for important thoughts
Note: This post intentionally does not cover the more secure Casascius Series 2 Keys, however it is likely assuming that there exists an answer for Series 1 keys that the process can be used on Series 2 as well.