Bitcoin Forum
June 18, 2024, 07:51:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 [129] 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 206 »
2561  Other / Off-topic / Re: Secure messanging specification on: February 25, 2011, 11:49:14 AM
Ok, then here is the client code:

Code:
#!/bin/bash

# server address (todo:  add an option to set it on command line)
server=127.0.0.1/stockmarket-server.cgi

# private key
# you can generate one with:  openssl genrsa -out rsa-test 2048
# public key can be obtained with:  openssl rsa -pubout -in rsa-test
privkey="rsa-test"

# message is given on command line
message="$@"

# Message authentication code is a random number appended to unix EPOC
mac=$(bc <<<"$(date +%s)+$RANDOM")

# base64 JSON data
data="$(base64 -w 0 <<<"{ \"message\": \"$message\", \"mac\": $mac }")"

# base64 whirlpool signature
signature="$(openssl dgst -whirlpool -sign $privkey <<< "$data" |base64 -w 0)"

# sending via POST method
wget -q -O - --post-data "data=\"$data\" signature=\"$signature\" pubkey=\"$(openssl rsa -pubout -in $privkey)\"" http://$server

And here is the code for the server (a CGI script):

Code:
#!/bin/bash

echo "Content-type:     text/plain"
echo

echo stock market exchange server
echo

if [[ "$REQUEST_METHOD" = "POST" ]] && [[ "$CONTENT_LENGTH" -gt 0 ]]
then
    read -N $CONTENT_LENGTH POST_DATA <&0

    # todo:  retrieve post data more securely than using "eval"
    eval "$POST_DATA"

    if openssl dgst -whirlpool -signature <(base64 -d <<<"$signature") -verify <(echo "$pubkey") <<<"$data" 2>&1
    then
        data="$(base64 -d <<<"$data")"
        echo "$data"
    else
        echo wrong signature
    fi

else
    echo no data received
fi


Several aspects of your specification for the server depend on the kind of database you want to use.  Would you consider using mongodb?
2562  Economy / Marketplace / Re: 5 ssh accounts available for 6BTC/Month on: February 25, 2011, 11:35:26 AM
I haven't found anyone interested in my 0.50 BTC shells either...

I may have missed that.  Please give me a link.

Do you offer web service with CGI?


2563  Other / Off-topic / Re: Secure messanging specification on: February 25, 2011, 11:29:47 AM
Yes, you're right. The "signature" in a whirlpool hash of the data that's encrypted by the private key.

I forgot to say that.

openssl doesn't do whirlpool for signed digest.

hash options for dgst are:  [-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1]
2564  Other / Off-topic / Re: Secure messanging specification on: February 25, 2011, 10:11:10 AM
The client part is very easy:

Code:
#!/bin/bash

# server address (todo:  add an option to set it on command line)
server=127.0.0.1

# private key
# you can generate one with:  openssl genrsa -out rsa-test 2048
# public key can be obtained with:  openssl rsa -pubout -in rsa-test
privkey="rsa-test"

# message is given on command line
message="$@"

# Message authentication code is a random number appended to unix EPOC
mac=$(bc <<<"$(date +%s)+$RANDOM")

data="$(base64 <<<"{ \"message\": \"$message\", \"mac\": $mac }")"

signature="$(openssl rsautl -sign -inkey $privkey -in <(echo "$data") |base64)"

wget -O - --post-data "data=$data&signature=$signature" http://$server

Notice that the signature process will fail if the message is too long.  In that case, a hash of the message should be used instead of the message itself.  We might then consider using dgst instead of rsautl.

I think the client should also send its public key, otherwise I don't know how the server can guess it  Wink

So basically, the last line should rather be:

Code:
wget -O - --post-data "data=$data&signature=$signature&pubkey=$(openssl rsa -pubout -in $privkey)" http://$server
2565  Bitcoin / Bitcoin Discussion / Re: BITCOIN IS AVAILABLE ON DEBIAN SID !!!!! on: February 25, 2011, 07:58:53 AM
I installed the package on my server, but I have no idea where the program was installed.  I'm a bit of a Debian newb, so maybe it is obvious, but how do I run bitcoind and set up the config file like it talks about here:

https://en.bitcoin.it/wiki/API_tutorial_%28JSON-RPC%29

Thanks to anyone who can help me Smiley

Personnally I stick with the bitcoin.org tarball install, but I guess that once you've installed the bitcoin-cli package, all you have to do is to run "bitcoind".

What message do you get when you try that?
2566  Economy / Economics / Re: Bitcoin's immunity to government action on: February 25, 2011, 07:30:13 AM
Some people will NEVER sell their bitcoin to the gov...like me! Cheesy

Me too!!! NEVER NEVER NEVER Cheesy

Well, I might sell them a few bitcoins.  If the government is giving me 1kg of gold per BTC.
2567  Bitcoin / Bitcoin Discussion / Is bitcoin a "private" currency? on: February 25, 2011, 06:24:27 AM

I think it is wrong to call bitcoin a "private" currency.

On the contrary, imo bitcoin is much more of a public currency that any national currency is.
2568  Bitcoin / Bitcoin Discussion / Re: Is Satoshi Alive? Thread on: February 25, 2011, 06:03:33 AM
I keep thinking Satoshi Nakamoto is his real name.
2569  Bitcoin / Development & Technical Discussion / Re: A full shell script implementation of bitcoin ? on: February 24, 2011, 02:01:01 PM
What is it with you and bash scripts?  Roll Eyes
Can you do nothing else?


Well actually, no, I can't.  I'm not good at anything else indeed.

I'm not a very good programmer and bash is the only language in which I manage to do usefull stuffs.


2570  Bitcoin / Bitcoin Discussion / Re: A simple application to backup your wallet in Dropbox and Gmail [scam] on: February 24, 2011, 01:24:34 PM

