Bitcoin Forum
November 16, 2024, 12:50:14 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 [304] 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 »
6061  Bitcoin / Development & Technical Discussion / Re: Few suggestions regarding Satoshi client on: October 16, 2012, 11:58:06 AM
AFAIA the "datadir" can only be used as a program argument (at least this is what the Wiki currently states).

Has something changed regarding this recently?

(in either case I do agree that "datadir" should be able to be provided in bitcoin.conf and it would be nice to have the option to provide this during installation)
6062  Bitcoin / Bitcoin Technical Support / Re: Why do hashes begin with 0000000...? on: October 16, 2012, 07:10:03 AM
The SHA256 "solution" hash for a block requires x number of zeros at the start as the way of controlling the "difficulty" to find such a hash by continually trying to hash the block header with a different "nonce" until such a solution is found.

This is the "proof of work" that is fundamental to the Bitcoin block chain method to prevent double spends.
6063  Bitcoin / Project Development / Re: stock exchange based on colored coins on: October 16, 2012, 05:59:15 AM
I think that share dilution should not be made possible - instead the "company" should simply issue a new contract for a new "color" and if they desire offer cheaper purchasing price for owners of the original contract (the link between the two contracts and the issuer could be stored somewhere externally).
6064  Economy / Services / Re: Selling Vanity Addresses on: October 15, 2012, 11:33:26 AM
There are other threads covering how vanity addresses can be generated for others safely by using either point multiplication or multipart signatures.

Without this approach your service is basically too risky for anyone to use sorry (and as mentioned you might want to instead look into vanitypool).
6065  Bitcoin / Bitcoin Technical Support / Re: How do I move where blockchain is stored? on: October 15, 2012, 06:57:26 AM
Well done - next week we'll see if you can get you into the dark depths of using the ("black box") Windows console. Wink
6066  Other / Beginners & Help / Re: How many transactions can I send and receive from one address? on: October 15, 2012, 06:18:27 AM
The address can be re-used as many times as you like without any issue of being compromised due to "usage" (re-use will reduce your level of anonymity though which is why it is generally best to avoid).

As most (if not all) wallets effectively randomly choose addresses to send from it is out of your control when any particular address is chosen as one of the tx inputs.

The potential problem wrt security is more to do with your wallet not being encrypted or your computer being keylogged (the other huge problem is not having or having correctly backed up your wallet).
6067  Bitcoin / Bitcoin Technical Support / Re: How do I move where blockchain is stored? on: October 15, 2012, 05:07:24 AM
not easy it seems

Is it really that hard for you to create a desktop shortcut and change the target to the following?

Code:
Target: "C:\Program Files\Bitcoin\bitcoin-qt.exe"  -datadir=D:\btcdata
6068  Bitcoin / Bitcoin Technical Support / Re: How do I move where blockchain is stored? on: October 15, 2012, 03:39:13 AM
https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File

Look for the "datadir" option - I think it can only be specified as a command-line option therefore you'll need to create a custom shortcut to start your bitcoin-qt (or modify the shortcut you already have).
6069  Economy / Economics / Re: IMF working paper: The Chicago Plan revisited on: October 14, 2012, 03:41:22 PM
If the FAQ doesn't already mention it then it should also perhaps have something like the following question "Why would you upgrade your computer now rather than in another year?".

Every year computers get more powerful yet cheaper - so if someone's computer today is fast enough to do all the things they do (and CPU's have not got any faster for some time now due to cooling limitations) then wouldn't you simply wait as long as possible to "upgrade"?

Despite this obviously deflationary scenario (i.e. the dollars become worth more compared to the computers the longer you hold off purchasing even if the dollars themselves are getting worth less) computers (and of course mobile phones, etc.) are selling at a huge rate.

I think this argument in itself could be a pretty good response to the "deflationary death spiral" one.
6070  Bitcoin / Development & Technical Discussion / Re: [Idea] Vanitygen with GPG to create private keys safely ** 2 factor update ** on: October 14, 2012, 06:51:04 AM
Well I decided to whip up a bash script anyway as I think I will be using this with a Linux OS down the track.

