This thesis presents the digital payment system Bitcoin. It describes the cryptography on which the system is based. Presented are the short history of the system and the principles of how it works. Highlighted are the state of anonymity that the system provides while making payments and the safety it guarantees while executing transactions. Within the context of anonymity, the state of masking the users identity within the payment system is described, together with warnings and mechanisms to better hide the users identity. Considering the safety of Bitcoin transactions, potential vulnerabilities of the system are listed. Exposed is a weakness, while accepting fast payments, that enables attackers the execution of the double-spending attack. Practically it is demonstrated, how to execute the attack without special tools, with the use of opensource software recomended and developed by the Bitcoin community.