Friday, September 19, 2014

Bitcoin and Digital Wallets

If you want to know about Bitcoin, you might find this post useful, for more information

Let's quote on what is bitcoin:

Bitcoin is a consensus network that enables a new payment system and a completely digital money. It is the first decentralized peer-to-peer payment network that is powered by its users with no central authority or middlemen. From a user perspective, Bitcoin is pretty much like cash for the Internet. Bitcoin can also be seen as the most prominent triple entry bookkeeping system in existence.

Satoshi Nakamoto

As you may know, Bitcoin was proposed by Satoshi Nakamoto[1], someone that nobody knows who he was but seems that he/she was a genius. On his paper[2] he proposes a system that wants to avoid financial institutions, therefore creating a decentralized trade system that has some interesting characteristics.


Satoshi's paper proposes a system that:
  1. Removes the possibility of reversing transactions.
  2. Removes the need of trust by adding cryptographic functions on a peer to peer system.
  3. Proof-of-Work that establish an algorithm based on SHA256 that store transactions on a chain.
  4. Indirectly uses game theory to establish a network of nodes that work together to secure the network in exchange for new blocks (each generated block contains approximately 25 bitcoins.
  5. You are your own bank.
  6. Removes most of the fees that you may pay to a financial institutions

So let's see, how do i actually use this digital currency?

First of all you should download a wallet, there are several wallets, for novices i would recommend them to download Multibit or bitcoin-qt, although if you download bitcoin-qt you'll have to download around 30 GB of data containing all the information of the blockchain that stores all bitcoin transactions, for expert users i'll recommend using Armory.

After you download Multibit, you'll be able to make a "wallet" where people can send your bitcoins and you'll be able to send them as well. It will be as easy as writing down the address that you want to send the bitcoins and sending it.

But wait, what is this blockchain thing?

block chain is a transaction database shared by all nodes participating in a system based on the Bitcoin protocol. A full copy of a currency's block chain contains every transaction ever executed in the currency. With this information, one can find out how much value belonged to each address at any point in history. -[3]

How do you get dem bitcoins?

There are several methods of getting bitcoins, the most popular are:

Mining them your self. It was possible in the past to use CPUs to do the proof of work using programs like cgminer, then cpu became obsolete as GPU came to dominate the market and at last ASIC came to take over GPUS and are the only viable way to mine bitcoins at the moment.

Bitcoin gambling
Sites like primedice, where you'll get free amounts of btc to start gambling, you can deposit btc and play higher bets, etc.. take a look, even a newbie can figure it out.

Trading sites 
You can actually trade btc using a middle man, those are exchange sites like Bitstamp or btc-e, you might have to pay fees when using such trading sites for buying or selling bitcoins.


Each wallet is unique and your wallet will have 2 keys, a public key and private key. For an wallet example 12NXRguKpxyjrz2bwDr8J3aediRjRD57Gd where that address belongs to me and is unique.

Each address have a private key and a public key, having access to the private key means that you can spend the bitcoins that are inside of your wallet, most users wont notice this but you'll have to learn about cryptography to secure your wallet from hackers or anybody that want to steal your bitcoins and for proving that you actually own an address when you sign a message with your private key. YOU'll never give away the private key, (it is safe to reveal your public key) although you can sign messages and prove that you own an specific bitcoin address. The private key will be used automatically if you have it attached to your wallet, in case that you restore your wallet but do not import the private key, you won't be able to use your wallet.


Each bitcoin transaction needs to be accepted by the miners and added to the blockchain, you have to pay a small fee to the network so that the miners have an incentive onto adding your transaction to the blockchain. The fee is around 0.0001 BTC, its important to know that if you do not pay a fee to the network, your transaction might take weeks to arrive. After any amount of btc is sent, you'll have to wait at least 6 confirmations, in other words, you'll have to wait that at least 6 blocks are found to be sure that the transaction was done successfully. For example, you'll send bitcoins from your wallet to a friend's wallet, after sending it with the client, he'll see the funds received but waiting on confirmations, after confirmations are done then he will be able to use the funds that you sent him.

Other cryptocurrencies

  1. The second cryptocurrency that is well known is litecoin, it uses scrypt algorithm instead of SHA256 for the proof-of-work. For an in depth comparison of bitcoin and litecoin:
  2. Dogecoin
  3. Darkcoin
  4. Sexcoin
  5. ...


[2] - Satoshi Nakamoto's paper -
[3] - Bitcoin Blockchain -
[4] - ASIC -

This post will be updated for: correcting errors, adding more content, etc.
If you wish to donate some coins: 1HhS7VMqP9UFhTzqWrUkH9bHBKY3KBK2gD

Wednesday, July 30, 2014

Raspberry pi B+ and ArkOS 6.0 Panoply

I've received a new raspberry pi b+, as a gift from my brother. First of all, it uses the same power supply as old pi, 4 usbs and better power management.

Instead of using Arch linux ARM (the one that i'm using on raspberry pi b), I've decided to give ArkOS a try.

Just had to download latest .img from this zip: (for different devices and links, md5 check

and flashed with terminal using:

dd bs=1m if=/arkosLOCATION/arkos.iso of=/dev/mmcblk0 (or the name of your sdcard, you can get it with lsblk command) 

Becarefull or you might erase your whole HDD with this.

There's a installer for windows, mac and ubuntu, check for more information, it only works for raspberry pi.

After that, just connected the raspberry pi with the micro sd card and ethernet cable. For the setup just had to join http://localipaddressofraspberry:8000 on my browser, it will look like this:

Click start then fill the information in:

Fill the information as you may need and then on Step 4, here's the latest plugins available (you can just add them by selecting them with a click):

Basic Website - Upload your own HTML/PHP files. Version 2
Calendar - Host your own calendar and contacts (CalDAV/CardDAV) sync server. Version 0.5
Chat (XMPP) - Host your own chat/IM server. Version 0.1
Etherpad - Collaborative Text Editing. Version 1.4.0-2
File Sync BETA - Sync shared folders across devices with Syncthing. Version 0.3
Fileshares (SMB) - Add, remove and manage Windows (SMB/CIFS) network fileshares. Version 0.1
Ghost - Host a blog with ghost. Version 0.4.2-4
Gitweb - Browse git repositories using a web browser. Version 2.0.0-2
Jekyll - Run a statically-generated website or blog. Version 1.1
Mailserver - Host your email server and accounts. Version 0.2
NodeJS - Extension functions for NodeJS applications and websites. Version 0.4
Python - Extension functions for Python applications and websites. Version 0.1
Reverse Proxy - Set up reverse proxies for custom applications. Version 0.1
Ruby - Extension functions for Ruby applications and websites. Version 0.1
SQLite3 - Manage SQLite3 databases. Version 1
SparkleShare - Revision-controlled file storage and sync. Version 0.2
Transmission - Manage Transmission headless Bittorrent client. Version 0.1
Wallabag - Self-hosted app for saving web pages and RSS feeds. Version 1.7.2-1
WordPress - Open-source CMS and blogging platform. Version 3.8.2-1
ownCloud - Host calendar, files, contacts, and sync across devices. Version 7.0.0-1

After that, just click next and you'll get a review of the information inserted (after it resolves and install all dependencies needed for the packages that you selected to install)

Log in with your user and password and you'll get something like this:

I suggest everyone that has a raspberry pi to test it out. Website works flawlessly, you might encounter a bug (i have not) since ArkOS and Genesis are still in the beta phase. Remember that ArkOS is an arch linux arm derivative. If you are running headless (no screen), select the options so GPU memory can be used for optimization.

For more information on development of ArkOS check their roadmap.

If you have any question feel free to post them up, i'll try to help as much as i can.

Wednesday, July 23, 2014

Raspberry PI - Sdcard corrupted for being lazy

Months ago after i decided to get a new SDcard with less GBS, i didn't want to go through reconfiguring my raspberry pi with arch linux, so i tried 2 things:

A) Make a backup using rsync so i could just copy all files over to the new sdcard -> Half worked.

B) Copy over using spacefm, just like regular files -> Didn't work

With option A i was able to boot and it was perfect, but i didn't had any programs (according to pacman) so i decided to reinstall everything that was installed before. It worked and it took like 1 hour to get everything up again.

In the end, my raspberry had a kernel update and it just ..corrupted the sdcard after a clean legit reboot.

Don't be lazy, make a new sdcard img, it will save you the trouble of having to reinstall everything later.

Sunday, May 4, 2014

Raspberry Pi - sdcard, usb sticks, swap

After reading a lot through Google Plus, elinux and raspberry pi forums, its clear that F2FS is a must for sdcards along moving /var /tmp outside of the sdcard.

I've bought 2 - 8 GB USB sticks for my PI, i'm using The Pit Hut Usb Hub

One of them has a 512 MB partition that will be used for SWAP and another partition used for /var ; the other USB stick uses F2FS and its whole purpose is to mount /tmp

They are mounted at each startup using /etc/fstab for the whole file

The thing is that each partition on USB sticks has a unique UUID that you can get with 'sudo blkid'

With this setup you'll take care of your sdcard writing only on USB sticks or external HDD, always remember that if you want any logs or your programs write any log files, be sure that they are written on /var or your sdcard may die.

For more information on swap partitioning

Sunday, February 16, 2014

Raspberry PI

The Raspberry Pi (short: RPi or RasPi) is an ultra-low-cost ($25-$35) credit-card sized Linux computer which was conceived with the primary goal of teaching computer programming to children. It was developed by the Raspberry Pi Foundation, which is a UK registered charity.

I bought this little toy for uploading torrents 24/7, media center and mining Bitcoins (hopefully in a near future).

Items i bought for my raspberry pi:


SD Card:

External HDD:

Wireless Adapter:

Power Supply:

HDMI to VGA adapter:

Installation guide:

Installed Archlinux ARM, it's really smooth and using "omxplayer" it's possible to play videos right from the console, my videos are mostly 720p and they play flawlessly on my 42' TV.

As soon as i get my UPS i'll start leaving it on 24/7. Also here's this nice bash script that i made to manually install (NOT PACMAN) the omxplayer and also uninstall it using the .deb


Monday, January 27, 2014

Generate 8192 bytes RSA key - Arch Linux

GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP. Current versions of PGP (and Veridis' Filecrypt) are interoperable with GnuPG and other OpenPGP-compliant systems. 

Well since lately i've been digging information about encrypting i decided to start and make my own 8192 bytes RSA key.

I'm using arch linux

First of all:

Make a directory with

$mkdir gnu

change to the new directory

$cd gnu

download those 3 files and save them on plain text with no extension with the same name that site gives them, place them on folder gnu

download the gnupg 2.0.22.tar.bz2

we have to decompress the .tar.bz2

$tar -jxvf gnupg-2.0.22.tar.bz2

now go on newly decompressed folder and find folder named g10
now look for file named keygen.c and change all 4096 for 8192, save the file and go back to gnu
erase your old gnupg-2.0.22.tar.bz2 and now tar the folder with modified source with

$tar -jcvf gnupg-2.0.22.tar.bz2 gnupg-2.0.22

after that we are gonna compile the new sources

$makepkg --skipchecksums --skipinteg --skippgpcheck

let it compile and install as usual with

#pacman -U gnupg-2.0.22.tar.xz

and now just generate your new key with

$gpg --gen-key


If you have problem generating entropy for your key generation use this command on 3-4 terminals:

$ls -R /

Also remember you can use haveged:

Note: in theory this works for any size of bytes, i'll try with 16834 bytes later on.

Sources that were useful on my process:

Thursday, December 26, 2013

xchat, irssi, weechat - IRC clients

IRC is a protocol for live internet chat. It's been around since 1988. For more information about IRC go to

irssi (cli)


Arch: pacman -S irssi
Debian: apt-get install irssi

Irssi is a modular, ncurses based IRC (Internet Relay Chat) client for UNIX systems. It also supports SILC and ICB protocols via plugins. Obtained from

I've used irssi for about 2 moths it's really nice, but you have to take your time to configure it to your needs. I had some problems setting up scripts, though i did follow all the instructions to set them.. anyway that's in the past.

weechat (cli)


Arch: pacman -S weechat
Debian: apt-get install weechat

WeeChat is a fast, light and extensible chat client. It runs on many platforms like Linux, Unix, BSD, GNU Hurd, Mac OS X and Windows (cygwin). Obtained from

I can not say that it's actually better but the defaults that it includes are really nice, i really like the user panel (just like most irc frontends) at the right, it's similar to irssi on the configuration and supports a wide range of languages for scripting.

weechat 0.4.2-2

xchat (gtk frontend)


Arch: pacman -S xchat

Debian: apt-get install xchat

Xchat is a multi-platform IRC chat program. It's simply amazing. While I was trying graphical irc clients, I found that xchat had all the features that anyone could need, it's easy and allows a deeper configuration per server on the matter of username/nick/commands right away. This is suitable for novice users of irc like me.

For more information on xchat

In the end i'm going to stick with weechat and xchat, i'll let you know if i run into any real troubles with them. For any questions, just comment.