Casascius Minikey Tool

4 replies 212 views
0xF0xMember
Posts: 22 · Reputation: 238
#1Aug 30, 2020, 11:41 AM
Hey everyone, I created a straightforward tool for expanding minikeys. You input a minikey, and it gives you the matching address and private key in wallet import format. For example: This tool is made up of just 100 lines of code, relies only on the programming language, and can be executed entirely offline. Check it out here: https://codeberg.org/objectinspace/minikey
4 Reply Quote Share
paul.ninjaFull Member
Posts: 152 · Reputation: 539
#2Aug 30, 2020, 04:04 PM
That's actually a neat little tool. A minikey format is 30 Base58 chars starting with "S" (there's also a legacy 22-char variant from early Series 1 coins). The validity check for these is super specific: You append "?" to the minikey and SHA-256 it and if the first byte isn't 0x00, you reject it. The actual private key is just SHA-256(minikey). That's the whole trick, and it's worth, I think, making the tool scream loudly when the check fails.
1 Reply Quote Share
0xF0xMember
Posts: 22 · Reputation: 238
#3Aug 30, 2020, 06:35 PM
Thanks for the comment! The tool actually handles all of this.
6 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#4Aug 30, 2020, 11:11 PM
It just says "Invalid minikey, typo?" when the checksum failed though. It's not loud enough for him. (jk) Anyways, I think the length should be 30 by default since the previous 22 is depreciated. Even if its "generate" feature is suggested to use for testing purposes only, some people will undoubtedly use it given that it's now referenced in mini private key Bitcoin Wiki article. (ref)
0 Reply Quote Share
0xF0xMember
Posts: 22 · Reputation: 238
#5Aug 31, 2020, 04:45 AM
That's a good point, thanks. I've updated the default length to 30.
0 Reply Quote Share

Related topics