I want to know whats happening under the hood mathematically.
You may want to read the white paper: http://bitcoin.org/bitcoin.pdf
. It may answer some questions, but the source code may be the only answer to others.
Encrypting the wallets prevents from someone with access to the wallet.dat file from copying your routing number and signature in plaintext. After encryption, its just a jumble of random numbers that can only be rearraged with the encryption pass phrase.
Only the private key / signature is encrypted. Public keys / addresses / routing numbers have minor privacy implications but it's not worth encrypting them for most people since you'd then have to decrypt to check your balance.
This transaction phrase is sent to the bitcoin distrusted network in a block???
It is sent as a "transaction". The network then floods it to everyone. Computer B sees it if it happens to be connected. The miners also see it, and add it to the list of transactions they are processing. When they succeed (every 10 minutes on average), they then send the signed "block" to the network, which floods it.
In other words, the transaction exists independently at first, and then is included into a block. Before inclusion, the transaction is "unconfirmed". After inclusion the transaction has "n confirmations", where n is the number of blocks since it was included.
I would like to find out how the transactions are combined into a block, and how this block is verified.
The transactions are simply listed in a prospective block. A SHA256 checksum is made of the transactions. That checksum, plus the signature of the previous block, the current time, etc, are called the "block headers". The block must be "signed" by taking the headers and adding an arbitrary "nonce". That combination is then hashed again and if it includes enough leading zeroes (the quantity determined by the "difficulty") it is considered a valid block. If not, the miner changes the nonce and tries again until they find one that works. When a match is found the complete block (headers plus transaction list) is flooded to the network and future miners include its signature in the next blocks they are creating.