From 096a890097469304f2acb5f39cb1c7bc8269e5bb Mon Sep 17 00:00:00 2001 From: Han Lin Yap Date: Sun, 3 Jul 2011 15:24:47 +0200 Subject: [PATCH 01/42] Minor translation changes for latest build --- locale/sv/LC_MESSAGES/bitcoin.po | 473 +++++++++++++++---------------- 1 file changed, 234 insertions(+), 239 deletions(-) diff --git a/locale/sv/LC_MESSAGES/bitcoin.po b/locale/sv/LC_MESSAGES/bitcoin.po index fb46e154..dc635f31 100644 --- a/locale/sv/LC_MESSAGES/bitcoin.po +++ b/locale/sv/LC_MESSAGES/bitcoin.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 21:58+0100\n" -"PO-Revision-Date: 2011-06-14 09:01+0100\n" +"POT-Creation-Date: 2011-07-03 10:40+0100\n" +"PO-Revision-Date: 2011-07-03 15:13+0100\n" "Last-Translator: Codler \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,130 +11,133 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" "X-Poedit-Basepath: .\n" -"X-Poedit-Bookmarks: 35,145,-1,-1,-1,-1,-1,-1,-1,-1\n" "X-Poedit-SearchPath-0: ../../..\n" -#: ../../../init.cpp:141 +#: ../../../init.cpp:162 msgid "Bitcoin version" msgstr "Bitcoin version" -#: ../../../init.cpp:142 +#: ../../../init.cpp:163 msgid "Usage:" msgstr "Användning:" -#: ../../../init.cpp:144 +#: ../../../init.cpp:165 msgid "Send command to -server or bitcoind\n" msgstr "Skicka kommando till -server eller bitcoind\n" -#: ../../../init.cpp:145 +#: ../../../init.cpp:166 msgid "List commands\n" msgstr "Lista kommandon\n" -#: ../../../init.cpp:146 +#: ../../../init.cpp:167 msgid "Get help for a command\n" msgstr "Få hjälp om kommandon\n" -#: ../../../init.cpp:147 +#: ../../../init.cpp:168 msgid "Options:\n" msgstr "Val:\n" -#: ../../../init.cpp:148 +#: ../../../init.cpp:169 msgid "Specify configuration file (default: bitcoin.conf)\n" msgstr "Ange konfigurationsfil (standard: bitcoin.conf)\n" -#: ../../../init.cpp:149 +#: ../../../init.cpp:170 msgid "Specify pid file (default: bitcoind.pid)\n" msgstr "Ange pid-fil (standard: bitcoind.pid)\n" -#: ../../../init.cpp:150 +#: ../../../init.cpp:171 msgid "Generate coins\n" msgstr "Generera mynt\n" -#: ../../../init.cpp:151 +#: ../../../init.cpp:172 msgid "Don't generate coins\n" msgstr "Generera inte mynt\n" -#: ../../../init.cpp:152 +#: ../../../init.cpp:173 msgid "Start minimized\n" msgstr "Starta minimerad\n" -#: ../../../init.cpp:153 +#: ../../../init.cpp:174 msgid "Specify data directory\n" msgstr "Ange data mappen\n" -#: ../../../init.cpp:154 +#: ../../../init.cpp:175 +msgid "Specify connection timeout (in milliseconds)\n" +msgstr "Ange timeout för anslutning (i millisekunder)\n" + +#: ../../../init.cpp:176 msgid "Connect through socks4 proxy\n" msgstr "Anslut via socks4 proxy\n" -#: ../../../init.cpp:155 +#: ../../../init.cpp:177 msgid "Allow DNS lookups for addnode and connect\n" msgstr "Tillåt DNS uppslagningar för addnode och connect\n" -#: ../../../init.cpp:156 +#: ../../../init.cpp:178 msgid "Add a node to connect to\n" msgstr "Lägg till en nod att ansluta till\n" -#: ../../../init.cpp:157 +#: ../../../init.cpp:179 msgid "Connect only to the specified node\n" msgstr "Anslut endast till specifik nod\n" -#: ../../../init.cpp:158 +#: ../../../init.cpp:180 msgid "Don't accept connections from outside\n" msgstr "Acceptera ej anslutningar från utsidan\n" -#: ../../../init.cpp:161 +#: ../../../init.cpp:183 msgid "Don't attempt to use UPnP to map the listening port\n" msgstr "Försöker inte använda UPnP till avslyssningsport\n" -#: ../../../init.cpp:163 +#: ../../../init.cpp:185 msgid "Attempt to use UPnP to map the listening port\n" msgstr "Försöker använda UPnP till avlyssningsport\n" -#: ../../../init.cpp:166 +#: ../../../init.cpp:188 msgid "Fee per KB to add to transactions you send\n" msgstr "Avgift per KB som läggs på transaktionen när du sänder\n" -#: ../../../init.cpp:168 +#: ../../../init.cpp:190 msgid "Accept command line and JSON-RPC commands\n" msgstr "Accepterar kommandorad och JSON-RPC kommando\n" -#: ../../../init.cpp:171 +#: ../../../init.cpp:193 msgid "Run in the background as a daemon and accept commands\n" msgstr "Kör i bakgrund som daemon och accepterar kommando\n" -#: ../../../init.cpp:173 +#: ../../../init.cpp:195 msgid "Use the test network\n" msgstr "Använd test nätverk\n" -#: ../../../init.cpp:174 +#: ../../../init.cpp:196 msgid "Username for JSON-RPC connections\n" msgstr "Användarnamn till JSON-RPC anslutning\n" -#: ../../../init.cpp:175 +#: ../../../init.cpp:197 msgid "Password for JSON-RPC connections\n" msgstr "Lösenord till JSON-RPC anslutning\n" -#: ../../../init.cpp:176 +#: ../../../init.cpp:198 msgid "Listen for JSON-RPC connections on (default: 8332)\n" msgstr "Lyssnar på JSON-RPC anslutningar på (standard: 8332)\n" -#: ../../../init.cpp:177 +#: ../../../init.cpp:199 msgid "Allow JSON-RPC connections from specified IP address\n" msgstr "Tillåt JSON-RPC anslutningar från specifik IP-adress\n" -#: ../../../init.cpp:178 +#: ../../../init.cpp:200 msgid "Send commands to node running on (default: 127.0.0.1)\n" msgstr "Skicka kommando till noden som körs på (standard: 127.0.0.1)\n" -#: ../../../init.cpp:179 +#: ../../../init.cpp:201 msgid "Set key pool size to (default: 100)\n" msgstr "Sätt nyckel pool storlek till (standard: 100)\n" -#: ../../../init.cpp:180 +#: ../../../init.cpp:202 msgid "Rescan the block chain for missing wallet transactions\n" msgstr "Scanna om block kedja efter saknade plånbokstransaktioner\n" -#: ../../../init.cpp:184 +#: ../../../init.cpp:206 msgid "" "\n" "SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n" @@ -142,106 +145,71 @@ msgstr "" "\n" "SSL val: (Se på Bitcoin Wiki för SSL installation instruktioner)\n" -#: ../../../init.cpp:185 +#: ../../../init.cpp:207 msgid "Use OpenSSL (https) for JSON-RPC connections\n" msgstr "Använd OpenSSL (https) till JSON-RPC anslutningar\n" -#: ../../../init.cpp:186 +#: ../../../init.cpp:208 msgid "Server certificate file (default: server.cert)\n" msgstr "Server certifikatfil (standard: server.cert)\n" -#: ../../../init.cpp:187 +#: ../../../init.cpp:209 msgid "Server private key (default: server.pem)\n" msgstr "Server privat nyckel (standard: server.pem)\n" -#: ../../../init.cpp:188 +#: ../../../init.cpp:210 msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n" msgstr "Acceptabla krypteringar (standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n" -#: ../../../init.cpp:192 +#: ../../../init.cpp:214 msgid "This help message\n" msgstr "Detta hjälpmeddelande\n" -#: ../../../init.cpp:329 +#: ../../../init.cpp:351 #, c-format msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running." msgstr "Kan inte sätta lås på data mappen %s. Bitcoin körs troligen redan." -#: ../../../init.cpp:355 +#: ../../../init.cpp:377 msgid "Error loading addr.dat \n" msgstr "Fel vid laddning av addr.dat \n" -#: ../../../init.cpp:361 +#: ../../../init.cpp:383 msgid "Error loading blkindex.dat \n" msgstr "Fel vid laddning av blkindex.dat \n" -#: ../../../init.cpp:368 +#: ../../../init.cpp:391 msgid "Error loading wallet.dat \n" msgstr "Fel vid laddning av wallet.dat \n" -#: ../../../init.cpp:448 +#: ../../../init.cpp:481 msgid "Invalid -proxy address" msgstr "Ogiltig -proxy adress" -#: ../../../init.cpp:471 +#: ../../../init.cpp:506 msgid "Invalid amount for -paytxfee=" msgstr "Ogiltig belopp på -paytxfee=" -#: ../../../init.cpp:475 +#: ../../../init.cpp:510 msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction." msgstr "Varning: -paytxfee är satt väldigt högt. Denna är transaktionsavgiften som du kommer att betala om du skickar en transaktion." -#: ../../../main.cpp:1866 +#: ../../../main.cpp:1430 msgid "Warning: Disk space is low " msgstr "Varning: Diskutrymme är låg " -#: ../../../main.cpp:3999 -#, c-format -msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds " -msgstr "Fel: Denna transaktion kräver en transaktionsavgift minst %s för dess belopp, komplexitet, eller användning av nyligen mottagna pengar " - -#: ../../../main.cpp:4001 -msgid "Error: Transaction creation failed " -msgstr "Fel: Misslyckades att skapa transaktion " - -#: ../../../main.cpp:4006 -#: ../../../ui.cpp:1951 -#: ../../../ui.cpp:1956 -#: ../../../ui.cpp:2102 -#: ../../../ui.cpp:2255 -msgid "Sending..." -msgstr "Skickar..." - -#: ../../../main.cpp:4010 -msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here." -msgstr "Fel: Transaktionen blev nekad. Detta kan hända om några av dina mynt i din plånbok var redan spenderad. Till exempel om du använde en kopia av wallet.dat och mynten var redan spenderad i kopian, men som inte var markerad som spenderad här." - -#: ../../../main.cpp:4023 -msgid "Invalid amount" -msgstr "Ogiltig belopp" - -#: ../../../main.cpp:4025 -#: ../../../ui.cpp:2169 -#: ../../../ui.cpp:2240 -msgid "Insufficient funds" -msgstr "Otillräckligt med pengar" - -#: ../../../main.cpp:4030 -msgid "Invalid bitcoin address" -msgstr "Ogiltig bitcoin adress" - -#: ../../../net.cpp:1505 +#: ../../../net.cpp:1598 #, c-format msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running." msgstr "Det gick inte att binda till port %d på denna dator. Bitcoin körs troligen redan." -#: ../../../rpc.cpp:1816 -#: ../../../rpc.cpp:1818 +#: ../../../rpc.cpp:1828 +#: ../../../rpc.cpp:1830 #, c-format msgid "To use the %s option" msgstr "För att använda %s val" -#: ../../../rpc.cpp:1820 +#: ../../../rpc.cpp:1832 #, c-format msgid "" "Warning: %s, you must set rpcpassword=\n" @@ -252,7 +220,7 @@ msgstr "" "i konfigurationsfilen: %s\n" "Om filen inte existerar, skapa med ägare med filbehörigheten -readable-only.\n" -#: ../../../rpc.cpp:1988 +#: ../../../rpc.cpp:2005 #, c-format msgid "" "You must set rpcpassword= in the configuration file:\n" @@ -263,347 +231,360 @@ msgstr "" "%s\n" "Om filen inte existerar, skapa med ägare med filbehörighete -readable-only." -#: ../../../ui.cpp:211 +#: ../../../ui.cpp:216 #, c-format msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?" msgstr "Denna transaktion är över storleksbegränsningen. Du kan fortfarande skicka mot en avgift på %s, som går till noderna som bearbetar din transaktion och hjälper att stödja nätverket. Vill du fortfarande betala avgiften?" -#: ../../../ui.cpp:311 +#: ../../../ui.cpp:316 msgid "Status" msgstr "Status" -#: ../../../ui.cpp:312 +#: ../../../ui.cpp:317 msgid "Date" msgstr "Datum" -#: ../../../ui.cpp:313 +#: ../../../ui.cpp:318 msgid "Description" msgstr "Beskrivning" -#: ../../../ui.cpp:314 +#: ../../../ui.cpp:319 msgid "Debit" -msgstr "Debitera" +msgstr "Debet" -#: ../../../ui.cpp:315 +#: ../../../ui.cpp:320 msgid "Credit" -msgstr "Kreditera" +msgstr "Kredit" -#: ../../../ui.cpp:521 +#: ../../../ui.cpp:526 #, c-format msgid "Open for %d blocks" -msgstr "Öppna för %d blocks" +msgstr "Öppen för %d block" -#: ../../../ui.cpp:523 +#: ../../../ui.cpp:528 #, c-format msgid "Open until %s" msgstr "Öppen tills %s" -#: ../../../ui.cpp:529 +#: ../../../ui.cpp:534 #, c-format msgid "%d/offline?" msgstr "%d/offline?" -#: ../../../ui.cpp:531 +#: ../../../ui.cpp:536 #, c-format msgid "%d/unconfirmed" msgstr "%d/obekräftade" -#: ../../../ui.cpp:533 +#: ../../../ui.cpp:538 #, c-format msgid "%d confirmations" msgstr "%d bekräftelser" -#: ../../../ui.cpp:618 +#: ../../../ui.cpp:623 msgid "Generated" msgstr "Genererad" -#: ../../../ui.cpp:626 -#, fuzzy, c-format +#: ../../../ui.cpp:631 +#, c-format msgid "Generated (%s matures in %d more blocks)" -msgstr "Genererad (%s mogna i %d fler block)" +msgstr "Genererad (%s mognar om %d block)" -#: ../../../ui.cpp:630 +#: ../../../ui.cpp:635 msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!" msgstr "Genererad - Varning: Denna block har inte blivit mottagen av någon annan nod och kommer troligtvis inte bli accepterad" -#: ../../../ui.cpp:634 +#: ../../../ui.cpp:639 msgid "Generated (not accepted)" msgstr "Genererad (ej accepterad)" -#: ../../../ui.cpp:644 +#: ../../../ui.cpp:649 msgid "From: " msgstr "Från: " -#: ../../../ui.cpp:668 +#: ../../../ui.cpp:673 msgid "Received with: " msgstr "Mottagen med: " -#: ../../../ui.cpp:714 +#: ../../../ui.cpp:719 msgid "Payment to yourself" msgstr "Betalning till dig själv" -#: ../../../ui.cpp:748 +#: ../../../ui.cpp:753 msgid "To: " msgstr "Till: " -#: ../../../ui.cpp:1063 +#: ../../../ui.cpp:1068 msgid " Generating" msgstr " Generering" -#: ../../../ui.cpp:1065 +#: ../../../ui.cpp:1070 msgid "(not connected)" msgstr "(inte ansluten)" -#: ../../../ui.cpp:1068 +#: ../../../ui.cpp:1073 #, c-format msgid " %d connections %d blocks %d transactions" msgstr " %d anslutningar %d block %d transaktioner" -#: ../../../ui.cpp:1173 -#: ../../../ui.cpp:2566 +#: ../../../ui.cpp:1178 +#: ../../../ui.cpp:2577 msgid "New Receiving Address" msgstr "Ny Mottagningsadress" -#: ../../../ui.cpp:1174 -#: ../../../ui.cpp:2567 +#: ../../../ui.cpp:1179 +#: ../../../ui.cpp:2578 msgid "" "You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" -"Du borde använda en ny adress för varje betalning som du mottar.\n" +"Du borde använda en ny adress för varje betalning som du mottagit.\n" "\n" "Etikett" -#: ../../../ui.cpp:1246 +#: ../../../ui.cpp:1252 msgid "Status: " msgstr "Status: " -#: ../../../ui.cpp:1251 +#: ../../../ui.cpp:1257 msgid ", has not been successfully broadcast yet" -msgstr ", has not been successfully broadcast yet" +msgstr ", har inte lyckats broadcast än" -#: ../../../ui.cpp:1253 +#: ../../../ui.cpp:1259 #, c-format msgid ", broadcast through %d node" msgstr ", broadcast genom %d nod" -#: ../../../ui.cpp:1255 +#: ../../../ui.cpp:1261 #, c-format msgid ", broadcast through %d nodes" msgstr ", broadcast genom %d noder" -#: ../../../ui.cpp:1259 +#: ../../../ui.cpp:1265 msgid "Date: " msgstr "Datum: " -#: ../../../ui.cpp:1267 +#: ../../../ui.cpp:1273 msgid "Source: Generated
" msgstr "Källa: Genererad
" -#: ../../../ui.cpp:1273 -#: ../../../ui.cpp:1291 +#: ../../../ui.cpp:1279 +#: ../../../ui.cpp:1297 msgid "From: " msgstr "Från: " -#: ../../../ui.cpp:1291 +#: ../../../ui.cpp:1297 msgid "unknown" msgstr "okänd" -#: ../../../ui.cpp:1292 -#: ../../../ui.cpp:1316 -#: ../../../ui.cpp:1375 +#: ../../../ui.cpp:1298 +#: ../../../ui.cpp:1322 +#: ../../../ui.cpp:1381 msgid "To: " msgstr "Till: " -#: ../../../ui.cpp:1295 +#: ../../../ui.cpp:1301 msgid " (yours, label: " msgstr " (din, etikett: " -#: ../../../ui.cpp:1297 +#: ../../../ui.cpp:1303 msgid " (yours)" msgstr " (ditt)" -#: ../../../ui.cpp:1334 -#: ../../../ui.cpp:1346 -#: ../../../ui.cpp:1392 -#: ../../../ui.cpp:1409 +#: ../../../ui.cpp:1340 +#: ../../../ui.cpp:1352 +#: ../../../ui.cpp:1398 +#: ../../../ui.cpp:1415 msgid "Credit: " msgstr "Kredit: " -#: ../../../ui.cpp:1336 -#, fuzzy, c-format +#: ../../../ui.cpp:1342 +#, c-format msgid "(%s matures in %d more blocks)" -msgstr "(%s matures in %d more blocks)" +msgstr "(%s mognar om %d block)" -#: ../../../ui.cpp:1338 +#: ../../../ui.cpp:1344 msgid "(not accepted)" msgstr "(ej accepterad)" -#: ../../../ui.cpp:1383 -#: ../../../ui.cpp:1391 -#: ../../../ui.cpp:1406 +#: ../../../ui.cpp:1389 +#: ../../../ui.cpp:1397 +#: ../../../ui.cpp:1412 msgid "Debit: " -msgstr "Debit: " +msgstr "Debet: " -#: ../../../ui.cpp:1397 +#: ../../../ui.cpp:1403 msgid "Transaction fee: " msgstr "Transaktionsavgift: " -#: ../../../ui.cpp:1413 -#, fuzzy +#: ../../../ui.cpp:1419 msgid "Net amount: " msgstr "Nät belopp: " -#: ../../../ui.cpp:1420 +#: ../../../ui.cpp:1426 msgid "Message:" msgstr "Meddelande:" -#: ../../../ui.cpp:1422 +#: ../../../ui.cpp:1428 msgid "Comment:" msgstr "Kommentar:" -#: ../../../ui.cpp:1425 +#: ../../../ui.cpp:1431 msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours." msgstr "Genererad mynt måste vänta 120 block innan dem kan användas.När du genererat denna block, skickades en broadcast till nätet och lades till block kedjan. Om den misslyckas att lägga till kedjan så kommer det ändras till \"not accepted\" och är icke brukbar. Detta kan hända om en annan nod genererat en block några sekunder efter din." -#: ../../../ui.cpp:1605 +#: ../../../ui.cpp:1611 msgid "Cannot write autostart/bitcoin.desktop file" msgstr "Kan inte skriva autostart/bitcoin.desktop fil" -#: ../../../ui.cpp:1641 +#: ../../../ui.cpp:1647 msgid "Main" -msgstr "Huvud" +msgstr "Allmänt" -#: ../../../ui.cpp:1651 +#: ../../../ui.cpp:1657 msgid "&Start Bitcoin on window system startup" -msgstr "&Starta Bitcoin vid uppstart i windows" +msgstr "&Starta Bitcoin vid system uppstart" -#: ../../../ui.cpp:1658 +#: ../../../ui.cpp:1664 msgid "&Minimize on close" msgstr "&Minimera vid stängning" -#: ../../../ui.cpp:1800 +#: ../../../ui.cpp:1806 #, c-format msgid "version %s" msgstr "version %s" -#: ../../../ui.cpp:1923 +#: ../../../ui.cpp:1929 msgid "Error in amount " msgstr "Fel i belopp " -#: ../../../ui.cpp:1923 -#: ../../../ui.cpp:1928 -#: ../../../ui.cpp:1933 -#: ../../../ui.cpp:1968 +#: ../../../ui.cpp:1929 +#: ../../../ui.cpp:1934 +#: ../../../ui.cpp:1939 +#: ../../../ui.cpp:1974 #: ../../../uibase.cpp:55 msgid "Send Coins" msgstr "Skicka mynt" -#: ../../../ui.cpp:1928 +#: ../../../ui.cpp:1934 msgid "Amount exceeds your balance " msgstr "Belopp överskrider din balans " -#: ../../../ui.cpp:1933 +#: ../../../ui.cpp:1939 msgid "Total exceeds your balance when the " -msgstr "Totals överskrider din balans när " +msgstr "Totalt överskrider din balans när " -#: ../../../ui.cpp:1933 +#: ../../../ui.cpp:1939 msgid " transaction fee is included " msgstr " transaktionsavgift är inkluderad " -#: ../../../ui.cpp:1951 +#: ../../../ui.cpp:1957 msgid "Payment sent " msgstr "Betalning skickad " -#: ../../../ui.cpp:1968 +#: ../../../ui.cpp:1957 +#: ../../../ui.cpp:1962 +#: ../../../ui.cpp:2108 +#: ../../../ui.cpp:2261 +#: ../../../wallet.cpp:924 +msgid "Sending..." +msgstr "Skickar..." + +#: ../../../ui.cpp:1974 msgid "Invalid address " msgstr "Ogiltig adress " -#: ../../../ui.cpp:2023 +#: ../../../ui.cpp:2029 #, c-format msgid "Sending %s to %s" msgstr "Skickar %s till %s" -#: ../../../ui.cpp:2096 -#: ../../../ui.cpp:2129 +#: ../../../ui.cpp:2102 +#: ../../../ui.cpp:2135 msgid "CANCELLED" msgstr "AVBRUTEN" -#: ../../../ui.cpp:2100 +#: ../../../ui.cpp:2106 msgid "Cancelled" msgstr "Avbruten" -#: ../../../ui.cpp:2102 +#: ../../../ui.cpp:2108 msgid "Transfer cancelled " msgstr "Överföring avbruten " -#: ../../../ui.cpp:2155 +#: ../../../ui.cpp:2161 msgid "Error: " msgstr "Fel: " -#: ../../../ui.cpp:2174 +#: ../../../ui.cpp:2175 +#: ../../../ui.cpp:2246 +#: ../../../wallet.cpp:943 +msgid "Insufficient funds" +msgstr "Otillräckligt med pengar" + +#: ../../../ui.cpp:2180 msgid "Connecting..." msgstr "Ansluter..." -#: ../../../ui.cpp:2179 +#: ../../../ui.cpp:2185 msgid "Unable to connect" msgstr "Det gick inte att ansluta" -#: ../../../ui.cpp:2184 +#: ../../../ui.cpp:2190 msgid "Requesting public key..." msgstr "Efterfrågar publik nyckel..." -#: ../../../ui.cpp:2196 +#: ../../../ui.cpp:2202 msgid "Received public key..." msgstr "Mottagen publik nyckel..." -#: ../../../ui.cpp:2210 +#: ../../../ui.cpp:2216 msgid "Recipient is not accepting transactions sent by IP address" msgstr "Mottagaren accepterar inte transaktioner skickat från IP adress" -#: ../../../ui.cpp:2212 +#: ../../../ui.cpp:2218 msgid "Transfer was not accepted" msgstr "Överföringen var inte accepterad" -#: ../../../ui.cpp:2221 +#: ../../../ui.cpp:2227 msgid "Invalid response received" msgstr "Ogiltig respons mottagen" -#: ../../../ui.cpp:2236 +#: ../../../ui.cpp:2242 msgid "Creating transaction..." msgstr "Skapar transation..." -#: ../../../ui.cpp:2248 +#: ../../../ui.cpp:2254 #, c-format msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds" msgstr "Denna transaktion kräver en transaktionsavgift minst %s för dess belopp, komplexitet, eller användning av nyligen mottagna pengar" -#: ../../../ui.cpp:2250 +#: ../../../ui.cpp:2256 msgid "Transaction creation failed" msgstr "Misslyckades skapa transaktion" -#: ../../../ui.cpp:2257 +#: ../../../ui.cpp:2263 msgid "Transaction aborted" msgstr "Transaktion avbruten" -#: ../../../ui.cpp:2265 +#: ../../../ui.cpp:2271 msgid "Lost connection, transaction cancelled" msgstr "Förlorad anslutning, transaktionen avbruten" -#: ../../../ui.cpp:2281 +#: ../../../ui.cpp:2287 msgid "Sending payment..." msgstr "Skickar betalning..." -#: ../../../ui.cpp:2287 +#: ../../../ui.cpp:2293 msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here." msgstr "Transaktionen blev nekad. Detta kan hända om några av dina mynt i din plånbok var redan spenderad. Till exempel om du använde en kopia av wallet.dat och mynten var redan spenderad i kopian, men som inte var markerad som spenderad här." -#: ../../../ui.cpp:2296 +#: ../../../ui.cpp:2302 msgid "Waiting for confirmation..." msgstr "Väntar på bekräftelse..." -#: ../../../ui.cpp:2314 +#: ../../../ui.cpp:2320 msgid "" "The payment was sent, but the recipient was unable to verify it.\n" "The transaction is recorded and will credit to the recipient,\n" @@ -613,84 +594,84 @@ msgstr "" "Transaktionen är registrerad och kommer att kreditera mottagaren,\n" "men kommentar informationen kommer att vara tom." -#: ../../../ui.cpp:2323 +#: ../../../ui.cpp:2329 msgid "Payment was sent, but an invalid response was received" msgstr "Betalning var skickad, men en ogiltig respons var mottagen" -#: ../../../ui.cpp:2329 +#: ../../../ui.cpp:2335 msgid "Payment completed" msgstr "Betalning slutförd" -#: ../../../ui.cpp:2371 -#: ../../../ui.cpp:2517 -#: ../../../ui.cpp:2554 +#: ../../../ui.cpp:2377 +#: ../../../ui.cpp:2525 +#: ../../../ui.cpp:2565 msgid "Name" msgstr "Namn" -#: ../../../ui.cpp:2372 -#: ../../../ui.cpp:2517 -#: ../../../ui.cpp:2554 +#: ../../../ui.cpp:2378 +#: ../../../ui.cpp:2525 +#: ../../../ui.cpp:2565 msgid "Address" msgstr "Adress" -#: ../../../ui.cpp:2374 -#: ../../../ui.cpp:2529 +#: ../../../ui.cpp:2380 +#: ../../../ui.cpp:2537 msgid "Label" msgstr "Etikett" -#: ../../../ui.cpp:2375 +#: ../../../ui.cpp:2381 #: ../../../uibase.cpp:837 msgid "Bitcoin Address" msgstr "Bitcoin Adress" -#: ../../../ui.cpp:2499 +#: ../../../ui.cpp:2507 msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. " msgstr "Denna är en av dina egna adresser för mottagning av betalningar och kan inte slås in i adressboken. " -#: ../../../ui.cpp:2517 -#: ../../../ui.cpp:2523 +#: ../../../ui.cpp:2525 +#: ../../../ui.cpp:2531 msgid "Edit Address" msgstr "Ändra Adress" -#: ../../../ui.cpp:2529 +#: ../../../ui.cpp:2537 msgid "Edit Address Label" msgstr "Ändra Address Etikett" -#: ../../../ui.cpp:2554 -#: ../../../ui.cpp:2560 +#: ../../../ui.cpp:2565 +#: ../../../ui.cpp:2571 msgid "Add Address" msgstr "Lägg till Adress" -#: ../../../ui.cpp:2637 +#: ../../../ui.cpp:2649 msgid "Bitcoin" msgstr "Bitcoin" -#: ../../../ui.cpp:2639 +#: ../../../ui.cpp:2651 msgid "Bitcoin - Generating" msgstr "Bitcoin - Genererar" -#: ../../../ui.cpp:2641 +#: ../../../ui.cpp:2653 msgid "Bitcoin - (not connected)" msgstr "Bitcoin - (ej ansluten)" -#: ../../../ui.cpp:2720 +#: ../../../ui.cpp:2732 msgid "&Open Bitcoin" msgstr "&Öppna Bitcoin" -#: ../../../ui.cpp:2721 +#: ../../../ui.cpp:2733 msgid "&Send Bitcoins" msgstr "&Skicka Bitcoins" -#: ../../../ui.cpp:2722 +#: ../../../ui.cpp:2734 msgid "O&ptions..." msgstr "&Inställningar..." -#: ../../../ui.cpp:2725 +#: ../../../ui.cpp:2737 #: ../../../uibase.cpp:25 msgid "E&xit" msgstr "&Avsluta" -#: ../../../ui.cpp:2951 +#: ../../../ui.cpp:2963 msgid "Program has crashed and will terminate. " msgstr "Programmet har krachat och kommer att avslutas. " @@ -791,7 +772,6 @@ msgid "&Minimize to the tray instead of the taskbar" msgstr "&Minimerar till systemfältet istället för aktivitetsfält" #: ../../../uibase.cpp:351 -#, fuzzy msgid "Map port using &UPnP" msgstr "Mapp port använder &UPnP" @@ -812,9 +792,8 @@ msgid " &Port:" msgstr " &Port:" #: ../../../uibase.cpp:392 -#, fuzzy msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended." -msgstr "Frivillig transaktionsavgift per KB som garanterar att din transaktion bearbetas snabbt. Flesta transaktioner är 1KB. Most transactions are 1KB. Avgift 0.01 rekommenderas." +msgstr "Frivillig transaktionsavgift per KB som garanterar att din transaktion bearbetas snabbt. Flesta transaktioner är 1KB. Avgift 0.01 rekommenderas." #: ../../../uibase.cpp:399 msgid "Pay transaction fee:" @@ -850,7 +829,6 @@ msgid "version" msgstr "version" #: ../../../uibase.cpp:525 -#, fuzzy msgid "" "Copyright (c) 2009-2011 Bitcoin Developers\n" "\n" @@ -865,14 +843,16 @@ msgid "" msgstr "" "Copyright (c) 2009-2011 Bitcoin Developers\n" "\n" -"This is experimental software.\n" +"Detta är en experimentell mjukvara.\n" "\n" -"Distributed under the MIT/X11 software license, see the accompanying file \n" -"license.txt or http://www.opensource.org/licenses/mit-license.php.\n" +"Distribuerad under MIT/X11 mjukvarulicens, se medföljande fil \n" +"license.txt eller http://www.opensource.org/licenses/mit-license.php.\n" "\n" -"This product includes software developed by the OpenSSL Project for use in the \n" -"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n" -"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard." +"Denna produkt inkluderar mjukvara utvecklad av OpenSSL Project för användning i \n" +"OpenSSL Toolkit (http://www.openssl.org/) och kryptografisk mjukvara skriven av \n" +"Eric Young (eay@cryptsoft.com) och UPnP mjukvara skriven av Thomas Bernard.\n" +"\n" +"Översatt av Han Lin Yap." #: ../../../uibase.cpp:581 msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)" @@ -895,9 +875,8 @@ msgid "&Amount:" msgstr "&Belopp:" #: ../../../uibase.cpp:630 -#, fuzzy msgid "T&ransfer:" -msgstr "T&ransfer:" +msgstr "&Överföring:" #: ../../../uibase.cpp:636 msgid " Standard" @@ -918,9 +897,8 @@ msgstr "" "Ansluter..." #: ../../../uibase.cpp:761 -#, fuzzy msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window." -msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du rekommenderas att ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen är visar i huvudfönstret." +msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du rekommenderas att ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen visas i huvudfönstret." #: ../../../uibase.cpp:774 #: ../../../uibase.cpp:886 @@ -937,9 +915,8 @@ msgid "Sending" msgstr "Skickar" #: ../../../uibase.cpp:857 -#, fuzzy msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window." -msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du kan ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen är visar i huvudfönstret." +msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du kan ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen visas i huvudfönstret." #: ../../../uibase.cpp:870 msgid "Receiving" @@ -949,15 +926,35 @@ msgstr "Mottagning" msgid "&Delete" msgstr "&Ta bort" -#: ../../../util.cpp:866 -#, fuzzy +#: ../../../util.cpp:874 msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly." -msgstr "Varning: Var god och kolla att din dator har rätt datum och klockslag. Om din klocka är fel så kommer Bitcoin inte att fungera." +msgstr "Varning: Var god och kolla att din dator har rätt datum och klockslag. Om din klocka är fel så kommer Bitcoin inte att fungera ordentligt." -#: ../../../util.cpp:899 +#: ../../../util.cpp:908 msgid "beta" msgstr "beta" +#: ../../../wallet.cpp:917 +#, c-format +msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds " +msgstr "Fel: Denna transaktion kräver en transaktionsavgift minst %s för dess belopp, komplexitet, eller användning av nyligen mottagna pengar " + +#: ../../../wallet.cpp:919 +msgid "Error: Transaction creation failed " +msgstr "Fel: Misslyckades att skapa transaktion " + +#: ../../../wallet.cpp:928 +msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here." +msgstr "Fel: Transaktionen blev nekad. Detta kan hända om några av dina mynt i din plånbok var redan spenderad. Till exempel om du använde en kopia av wallet.dat och mynten var redan spenderad i kopian, men som inte var markerad som spenderad här." + +#: ../../../wallet.cpp:941 +msgid "Invalid amount" +msgstr "Ogiltig belopp" + +#: ../../../wallet.cpp:948 +msgid "Invalid bitcoin address" +msgstr "Ogiltig bitcoin adress" + #: ../../../uibase.h:147 msgid "Transaction Details" msgstr "Transaktion detaljer" @@ -974,5 +971,3 @@ msgstr "Om Bitcoin" msgid "Your Bitcoin Addresses" msgstr "Dina Bitcoin Adresser" -#~ msgid " beta" -#~ msgstr " beta" From 7ec552676c66488fe00fb503d02ec4a389a715b7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 5 Jul 2011 03:06:19 +0200 Subject: [PATCH 02/42] Add minversion to wallet. --- src/db.cpp | 15 +++++++++++---- src/db.h | 9 ++++++++- src/init.cpp | 12 ++++++++++-- src/wallet.cpp | 5 +++-- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index f044355a..9e13727a 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -670,7 +670,7 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, listvchDefaultKey.clear(); int nFileVersion = 0; @@ -690,7 +690,7 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) // Get cursor Dbc* pcursor = GetCursor(); if (!pcursor) - return false; + return DB_CORRUPT; loop { @@ -701,7 +701,7 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) if (ret == DB_NOTFOUND) break; else if (ret != 0) - return false; + return DB_CORRUPT; // Unserialize // Taking advantage of the fact that pair serialization @@ -809,6 +809,13 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) if (strKey == "addrProxy") ssValue >> addrProxy; if (fHaveUPnP && strKey == "fUseUPnP") ssValue >> fUseUPnP; } + else if (strType == "minversion") + { + int nMinVersion = 0; + ssValue >> nMinVersion; + if (nMinVersion > VERSION) + return DB_TOO_NEW; + } } pcursor->close(); } @@ -839,7 +846,7 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) } - return true; + return DB_LOAD_OK; } void ThreadFlushWalletDB(void* parg) diff --git a/src/db.h b/src/db.h index b89b34e0..b9101112 100644 --- a/src/db.h +++ b/src/db.h @@ -342,6 +342,13 @@ public: +enum DBErrors +{ + DB_LOAD_OK, + DB_CORRUPT, + DB_TOO_NEW +}; + class CWalletDB : public CDB { public: @@ -450,7 +457,7 @@ public: int64 GetAccountCreditDebit(const std::string& strAccount); void ListAccountCreditDebit(const std::string& strAccount, std::list& acentries); - bool LoadWallet(CWallet* pwallet); + int LoadWallet(CWallet* pwallet); }; #endif diff --git a/src/init.cpp b/src/init.cpp index 635799cc..beaad688 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -387,8 +387,16 @@ bool AppInit2(int argc, char* argv[]) nStart = GetTimeMillis(); bool fFirstRun; pwalletMain = new CWallet("wallet.dat"); - if (!pwalletMain->LoadWallet(fFirstRun)) - strErrors += _("Error loading wallet.dat \n"); + int nLoadWalletRet = pwalletMain->LoadWallet(fFirstRun); + if (nLoadWalletRet != DB_LOAD_OK) + { + if (nLoadWalletRet == DB_CORRUPT) + strErrors += _("Error loading wallet.dat: Wallet corrupted \n"); + else if (nLoadWalletRet == DB_TOO_NEW) + strErrors += _("Error loading wallet.dat: Wallet requires newer version of Bitcoin \n"); + else + strErrors += _("Error loading wallet.dat \n"); + } printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); RegisterWallet(pwalletMain); diff --git a/src/wallet.cpp b/src/wallet.cpp index e54bbb3f..ba9221f1 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -958,8 +958,9 @@ bool CWallet::LoadWallet(bool& fFirstRunRet) if (!fFileBacked) return false; fFirstRunRet = false; - if (!CWalletDB(strWalletFile,"cr+").LoadWallet(this)) - return false; + int nLoadWalletRet = CWalletDB(strWalletFile,"cr+").LoadWallet(this); + if (nLoadWalletRet != DB_LOAD_OK) + return nLoadWalletRet; fFirstRunRet = vchDefaultKey.empty(); if (!mapKeys.count(vchDefaultKey)) From acd6501610817eee0bd1c8ea9c591f043affbaec Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 25 Jun 2011 14:57:32 +0200 Subject: [PATCH 03/42] Prepare codebase for Encrypted Keys. --- src/db.cpp | 18 +++++--- src/init.cpp | 1 - src/key.h | 70 ++++++++++++++++++++++++++++++- src/keystore.cpp | 107 ++++++++++++++++++++++++++++++++++++++++++----- src/keystore.h | 89 +++++++++++++++++++++++++++++++++++++-- src/script.cpp | 2 +- src/ui.cpp | 2 +- src/wallet.cpp | 9 ++-- src/wallet.h | 5 ++- 9 files changed, 274 insertions(+), 29 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index f044355a..c479a452 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -685,7 +685,7 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) //// todo: shouldn't we catch exceptions and try to recover and continue? CRITICAL_BLOCK(pwallet->cs_mapWallet) - CRITICAL_BLOCK(pwallet->cs_mapKeys) + CRITICAL_BLOCK(pwallet->cs_KeyStore) { // Get cursor Dbc* pcursor = GetCursor(); @@ -765,14 +765,20 @@ bool CWalletDB::LoadWallet(CWallet* pwallet) { vector vchPubKey; ssKey >> vchPubKey; - CWalletKey wkey; + CKey key; if (strType == "key") - ssValue >> wkey.vchPrivKey; + { + CPrivKey pkey; + ssValue >> pkey; + key.SetPrivKey(pkey); + } else + { + CWalletKey wkey; ssValue >> wkey; - - pwallet->mapKeys[vchPubKey] = wkey.vchPrivKey; - mapPubKeys[Hash160(vchPubKey)] = vchPubKey; + key.SetPrivKey(wkey.vchPrivKey); + } + pwallet->LoadKey(key); } else if (strType == "defaultkey") { diff --git a/src/init.cpp b/src/init.cpp index 635799cc..21b40d51 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -416,7 +416,6 @@ bool AppInit2(int argc, char* argv[]) //// debug print printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size()); printf("nBestHeight = %d\n", nBestHeight); - printf("mapKeys.size() = %d\n", pwalletMain->mapKeys.size()); printf("setKeyPool.size() = %d\n", pwalletMain->setKeyPool.size()); printf("mapPubKeys.size() = %d\n", mapPubKeys.size()); printf("mapWallet.size() = %d\n", pwalletMain->mapWallet.size()); diff --git a/src/key.h b/src/key.h index c973d6eb..c0fce18b 100644 --- a/src/key.h +++ b/src/key.h @@ -31,6 +31,41 @@ // see www.keylength.com // script supports up to 75 for single byte push +int static inline EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key) +{ + int ok = 0; + BN_CTX *ctx = NULL; + EC_POINT *pub_key = NULL; + + if (!eckey) return 0; + + const EC_GROUP *group = EC_KEY_get0_group(eckey); + + if ((ctx = BN_CTX_new()) == NULL) + goto err; + + pub_key = EC_POINT_new(group); + + if (pub_key == NULL) + goto err; + + if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) + goto err; + + EC_KEY_set_private_key(eckey,priv_key); + EC_KEY_set_public_key(eckey,pub_key); + + ok = 1; + +err: + + if (pub_key) + EC_POINT_free(pub_key); + if (ctx != NULL) + BN_CTX_free(ctx); + + return(ok); +} class key_error : public std::runtime_error @@ -42,8 +77,7 @@ public: // secure_allocator is defined in serialize.h typedef std::vector > CPrivKey; - - +typedef std::vector > CSecret; class CKey { @@ -102,6 +136,38 @@ public: return true; } + bool SetSecret(const CSecret& vchSecret) + { + EC_KEY_free(pkey); + pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if (pkey == NULL) + throw key_error("CKey::SetSecret() : EC_KEY_new_by_curve_name failed"); + if (vchSecret.size() != 32) + throw key_error("CKey::SetSecret() : secret must be 32 bytes"); + BIGNUM *bn = BN_bin2bn(&vchSecret[0],32,BN_new()); + if (bn == NULL) + throw key_error("CKey::SetSecret() : BN_bin2bn failed"); + if (!EC_KEY_regenerate_key(pkey,bn)) + throw key_error("CKey::SetSecret() : EC_KEY_regenerate_key failed"); + BN_clear_free(bn); + fSet = true; + return true; + } + + CSecret GetSecret() const + { + CSecret vchRet; + vchRet.resize(32); + const BIGNUM *bn = EC_KEY_get0_private_key(pkey); + int nBytes = BN_num_bytes(bn); + if (bn == NULL) + throw key_error("CKey::GetSecret() : EC_KEY_get0_private_key failed"); + int n=BN_bn2bin(bn,&vchRet[32 - nBytes]); + if (n != nBytes) + throw key_error("CKey::GetSecret(): BN_bn2bin failed"); + return vchRet; + } + CPrivKey GetPrivKey() const { unsigned int nSize = i2d_ECPrivateKey(pkey, NULL); diff --git a/src/keystore.cpp b/src/keystore.cpp index 7dd045fe..765144a9 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -5,29 +5,116 @@ #include "headers.h" #include "db.h" - - -////////////////////////////////////////////////////////////////////////////// -// -// mapKeys -// - std::vector CKeyStore::GenerateNewKey() { RandAddSeedPerfmon(); CKey key; key.MakeNewKey(); if (!AddKey(key)) - throw std::runtime_error("GenerateNewKey() : AddKey failed"); + throw std::runtime_error("CKeyStore::GenerateNewKey() : AddKey failed"); return key.GetPubKey(); } -bool CKeyStore::AddKey(const CKey& key) +bool CBasicKeyStore::AddKey(const CKey& key) { - CRITICAL_BLOCK(cs_mapKeys) + CRITICAL_BLOCK(cs_KeyStore) { mapKeys[key.GetPubKey()] = key.GetPrivKey(); mapPubKeys[Hash160(key.GetPubKey())] = key.GetPubKey(); } + return true; +} + +bool CCryptoKeyStore::Unlock(const CMasterKey& vMasterKeyIn) +{ + if (!SetCrypted()) + return false; + + std::map, std::vector >::const_iterator mi = mapCryptedKeys.begin(); + for (; mi != mapCryptedKeys.end(); ++mi) + { + const std::vector &vchPubKey = (*mi).first; + const std::vector &vchCryptedSecret = (*mi).second; + CSecret vchSecret; + // decrypt vchCryptedSecret using vMasterKeyIn, into vchSecret + CKey key; + key.SetSecret(vchSecret); + if (key.GetPubKey() == vchPubKey) + break; + return false; + } + vMasterKey = vMasterKeyIn; + return true; +} + +bool CCryptoKeyStore::AddKey(const CKey& key) +{ + CRITICAL_BLOCK(cs_KeyStore) + { + if (!IsCrypted()) + return CBasicKeyStore::AddKey(key); + + if (IsLocked()) + return false; + + CSecret vchSecret = key.GetSecret(); + + std::vector vchCryptedSecret; + // encrypt vchSecret using vMasterKey, into vchCryptedSecret + + AddCryptedKey(key.GetPubKey(), vchCryptedSecret); + } + return true; +} + + +bool CCryptoKeyStore::AddCryptedKey(const std::vector &vchPubKey, const std::vector &vchCryptedSecret) +{ + CRITICAL_BLOCK(cs_KeyStore) + { + if (!SetCrypted()) + return false; + + mapCryptedKeys[vchPubKey] = vchCryptedSecret; + mapPubKeys[Hash160(vchPubKey)] = vchPubKey; + } + return true; +} + +bool CCryptoKeyStore::GetPrivKey(const std::vector &vchPubKey, CPrivKey& keyOut) const +{ + if (!IsCrypted()) + return CBasicKeyStore::GetPrivKey(vchPubKey, keyOut); + + std::map, std::vector >::const_iterator mi = mapCryptedKeys.find(vchPubKey); + if (mi != mapCryptedKeys.end()) + { + const std::vector &vchCryptedSecret = (*mi).second; + CSecret vchSecret; + // decrypt vchCryptedSecret using vMasterKey into vchSecret; + CKey key; + key.SetSecret(vchSecret); + keyOut = key.GetPrivKey(); + return true; + } + return false; } +bool CCryptoKeyStore::GenerateMasterKey() +{ + if (!mapCryptedKeys.empty()) + return false; + + RandAddSeedPerfmon(); + + vMasterKey.resize(32); + RAND_bytes(&vMasterKey[0], 32); + + if (!IsCrypted()) + { + // upgrade wallet + fUseCrypto = true; + } + + return true; +} diff --git a/src/keystore.h b/src/keystore.h index 6080d7d7..40955354 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -4,12 +4,26 @@ #ifndef BITCOIN_KEYSTORE_H #define BITCOIN_KEYSTORE_H +typedef std::vector > CMasterKey; + class CKeyStore { public: + mutable CCriticalSection cs_KeyStore; + + virtual bool AddKey(const CKey& key) =0; + virtual bool HaveKey(const std::vector &vchPubKey) const =0; + virtual bool GetPrivKey(const std::vector &vchPubKey, CPrivKey& keyOut) const =0; + virtual std::vector GenerateNewKey(); +}; + +class CBasicKeyStore : public CKeyStore +{ +protected: std::map, CPrivKey> mapKeys; - mutable CCriticalSection cs_mapKeys; - virtual bool AddKey(const CKey& key); + +public: + bool AddKey(const CKey& key); bool HaveKey(const std::vector &vchPubKey) const { return (mapKeys.count(vchPubKey) > 0); @@ -24,7 +38,76 @@ public: } return false; } - std::vector GenerateNewKey(); +}; + +class CCryptoKeyStore : public CBasicKeyStore +{ +private: + std::map, std::vector > mapCryptedKeys; + + CMasterKey vMasterKey; + + // if fUseCrypto is true, mapKeys must be empty + // if fUseCrypto is false, vMasterKey must be empty + bool fUseCrypto; + +protected: + bool IsCrypted() const + { + return fUseCrypto; + } + + bool SetCrypted() + { + if (fUseCrypto) + return true; + if (!mapKeys.empty()) + return false; + fUseCrypto = true; + } + + // will encrypt previously unencrypted keys + bool GenerateMasterKey(); + + bool GetMasterKey(CMasterKey &vMasterKeyOut) const + { + if (!IsCrypted()) + return false; + if (IsLocked()) + return false; + vMasterKeyOut = vMasterKey; + return true; + } + bool Unlock(const CMasterKey& vMasterKeyIn); + +public: + CCryptoKeyStore() : fUseCrypto(false) + { + } + + bool IsLocked() const + { + if (!IsCrypted()) + return false; + return vMasterKey.empty(); + } + + bool Lock() + { + if (!SetCrypted()) + return false; + vMasterKey.clear(); + } + + virtual bool AddCryptedKey(const std::vector &vchPubKey, const std::vector &vchCryptedSecret); + bool AddKey(const CKey& key); + bool HaveKey(const std::vector &vchPubKey) const + { + if (!IsCrypted()) + return CBasicKeyStore::HaveKey(vchPubKey); + return mapCryptedKeys.count(vchPubKey) > 0; + } + bool GetPrivKey(const std::vector &vchPubKey, CPrivKey& keyOut) const; }; #endif diff --git a/src/script.cpp b/src/script.cpp index bd1b5b3c..c1752503 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1030,7 +1030,7 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash return false; // Compile solution - CRITICAL_BLOCK(keystore.cs_mapKeys) + CRITICAL_BLOCK(keystore.cs_KeyStore) { BOOST_FOREACH(PAIRTYPE(opcodetype, valtype)& item, vSolution) { diff --git a/src/ui.cpp b/src/ui.cpp index 9b84fb9e..db02cb58 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -2382,7 +2382,7 @@ CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInit m_listCtrlReceiving->SetFocus(); // Fill listctrl with address book data - CRITICAL_BLOCK(pwalletMain->cs_mapKeys) + CRITICAL_BLOCK(pwalletMain->cs_KeyStore) CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook) { string strDefaultReceiving = (string)pframeMain->m_textCtrlAddress->GetValue(); diff --git a/src/wallet.cpp b/src/wallet.cpp index 6ef75ef2..a179876d 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -17,7 +17,8 @@ using namespace std; bool CWallet::AddKey(const CKey& key) { - this->CKeyStore::AddKey(key); + if (!CBasicKeyStore::AddKey(key)) + return false; if (!fFileBacked) return true; return CWalletDB(strWalletFile).WriteKey(key.GetPubKey(), key.GetPrivKey()); @@ -783,7 +784,7 @@ bool CWallet::CreateTransaction(const vector >& vecSend, CW // Reserve a new key pair from key pool vector vchPubKey = reservekey.GetReservedKey(); - assert(mapKeys.count(vchPubKey)); + // assert(mapKeys.count(vchPubKey)); // Fill a vout to ourself, using same address type as the payment CScript scriptChange; @@ -957,7 +958,7 @@ bool CWallet::LoadWallet(bool& fFirstRunRet) if (!mapKeys.count(vchDefaultKey)) { - // Create new default key + // Create new keyUser and set as default key RandAddSeedPerfmon(); SetDefaultKey(GetKeyFromKeyPool()); @@ -1062,7 +1063,7 @@ void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) setKeyPool.erase(setKeyPool.begin()); if (!walletdb.ReadPool(nIndex, keypool)) throw runtime_error("ReserveKeyFromKeyPool() : read failed"); - if (!mapKeys.count(keypool.vchPubKey)) + if (!HaveKey(keypool.vchPubKey)) throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool"); assert(!keypool.vchPubKey.empty()); printf("keypool reserve %"PRI64d"\n", nIndex); diff --git a/src/wallet.h b/src/wallet.h index 7d9db972..8fb29a48 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -12,7 +12,7 @@ class CWalletTx; class CReserveKey; class CWalletDB; -class CWallet : public CKeyStore +class CWallet : public CCryptoKeyStore { private: bool SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfTheirs, std::set >& setCoinsRet, int64& nValueRet) const; @@ -48,7 +48,10 @@ public: std::vector vchDefaultKey; + // keystore implementation bool AddKey(const CKey& key); + bool LoadKey(const CKey& key) { return CCryptoKeyStore::AddKey(key); } + bool AddToWallet(const CWalletTx& wtxIn); bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false); bool EraseFromWallet(uint256 hash); From c1aacf0be347b10a6ab9bbce841e8127412bce41 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Fri, 24 Jun 2011 03:03:17 +0000 Subject: [PATCH 04/42] mlock() all private keys in memory Inline comment and idea come from the encprivkeys branch by Matt Corallo . --- src/serialize.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/serialize.h b/src/serialize.h index 31862a71..6952004e 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -28,6 +28,18 @@ typedef unsigned long long uint64; #if defined(_MSC_VER) && _MSC_VER < 1300 #define for if (false) ; else for #endif + +#ifdef __WXMSW__ +// This is used to attempt to keep keying material out of swap +// Note that VirtualLock does not provide this as a guarantee on Windows, +// but, in practice, memory that has been VirtualLock'd almost never gets written to +// the pagefile except in rare circumstances where memory is extremely low. +#define mlock(p, n) VirtualLock((p), (n)); +#define munlock(p, n) VirtualUnlock((p), (n)); +#else +#include +#endif + class CScript; class CDataStream; class CAutoFile; @@ -755,7 +767,8 @@ struct ser_streamplaceholder // -// Allocator that clears its contents before deletion +// Allocator that locks its contents from being paged +// out of memory and clears its contents before deletion. // template struct secure_allocator : public std::allocator @@ -777,10 +790,22 @@ struct secure_allocator : public std::allocator template struct rebind { typedef secure_allocator<_Other> other; }; + T* allocate(std::size_t n, const void *hint = 0) + { + T *p; + p = std::allocator::allocate(n, hint); + if (p != NULL) + mlock(p, sizeof(T) * n); + return p; + } + void deallocate(T* p, std::size_t n) { if (p != NULL) + { memset(p, 0, sizeof(T) * n); + munlock(p, sizeof(T) * n); + } std::allocator::deallocate(p, n); } }; From f08736405e98d0f16ec294606dda782043d5ab3d Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 8 Jul 2011 13:38:24 -0400 Subject: [PATCH 05/42] Compile 'sv' translation --- locale/sv/LC_MESSAGES/bitcoin.mo | Bin 0 -> 20407 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 locale/sv/LC_MESSAGES/bitcoin.mo diff --git a/locale/sv/LC_MESSAGES/bitcoin.mo b/locale/sv/LC_MESSAGES/bitcoin.mo new file mode 100644 index 0000000000000000000000000000000000000000..b61914cb4b3824e907dfa2c58acfe16a8af0467d GIT binary patch literal 20407 zcmd^`dz2hkedi0uHqc;j2na9+N)8%JM$?+HWNeQm*)tl+lJ&GSl5L1hs=I4?THRgU zuBx8VkU(NW7B&u#1Om?534xV%d4z;OPDmdhh!{z4xPF2!0y87W{Xh z==dWLMe`0p^}iJq9gl!70q+CV?{(l7@IC(i=Rv*yPe48QZGZj*$k4(60QKCJFL2|H zgPP|q@I~MOP|w%E>%cyE9DEp5zbC*KgZ~W_U7o+e(f?{t^xXpLxhe1lFa}==J`7gD zPl2NIrPPge2qV^fyX%SfUg8U3u^p72Y(#= z9;o+kU~yX44)8JLa|YyAP`S#DcMT|c+5#GXL9KTOI0oJZ?f{!0OAj6a)$e1V|c?I}apw@F04{N>qK+)qc zC_3B=ZU&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:06:49 +0200 Subject: [PATCH 06/42] remove magic number: change threshold for nLockTime to constant --- src/main.h | 4 +++- src/ui.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index aa74ac5a..124c7c26 100644 --- a/src/main.h +++ b/src/main.h @@ -37,6 +37,8 @@ static const int64 MIN_RELAY_TX_FEE = 10000; static const int64 MAX_MONEY = 21000000 * COIN; inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } static const int COINBASE_MATURITY = 100; +// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. +static const int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC #ifdef USE_UPNP static const int fHaveUPnP = true; #else @@ -441,7 +443,7 @@ public: nBlockHeight = nBestHeight; if (nBlockTime == 0) nBlockTime = GetAdjustedTime(); - if ((int64)nLockTime < (nLockTime < 500000000 ? (int64)nBlockHeight : nBlockTime)) + if ((int64)nLockTime < (nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime)) return true; BOOST_FOREACH(const CTxIn& txin, vin) if (!txin.IsFinal()) diff --git a/src/ui.cpp b/src/ui.cpp index 9b84fb9e..ff0b4afb 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -522,7 +522,7 @@ string FormatTxStatus(const CWalletTx& wtx) // Status if (!wtx.IsFinal()) { - if (wtx.nLockTime < 500000000) + if (wtx.nLockTime < LOCKTIME_THRESHOLD) return strprintf(_("Open for %d blocks"), nBestHeight - wtx.nLockTime); else return strprintf(_("Open until %s"), DateTimeStr(wtx.nLockTime).c_str()); From a48c671957e37594d8f9e0fd51b24e7a4f44300e Mon Sep 17 00:00:00 2001 From: Doug Huff Date: Thu, 30 Jun 2011 02:04:44 +0200 Subject: [PATCH 07/42] Make mlock() and munlock() portable to systems that require the address to be on a page boundary. --- src/serialize.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/serialize.h b/src/serialize.h index 6952004e..38c533d9 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -38,6 +38,18 @@ typedef unsigned long long uint64; #define munlock(p, n) VirtualUnlock((p), (n)); #else #include +#include +/* This comes from limits.h if it's not defined there set a sane default */ +#ifndef PAGESIZE +#include +#define PAGESIZE sysconf(_SC_PAGESIZE) +#endif +#define mlock(a,b) \ + mlock(((void *)(((size_t)(a)) & (~((PAGESIZE)-1)))),\ + (((((size_t)(a)) + (b) - 1) | ((PAGESIZE) - 1)) + 1) - (((size_t)(a)) & (~((PAGESIZE) - 1)))) +#define munlock(a,b) \ + munlock(((void *)(((size_t)(a)) & (~((PAGESIZE)-1)))),\ + (((((size_t)(a)) + (b) - 1) | ((PAGESIZE) - 1)) + 1) - (((size_t)(a)) & (~((PAGESIZE) - 1)))) #endif class CScript; From 6c9498147fb4bd6e1a79eaaa0c93a558a57a0caf Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Mon, 11 Jul 2011 02:09:07 -0500 Subject: [PATCH 08/42] Add logos/branding currently found on bitcoin.org into NSIS installer. --- share/pixmaps/nsis-header.bmp | Bin 0 -> 25818 bytes share/pixmaps/nsis-wizard.bmp | Bin 0 -> 154542 bytes share/setup.nsi | 5 +++++ 3 files changed, 5 insertions(+) create mode 100644 share/pixmaps/nsis-header.bmp create mode 100644 share/pixmaps/nsis-wizard.bmp diff --git a/share/pixmaps/nsis-header.bmp b/share/pixmaps/nsis-header.bmp new file mode 100644 index 0000000000000000000000000000000000000000..9ab0ce2591d21cce2408983986b7c97c2d1c476f GIT binary patch literal 25818 zcmeI2_m5TA5y#0tke{PCP9i6-3kY-=?14Z6gezu;emph#-v={7pDzk`*&1DYAyyEHXW$?l z4j(ykWbWL#{rdH5+O%oas#Pl$|7z5z(V;_!?Ck85Cr=g?6?sQEaNxi<>bGgrCNCx$ zjc(t*edy4k&6_v>s`%HqapN96dgSEfFli(bFNfR)FfBg7y z|Ni}@)evl#Wy_Wo78VK~V)W?I8ph6&RS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JQm7H?79x?N{oT`CE*N|4Msj==5y9#V8py`F~C!6Ri`GXg~&A5AEFD<=Y+#CF` zv0;+sbl|t)J=GeW>Eq$0VpQhrp-H~g?_d0_K4ns8cwF(9@>_kwFRCCq!5Ya4xeVZ5 zo($Sx(mm3bWS`(*!h{J_eRxcVd`sRFbyF`RpCmfv0{AWADqtg!Kp=rY0)Yeq2?P=d rBoIg-kU$`TKmvgT0to~X2qX|lAdo;Hfj|O*1Of>J5(p$v1`_xm?S9s8 literal 0 HcmV?d00001 diff --git a/share/pixmaps/nsis-wizard.bmp b/share/pixmaps/nsis-wizard.bmp new file mode 100644 index 0000000000000000000000000000000000000000..71255c6850b00ef1efea82fefd05ff736c90f816 GIT binary patch literal 154542 zcmeI5ca$8}mBwZN!PzAmV|($kEYU)HzzgiMm<0~3ut~<)1Y-;~HikWb@vfI-6TGaA zFYPj&Ts-}i2K z_uY5jZTAlQ*_WHyuj~2Of`5JacjK3uHTzPt^SN?f=bh24nf>pJS6W_zfFK|U2m*qD zARq_`0)l`bAP5Kof`A|(2nYg#fFK|U2m*qDARq_`0)l`bAP5Kof`A|(2nYg#fFK|U z2m*qDARq_`0)l`bAP5Kof`A|(2nYg#fFK|U2m*qDARq{2A)uS7LuzW>erwuRbLbkg z^CIJ|S^5hT^~XnR50B7p@2|G(r(WArxuUAr&p&rp{-d9L=R?D^UyjoF_?t8J4hxKd ztIR2z%{6F?qAO<&afx2>X6Aj@UwO?FO^$JmcwF?UugkWu1fK)YE9W zw6k(!AN9#G+Pib~(d*2uhb$5N5{QT2wfn5TD~#8s>URxPFYgiwa*K}ys7LT$oTSri z8jt=dq2rbFk)20VBkD}}MJ=N?i(?z*ztZ?y`>HQb(Fd(IcN`JYPYhwxO0C*sRV_9i z8>!(wMVZ0U+Sa^_@<@%=aiOttk40xIM{+YgrPnL=SncK+_YRJ?2)iEu7j;zVEM2DK z6+-&P1GW_ZaIi|>-2;`RJLx#x2LzzV4E`it9Me<7*P3{(5%Hp zlT=!l zo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4*>KhsTyz2)L)or4}*t>*&_k#4^xbXB0tymR9f~^xtT@z z$46^?{H<9!9wWhC_D!IZS= Date: Mon, 11 Jul 2011 02:11:15 -0500 Subject: [PATCH 09/42] Set default compression for NSIS installer to LZMA. Use of LZMA (versus the current zlib) shaves a few MB off the installer. --- share/setup.nsi | 1 + 1 file changed, 1 insertion(+) diff --git a/share/setup.nsi b/share/setup.nsi index cd39aa39..022eea82 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -1,6 +1,7 @@ Name Bitcoin RequestExecutionLevel highest +SetCompressor /SOLID lzma # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" From aa0bcaaf2be4bbb7729d307fffec13b7ef0cb806 Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Tue, 12 Jul 2011 01:18:57 -0500 Subject: [PATCH 10/42] Remove NSIS branding from bottom divider. --- share/setup.nsi | 1 + 1 file changed, 1 insertion(+) diff --git a/share/setup.nsi b/share/setup.nsi index 022eea82..888c8ea5 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -49,6 +49,7 @@ OutFile bitcoin-0.3.24-win32-setup.exe InstallDir $PROGRAMFILES\Bitcoin CRCCheck on XPStyle on +BrandingText " " ShowInstDetails show VIProductVersion 0.3.24.0 VIAddVersionKey ProductName Bitcoin From 4e87d341f75f13bbd7d108c31c03886fbc4df56f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 8 Jul 2011 15:47:35 +0200 Subject: [PATCH 11/42] Add wallet privkey encryption. This commit adds support for ckeys, or enCrypted private keys, to the wallet. All keys are stored in memory in their encrypted form and thus the passphrase is required from the user to spend coins, or to create new addresses. Keys are encrypted with AES-256-CBC using OpenSSL's EVP library. The key is calculated via EVP_BytesToKey using SHA512 with (by default) 25000 rounds and a random salt. By default, the user's wallet remains unencrypted until they call the RPC command encryptwallet or, from the GUI menu, Options-> Encrypt Wallet. When the user is attempting to call RPC functions which require the password to unlock the wallet, an error will be returned unless they call walletpassphrase