(note that as the x.cpp program actually creates the file 'x' I renamed x.cpp to w.cpp for Linux and compiled it using 'g++ -o w w.cpp')

Code:
[genaddr]
gpg_1_opts="--armor --recipient Ian_1 --encrypt --sign --local-user sample@domain.com --batch --passphrase-fd 0"
gpg_2_opts="--armor --recipient Ian_2 --encrypt --sign --local-user sample@domain.com --batch --passphrase-fd 0"

# Use simple program to split out the private key for GPG encryption.
./vanitygen 1 | ./w | gpg $gpg_1_opts | ./w 2 | gpg $gpg_2_opts >y
cat x y >z
rm x y

cat z

# Now rename the output file to the bitcoin address.
cat z | grep Address > z.sh
sed -i 's/Address: /mv z /g' z.sh
chmod a+x z.sh

./z.sh
rm z.sh

Enjoy!
6071  Bitcoin / Development & Technical Discussion / Re: [Idea] Vanitygen with GPG to create private keys safely ** 2 factor update ** on: October 14, 2012, 04:54:29 AM
I just realised that with only a little minor tweaking this approach can be turned into a "roll your own" 2 factor authentication system. The idea is to encrypt the bitcoin private key to one GPG public key and then pipe this into another GPG encryption to a second GPG public key. So if you generate the GPG private keys on separate hardware then both computers would need to be compromised in order for your bitcoin private key to be obtained.

Obviously this could be extended to 3 factors or more (depending upon level of paranoia, available hardware and degree of laziness).

Updated C++ program (takes an optional argument "2" to indicate it is being used as the second pipe):
Code:
[x.cpp]
#include <string>
#include <fstream>
#include <iostream>

const char* const c_outfile = "x";
const char* const c_password = "password";

const char* const c_address_prefix = "Address: ";
const char* const c_privkey_prefix = "Privkey: ";

using namespace std;

int main( int argc, char* argv[ ] )
{
   cout << c_password << endl;

   bool is_second = false;
   if( argc > 1 && string( argv[ 1 ] ) == "2" )
      is_second = true;

   string str;
   while( getline( cin, str ) )
   {
      if( is_second )
         cout << str << '\n';
      else if( str.find( c_address_prefix ) == 0 )
      {
         ofstream outf( c_outfile );
         outf << str << '\n' << endl;
      }
      else if( str.find( c_privkey_prefix ) == 0 )
         cout << str << endl;
   }
}


Updated batch file to create GPG encrypt the private key twice (thus requiring both GPG keys in order to decrypt the bitcoin private key) - change Ian_1 and Ian_2 to your own two different public GPG key names:
Code:
[genaddr.bat]
@echo off
setlocal

set GPG_1_OPTS=--armor --recipient Ian_1 --encrypt --sign --local-user sample@domain.com --batch --passphrase-fd 0
set GPG_2_OPTS=--armor --recipient Ian_2 --encrypt --sign --local-user sample@domain.com --batch --passphrase-fd 0

REM *** Use simple program to split out the private key for GPG encryption.
vanitygen 1 | x.exe | gpg %GPG_1_OPTS% | x.exe 2 | gpg %GPG_2_OPTS% >y
copy /Y x + y z >nul
type z&del x y

REM *** Now rename the output file to the bitcoin address.
type z | find "Address: " > z.bat
cscript findrep.vbs z.bat "Address: " "ren z " >nul
call z.bat
del z.bat

endlocal
6072  Bitcoin / Development & Technical Discussion / Re: Raw TX API & other private keys: 'watch' or 'listunspent' other addresses? on: October 13, 2012, 01:14:35 PM
No. The reference implementation doesn't keep a master map of all addresses to unspent transaction outputs, and adding such an index for the small number of services that need to look up arbitrary addresses doesn't make sense.

I understand the point but I think that as fewer and fewer people other than miners and services end up choosing to use the "reference implementation" (due to the size of the block chain and time it takes to process) wouldn't having such an index (as an option) make at least a little sense (which would only come into effect after a rescan assuming the option wasn't originally turned on)?

