There are two formats of mini private keys, one is based on SHA-256, other on PBKDF2. In the instructions for decoding the second one, we read:

"The iteration count is determined as follows: 2 ^ (n/4) rounded to the nearest integer, where n is the second byte."

Does the rounding refer to the value of (n/4), or 2 ^ (n/4)? For example, for n=9, we have:


If we round the result of the second equation, we get 5, but if we round the result of the first equation, we get:


Which is a bit of an inconsistency.

Where should one apply rounding for calculating the proper PBKDF2-encoded mini private key?

EDIT: Moreover, should the division by 4 should be carried out arithmetically (rounding the number to nearest integer, with 0.5 being rounded up), or by a logical shift (the number is rounded down).

1 Answer 1


As it is already being discussed on the forum, the standard is currently not in use by anyone, so its implementation details can change over time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.