piit79
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 336
Merit: 250
Time for Plan ฿
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 02:35:36 PM |
|
I see, that's great. They do have templates on the website but not full specs. I guess I will order a few sheets to start with and measure and supply the required info.
|
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 02:40:08 PM |
|
I see, that's great. They do have templates on the website but not full specs. I guess I will order a few sheets to start with and measure and supply the required info.
Or just contact the company and ask for them?
|
|
|
|
BitKoot
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 113
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 03:06:41 PM |
|
There is one problem with presets; every browser and every printer prints pages differently (especially the margins are different, and the DPI of the printer will also have an effect because CSS assumes a default DPI of 96).
It's better to give users enough control so they can try to find the right parameters with a few blank normal paper pages before printing on the sticker pages.
|
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 03:24:39 PM |
|
There is one problem with presets; every browser and every printer prints pages differently (especially the margins are different, and the DPI of the printer will also have an effect because CSS assumes a default DPI of 96).
It's better to give users enough control so they can try to find the right parameters with a few blank normal paper pages before printing on the sticker pages.
Mine uses PDFs so you just print it as actual size with the correct paper size and it will come out the same on every printer.
|
|
|
|
casascius (OP)
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 06:00:30 PM |
|
The 29mm labels are going to be the best fit on the coins but probably going to be harder to find in the US where 1 inch (25.4mm) is far more common unless someone wants to pay expensive shipping from outside US. Ideally it should work with any labels - someone should be able to figure out the numbers for their particular labels and then hit print.
The send many command also needs to send to the Bitcoin address not the private key (starts with 1 not 5) and also needs to be a comma and space after the amount.
Also this would work so much better if it could generate the 30 character minikey and not the full length 51 char privkey. Mini keys are easy to generate, just generate 'S' plus 29 random alphanumerics in the base58 set, do a quick sha256 test on it+'?' (only 1 in 256 codes will pass the test), and increment or regenerate the code until you get one that passes. When you have one that passes just take sha256 of the string and use it as a private key. Minikey is described on the Bitcoin wiki and redemption is well established since I use it in Casascius Coins. I am willing to pay this bounty out more than once and would love to see bitaddress modified to make minikeys.
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
BitKoot
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 113
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 06:35:04 PM |
|
I have made it possible to choose the units you want to enter the measurements in (inches, milimeters and pixels). As a quick check to see if you have the right numbers the width and height of the sheet in the chosen units are shown. That should allow anyone anywere to get the right dimensions for the generated labels in their preferred units. I have fixed the send many string (added comma and put in the public adres (painfull mistake ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) ). I will have a look at the mini key specification tomorrow if time permits. Sounds like a good solution if the user wants some custom text added to the label. Units in milimeters: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F6522303%2Fbitaddress-mm.png&t=665&c=i6RbDk-O5QRJwQ) Units in pixels: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F6522303%2Fbitaddress-px.png&t=665&c=-cED9pjokVL5hQ)
|
|
|
|
casascius (OP)
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 06:36:55 PM |
|
I plan to pay this bounty out more than once so please don't worry about your "competition", please feel free to "steal" one another's ideas, as ultimately the most desirable end result is one fork that has every benefit that's been thought of here.
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 06:57:14 PM |
|
The 29mm labels are going to be the best fit on the coins but probably going to be harder to find in the US where 1 inch (25.4mm) is far more common unless someone wants to pay expensive shipping from outside US. Ideally it should work with any labels - someone should be able to figure out the numbers for their particular labels and then hit print.
The send many command also needs to send to the Bitcoin address not the private key (starts with 1 not 5) and also needs to be a comma and space after the amount.
Also this would work so much better if it could generate the 30 character minikey and not the full length 51 char privkey. Mini keys are easy to generate, just generate 'S' plus 29 random alphanumerics in the base58 set, do a quick sha256 test on it+'?' (only 1 in 256 codes will pass the test), and increment or regenerate the code until you get one that passes. When you have one that passes just take sha256 of the string and use it as a private key. Minikey is described on the Bitcoin wiki and redemption is well established since I use it in Casascius Coins. I am willing to pay this bounty out more than once and would love to see bitaddress modified to make minikeys.
Just generating 256 takes 9 seconds on my computer so a whole sheet would take about 10 minutes! I will give it a go but its going to be slow.
|
|
|
|
JohnGalt
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 249
Merit: 114
Who is John Galt?
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 07:46:23 PM |
|
I used 1.125" labels from sheet-labels.com for my coins. The part number is SL266. The labels are slightly smaller than the space on the coin so that you don't have worry as much about aligning them perfectly. Also, because my printer doesn't have good registration, I had to add quite a bit of buffer around the edge of the labels in case the paper wasn't aligned perfectly. I used the minikey format to generate the QR code. I chose the Q error correction level (30% maybe?). Fewer bits with more error correction makes the QR code more durable and requires less camera resolution to read the code. Take a look at the difference. Here is a minikey with Q error correction: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FSkcNIBM.png%3F1&t=665&c=168540zGNCZehQ) Here is a base-58 key with Q error correction: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FGYMdMmI.png%3F1&t=665&c=pXeNtAmogKQBaw)
|
|
|
|
casascius (OP)
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 16, 2013, 10:08:41 PM |
|
Just generating 256 takes 9 seconds on my computer so a whole sheet would take about 10 minutes!
I will give it a go but its going to be slow.
Chrome seems to run javascript the fastest by far. Generating minikeys requires a fair bit of throwing away possible candidates. If those candidates are being generated randomly each time, the random number generation might be an easily removed bottleneck. Simply generate ONE random candidate, and if it's not valid, increment it until it is. The act of incrementing it is likely to be much faster than redoing the entire random generation. Obviously, once you find a candidate, the next one must be random. By "increment", I simply mean the following: look at the last character of the candidate, and increment it, UNLESS it was: H,N,k (in this case, increment it twice to skip illegal characters I,O,l), OR if it was 9 make it an A, OR if it was Z make it a (lowercase) a, OR if it was a z, then make it a 2 and repeat the incrementing process on the preceding character. (Yes ordinarily it should be a 1, but I'm biased against the number 1 appearing in minikeys since they are the #1 cause of complaints when people type them as "l" and I have therefore eliminated them from all my series 2 coins, but they are otherwise still legal for minikeys)
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
LAMarcellus
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 17, 2013, 02:32:48 PM |
|
|
The only way to deal with an unfree world is to become so absolutely free that your very existence is an act of rebellion. – Albert Camus
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 17, 2013, 04:40:27 PM |
|
This makes mini keys but uses the javascript random number generator which is not good for cryptography i tried using the BitAddress SecureRandom function but i cant understand how it works. Can someone have a look at this? //This code unsuitable for cryptographic purposes due to the use of Math.random(); //Bitcoin Grid - bitcoingrid.com generateMiniKey: function (){ var possible = "23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; do{ var key = "S"; for( var i=0; i < 29; i++ ){ key += possible.charAt(Math.floor(Math.random() * possible.length)); } } while (!Bitcoin.ECKey.isMiniFormat(key)); return key; }
|
|
|
|
BitKoot
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 113
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 17, 2013, 05:48:07 PM Last edit: June 18, 2013, 09:03:43 AM by BitKoot |
|
Ok, let's work together on this ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) This should do the trick using the SecureRandom random number generator from BitAddress: [edit 18-06]: Added the incremental key altering suggested by casascius to make finding valid keys faster. Firefox and IE only take 8 seconds for a full sheet now, Chrome is even faster.generateMiniKey: function () { var rng = new SecureRandom(); var possible = "23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; var key = "S"; for(var i = 0; i < 29; i++) { // Get a secure random number. The first argument to the BigInteger constructor // is the maximum number of bits to use, the second argument is the random number generator. var randomNumber = this.getSecureRandomNumber(rng, 0, possible.length - 1); key += possible.charAt(randomNumber); } // Replace random characters at random positions in the key until we found a valid minikey do { var keyIndex = this.getSecureRandomNumber(rng, 1, key.length - 1); var replacementChar = possible[this.getSecureRandomNumber(rng, 0, possible.length - 1)]; key = key.replaceAt(keyIndex, replacementChar); } while (!Bitcoin.ECKey.isMiniFormat(key)); return key; },
getSecureRandomNumber: function(rng, lowerBound, upperBound) { var randomNumber = lowerBound - 1; do { randomNumber = new BigInteger(upperBound.toString(2).length, rng); } // Filter out any numbers which have the right amount of bits, but are outside the upperBound. while(randomNumber < lowerBound || randomNumber > upperBound); return randomNumber.intValue(); },
You'll also need this string prototype function: String.prototype.replaceAt=function(index, character) { return this.substr(0, index) + character + this.substr(index+character.length); }; Added minikey generation (works with QR and text) and the ability to add one row of custom text: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F6522303%2Fbitaddress-minikey-custom-text.png&t=665&c=r2O4_dMUib_C1w) Now I need to improve the positioning and scaling of the text and QR codes, because I'm not completely satified yet.
|
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 03:56:40 PM |
|
|
|
|
|
dave3k
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 147
Merit: 100
Realbitcoin.info
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 04:56:34 PM |
|
Great work! Was testing, then my printer run out off ink on the first sheet! ![Angry](https://bitcointalk.org/Smileys/default/angry.gif) In other news, you finished the job faster then it took me to get the labels! Please let me know your public key so I can 'buy' you some labels! ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Same goes for the next person to finish. The one problem I did run across was the "change your paper size" text was acros the labels if using small margins, but these could be edited out.
|
Realbitcoin.info
|
|
|
Bitcoin Grid
Newbie
Offline
Activity: 18
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 05:28:16 PM |
|
Great work! Was testing, then my printer run out off ink on the first sheet! ![Angry](https://bitcointalk.org/Smileys/default/angry.gif) In other news, you finished the job faster then it took me to get the labels! Please let me know your public key so I can 'buy' you some labels! ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Same goes for the next person to finish. The one problem I did run across was the "change your paper size" text was acros the labels if using small margins, but these could be edited out. Just delete line 10401 or do a ctrl-f for this and just remove it doc.text(10,4,'When printing use the "actual size" option and change your paper size to '+ base.format); I will make it smaller in v0.2
|
|
|
|
BitKoot
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 113
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 07:49:35 PM Last edit: June 21, 2013, 12:26:55 PM by BitKoot |
|
My version is done as well. I finaly managed to get the label and QR code placement better. Chrome is the way to go. IE and Firefox struggle with the key generation which takes a lot longer than Chrome. Link: BitAddress fork 0.1I would like to hear some feedback. But please, try it on 'normal' paper first before trying it on actual sticker sheets ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) . My version is done, it runs best in chrome.
Nice work Bitcoin Grid! I like the countdown when generating labels, and the fact that you made everything configurable. I have opted to try and find a best fit for the QR code and font sizes during code generation based on the label width.
Edit 21-06: Uploaded v 0.2. Sometimes the QR codes would come out blurry. This happened if the number of modules in the QR code was not a multiple of the number of pixels in the QR code width. Now by default the QR code width in pixels is a multiple of the modules in the QR code. If you want the code to be stretched to the maximum available width of the label, you can still do so by ticking the 'Allow QR scaling' checkbox. I have also included jQuery. This will allow me to do more positioning and scaling improvements much more easily in the future (I plan on rewriting some of the old code to jQuery as well). Link: BitAddress fork 0.2
|
|
|
|
dave3k
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 147
Merit: 100
Realbitcoin.info
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 21, 2013, 04:43:39 PM Last edit: June 21, 2013, 08:51:36 PM by dave3k |
|
Still waiting for my labels, but everything is working well.
Thanks again guys. I have sent Bitkook And Bitcoin Grid 0.2 Btc
ba427a040ebdf74c4afddb62cdd214b537603a04d2ea382be3bdaafc8a639b4b e75a3e4dad2fed5cd3a8778d24f1ef1d64581ddfd4fc2607f88019d8348f6236
|
Realbitcoin.info
|
|
|
piit79
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 336
Merit: 250
Time for Plan ฿
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 21, 2013, 07:13:11 PM |
|
Great work! Kudos to you both. I will send specs of the round labels that can be purchased here in the UK soon when I get them.
|
|
|
|
casascius (OP)
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 21, 2013, 08:48:55 PM |
|
So far, looks great! Is there a way to not print the black circles? (e.g. perhaps the CSS can be set such that the circle itself only appears on screen but not the paper) Also is there a way to set the denomination as it appears in the sendmany command? (it seems like perhaps it's hardcoded at 0.01) This looks great too! Same on the circles, any way to not print them?
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
|