My view is that the "reference implementation" is actually what we want to make things easy and possible for services (rather than each having to roll their own). If this is wrong then why bother with the "raw tx" API at all (as certainly no normal end-user will ever use it)?
6073  Bitcoin / Development & Technical Discussion / Re: [Idea] Vanitygen with GPG to create private keys safely (with source code) on: October 13, 2012, 10:12:36 AM
Awesome. Been wanting this exact tool for some time.

Any chance of porting it to linux?

Hmm... I guess if a small bounty were to be offered (is 1 btc too much to ask?) then I could become motivated enough to put together a bash script. Wink
6074  Bitcoin / Development & Technical Discussion / Re: Address signatures with another algo for added security against ECDSA breaking on: October 13, 2012, 07:03:06 AM
Interesting coincidence that I created this thread today: https://bitcointalk.org/index.php?topic=118182.0

Smiley
6075  Bitcoin / Development & Technical Discussion / Re: [Idea] Vanitygen with GPG to create private keys safely on: October 13, 2012, 04:07:32 AM
Anyway for anyone that is interested I've whipped up a little utility and a couple of scripts to accomplish this (for Windows).

Assuming you have GPG installed (with your public key in its keyring) create a dummy key-pair (I've used sample@domain.com here) and give it the password "password".

First part is a simple tool (probably could just be a shell script in Linux) which firstly sends a hard-coded password to cout (the security of the GPG "from" should be irrelevant as it being used as a "send only" address) followed by the private key line it finds from cin (it is expecting its cin to be coming from "vanitygen"). The "address" line is output to a fixed filename ("x" in this source).

Code:
[x.cpp]

#include <string>
#include <fstream>
#include <iostream>

const char* const c_outfile = "x";
const char* const c_password = "password";

const char* const c_address_prefix = "Address: ";
const char* const c_privkey_prefix = "Privkey: ";

using namespace std;

int main( )
{
   ofstream outf( c_outfile );

   cout << c_password << endl;

   string str, addr, privkey;
   while( getline( cin, str ) )
   {
      if( str.find( c_address_prefix ) == 0 )
         outf << str << '\n' << endl;
      else if( str.find( c_privkey_prefix ) == 0 )
         cout << str << endl;
   }
}

The second part is a batch file you call in order to create a new bitcoin address (change Ian to your own GPG name):
Code:
@echo off

REM *** Use simple program to split out the private key for GPG encryption.
vanitygen 1 | x.exe | gpg --armor --recipient Ian --encrypt --sign --local-user sample@domain.com --batch --passphrase-fd 0 >y
copy /Y x + y z >nul
type z&del x y

REM *** Now rename the output file to the bitcoin address.
type z | find "Address: " > z.bat
cscript findrep.vbs z.bat "Address: " "ren z " >nul
call z.bat
del z.bat

The final part is the "findrep.vbs" tool (wouldn't be needed if using Linux):
Code:
Const ForReading = 1
Const ForWriting = 2

If Wscript.Arguments.Count > 2 Then

strFileName = Wscript.Arguments(0)
strOldText = Wscript.Arguments(1)
strNewText = Wscript.Arguments(2)

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, ForReading)

strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, strOldText, strNewText)

Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
objFile.WriteLine strNewText
objFile.Close

Else
 Wscript.Echo "Usage: findrep <file> <findstr> <replace>"
 Wscript.Quit
End If

So now to generate a new bitcoin address you just type "genaddr" at the command prompt. As well as displaying the address and the GPG encrypted private key it saves the output to a file which is the name of the address (which can be safely backed up anywhere).

The following a sample of the output:
Code:
Address: 16vKwvg61UycrbhygXokVNQE3CxMSx22r7

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.9 (MingW32)