I'd like to show off my own bash script:

Code:
#!/bin/bash

name=grondilu
sftp_address=grondilu@somewhere.fr
email=grondilu@nospam.fr
bluetoothaddr="00:XX:YY:ZZ:UU:TT"

private="$HOME/Private"
backup="wallet-$(date +%s).dat"

error() {
    echo $1 returned error code $2
    rm -f $private/"$backup"{,.gpg}
    exit $2
}

if
    echo -n "making backup file..."
    bitcoind backupwallet "$private/$backup"
    r=$? ; ((r != 0))
then error bitcoind $r
elif
    echo ok
    cd $private
    echo -n "encrypting..."
    gpg -e -r $name "$backup"
    r=$? ; ((r != 0))
then error gpg $r
elif
    echo ok
    rm "$backup"
    echo -n "copying to distant server..."
    scp "$backup.gpg" $sftp_address:
    r=$? ; ((r != 0))
then error scp $r
elif
    echo ok
    echo -n "adding to distant archive..."
    ssh $sftp_address <<< "tar rf wallet-backup.tar $backup.gpg && rm $backup.gpg"
    r=$? ; ((r != 0))
then error ssh $r
elif
    echo ok
    echo -n "copying to smartphone..."
    obexftp -b "$bluetoothaddr" -c /Data/backups -p "$backup.gpg"
    r=$? ; ((r != 0))
then error obexftp $r
elif
    echo ok
    echo -n "sending backup via email..."
    mutt $email -s backup -a $backup.gpg < /dev/null
    r=$? ; ((r != 0))
then error mutt $r
else
    echo ok
    rm "$backup.gpg"
fi


2571  Bitcoin / Development & Technical Discussion / MongoDB on: February 24, 2011, 11:30:27 AM

I know a bit about this software and I think it's pretty cool.  I really would like to see an implementation of bitcoin using this as a database handler.


One of the reason why I think it would fit bitcoin nicely is the fact that mongodb uses JSON directly to represent data.   An other reason is that it is very easy to connect to an other mongodb on the net.  Thus, the network handling would be easy.

Also, it's very easy to handle from a bash script.


www.mongodb.org
2572  Economy / Marketplace / Re: 5 ssh accounts available for 6BTC/Month on: February 23, 2011, 05:01:00 PM
Users have web directories, yours is here http://109.75.176.245/~grondilu/

Ok, that's cool.  How can I do CGI?
2573  Economy / Economics / Re: Distribution of Wealth on: February 23, 2011, 03:15:42 PM
No one has any obligation to tell the world the size of their trades after the fact let alone before.

+1
2574  Economy / Marketplace / Re: 5 ssh accounts available for 6BTC/Month on: February 23, 2011, 02:03:52 PM

I see that you don't run any web server.   Could you, please?

If you don't want to run Apache, please consider installing thttpd, which is pretty easy and fast to install.

Then I guess it would be easy to serve any www directory for each user.

2575  Economy / Economics / Re: Distribution of Wealth on: February 23, 2011, 11:39:00 AM

The amount of money you own is definitely NOT related to your wealth.  Rich people don't hoard large amounts of cash, unless they are stupid.

The golden rule in finance is diversification.  Rich people own things that money can buy, not money itself.

I'm a huge fan of bitcoin, and yet I don't own 5,400 BTC, though such an amount has probably passed through my wallet.
2576  Economy / Marketplace / Re: 5 ssh accounts available for 6BTC/Month on: February 23, 2011, 11:31:00 AM

I'm interested.

I understand we can't mine, but can we run a bitcoin client?
2577  Bitcoin / Project Development / A GnuPG based trading plateform on: February 23, 2011, 11:02:03 AM

This is my current project.

Basically it will be a trading plateform where your GnuPG key is used to send orders.

For instance, when you want to see your balance, you just enter your GnuPG ID, and the webserver returns the info ASCII encrypted.  This should also make automation very easy.

To make an order, you'll basically just have to sign a phrase such as:

SELL 1000 BTC @ 0.6 EUR/BTC

And post it in a textarea.


The webserver will NOT do any actual bitcoin or banking transfer.  It would be account based.

Deposit and withdrawal of bitcoins will be free but will have to be done manually.
Idem for withdrawals of Euros (I won't do USD).  You will NOT be able to deposit in euros, though.

To withdraw euros, you'll have to post your signed banking coordinates first.  You may also post a signed postal address, so that you receive bank notes in mail.  There might a small fee for this option.


I'll try to keep it as simple as possible, in the same style that my BTC/EUR exchange site.

I write it all in a bash CGI script.  Because I don't like PHP and I suck at any other web programming language.  Also, bash is universal, for almost everyone has one on his linux box.
2578  Economy / Marketplace / Re: I'm selling Reloadable Visa Debit cards for Bitcoin. on: February 23, 2011, 04:28:48 AM
I've replied to both emails. Smiley

Just want to let everyone know that I've received the card.  Haven't tried it yet, though.
2579  Bitcoin / Bitcoin Discussion / Re: A "real" Bitcoin on: February 22, 2011, 06:41:18 PM

Hopefully someone will soon compile bitcoin on a smartcard. 
2580  Bitcoin / Bitcoin Discussion / Re: Printing bitcoins, an implementation on: February 22, 2011, 04:38:02 PM
Interesting concept of a "bitcoin note".  I also like the design you suggested.

However, such a note is different from usual bank notes, since it has value only during a limited period of time.  Basically until someone redeem  the bitcoin on the address and transfer it to an other address.

That's why I think there should be a note saying what exactly this is.

Something like:

<< This is a private key of a bitcoin address which was holding 1 BTC at block number NNNN. >>
Pages: « 1 ... 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 [129] 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 206 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!