hQEMA1cEJ0zSVDDtAQgAnagg9KrfhOlyZrSrItrQxB0IuoOnR8GmG0m4dXFYMCtY
2g4b1HEBhQ/xytGW+lon2LyRZpCoW5BAglW+NeFJ5Oev2c3XcBpVIDlwl9C4CsUJ
w7/dUzFzqwfyiyDl662Bq8rF0qzOyQoyaj629Wz2EeBslb7yVejkg6mylc6hiPZz
zTMxr4Qz4GByty5Qx1Z5X78h49zzeZHnm+22PoiP/5CjEZgX8LohIhyrmJnTRHDJ
47/nRE8j3w45/ozj73KVMyQ936IoxvhpiaoMwTp3UQ8cxdU4xaJBz6MOnjFJn5DV
G3/Td4YpvJuYtNRNOg9xRT5lq2x0/71mYxN+4hoItNLACwFJyFrjitExf6du3Xyy
CvT+kclF73xFGcAA+OLqbbeF1wRqqMxWrYPy2fAORua2B/iWPZgIkLNcCfLFZtL4
pABGG5DV0D+Dh+kyvDf03l2iFe3v1aedUKJ4UFnrBa7me/cQcZSnl5xknNBZD1PY
R5IY1rrBC6BJ+6DtffRREwlp3tLgECpVL/zSBUGqWx68tzOxSnuwubCd0Q1z61fq
L1wfDfjat052eB0xqM7x335LUvBbAKQJ5XxEaJ56CsJsQP4oU9EXcXZrvg2I
=A3f1
-----END PGP MESSAGE-----

When you decide to "redeem" the address simply use "gpg --decode" with the file to get the private key:
Code:
gpg: encrypted with 2048-bit RSA key, ID D25430ED, created 2012-03-25
      "Ian Knowles <ian@ciyam.com>"
Privkey: 5K6X8kvffAUYewAnmAuGHLB4wAk4UH2aZ1NBHdBf2YyzkUqzqHH
gpg: Signature made 10/13/12 12:08:32 using DSA key ID 8C155FBD
gpg: Good signature from "Sample <sample@domain.com>"
6076  Bitcoin / Development & Technical Discussion / Re: [Idea] Vanitygen with GPG to create private keys safely on: October 13, 2012, 02:51:02 AM
I thought there was an command line option to encrypt output from vanitygen already. I might be wrong though and thinking of some other program.

Really - using GPG (and only the private key to be encrypted)?

(certainly not the version that I am running but it is probably a bit old)
6077  Bitcoin / Development & Technical Discussion / Vanitygen & GPG for secure private keys ** 2+ factor auth ** (software provided) on: October 13, 2012, 02:17:06 AM
There have been numerous threads discussing how to generate offline wallets and typically the problem ends up being that if your keys a) generated from a password or b) stored in clear text on a disk then they are subject to attack keyloggers or malware.

I am wondering if using GPG would provide a simple solution by having the output of vanitygen encrypted to a GPG public key (the private key not being known to the "offline" system). With this approach even if the "offline" system was stolen no generated private keys could be taken (apart from the GPG key which is actually of no consequence).

I will probably put together a small script/program to accomplish this but I guess if the GPG functionality could be built in to vanitygen itself this would be even more secure (i.e. so the private key is never output as clear text).

(see source in posts below)
6078  Other / Beginners & Help / Re: How to securely spend coins from a compressed offline private key? on: October 11, 2012, 01:38:58 AM
Okay - I checked in "bitcoinrpc.h" and found this:

RPC_DESERIALIZATION_ERROR       = -22, // Error parsing or validating structure in raw format

So now I am guessing that there must be something wrong with the raw transaction that you created (maybe brainwallet.org doesn't properly work when trying to create a raw tx with compressed private keys).

Perhaps try using the "decoderawtransaction" RPC to see if you can get something a bit more specific?
6079  Other / Beginners & Help / Re: So, where did my bitcoins go? on: October 10, 2012, 03:12:13 PM
Yeah, I went to "back up wallet", saved the wallet.dat to a flash drive, then opened it back up on a new computer. So I guess I just have to wait for the block chain?

Yes (you can always download the blockchain rather than wait if you are willing to trust a downloaded version).
6080  Other / Beginners & Help / Re: So, where did my bitcoins go? on: October 10, 2012, 03:05:59 PM
Define "deleted things", because all I did was export the .dat file and reopen it with a new client. Was there something else I was supposed to take with me?

If you copied the "wallet.dat" file then I don't think you should have any problem at all (although am not sure exactly what you mean by "export" wrt to wallet.dat).
Pages: « 1 ... 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 [304] 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!