You are on page 1of 9

Akbari (Eng 3302 Unit 2 Final Draft)

Network and Computer Security: Validation of Cryptographic Currencies as Safe Funds


Samuel X. Chandler, Electrical Engineering Junior, Northeastern University I. Abstract This paper reviews the validation of cryptographic currencies as safe funds based on computer security and also emphasizing how mathematically and anecdotally safe they are from hackers. A summary of what fundamentally makes up cryptocurrencies is presented following a summary of computer security and cryptography. SHA-256, Scrypt, and TLS protocol are the 3 main computer securities protecting cryptocurrencies and are mathematically analyzed in depth [1]. The level of security found in the conclusion is a direct derivation from these findings along with what has been anecdotally found with other studies. The results demonstrate the secureness of cryptocurrencies with certain precautions taken along with the benefits of using offline storage compared to online. Following these results are suggestions for future research into improving these securities [2]. These results are important for the credibility of cryptocurrencies and also for the future advances made in cryptocurrency security [3].
Keywords- Encryption, Mining, Cryptocurrency, Peer to Peer Network

low fee transactions. Peer to peer networking means that cryptocurrencies are decentralized. No one person or organization owns or runs a cryptocurrency. The network is kept alive by miners verifying transactions, and people exchanging currencies. When two people send/receive cryptocurrencies to each others virtual wallet it is put into a transaction log and then further grouped in with other transactions called a block. This block is then verified by someone running a software called a miner that attempts to crack an algorithm to verify all of the transactions. When a miner succeeds in solving this algorithm, they are rewarded with new coins and with the small transaction fees that peers spent to send the currency to each other. This proof-ofwork system continues and trends with a logarithmic function so there cant be an overproduction of currencies [1,4]. Offline, all cryptocurrencies are secured by computer cryptography called encryption for protection against hackers and viruses. Some people choose to store their cryptocurrencies online which is be secured by Transport Layer Security (TLS) protocol [5]. Since there is no central authority running cryptocurrencies, the fees to exchange are extremely low regardless of location. Someone in Africa could send someone in America 2 dollars with a fee of a few cents and a verification time of a couple minutes. Because cryptocurrencies have the potential to unite countries into one global economy and also serve as a medium of exchange for people who want privacy from banks and the government, recent attention has come to its future validity [1-4]. This paper will review the future validity of cryptocurrencies from the view point of computer
1

II. Introduction Cryptographic currencies or cryptocurrencies are peer to peer digital currencies used to make low costing transactions between people using an open source software. Examples of these cryptocurrencies include Bitcoin, Litecoin, Dogecoin and Digitalcoin. The common links between these currencies classifying them as cryptocurrencies include: peer to peer networking, mining verification, cryptographic security, and

Akbari (Eng 3302 Unit 2 Final Draft)

and network security emphasizing the strengths and weaknesses of cryptocurrency security and possible future solutions to the weaknesses. III. Basic Concepts of Computer Security The extremely fast technological advances trending over the past decades have caused computer security advances to become necessary. Online commerce has become extremely popular to the point where most people do their shopping online. To combat hackers from snooping in on peoples purchases, Hypertext Transfer Protocol Secure (HTTPS) was implemented for protection. HTTPS was created by combining Hypertext Transfer Protocol (HTTP) with TLS protocol. HTTP, the original method for distributed online data, was subject to middle-man snooping and needed upgrading because of this new e-commerce. TLS offers more security by encrypting information as it is being sent so hackers only receive encrypted forms of the original information[5]. Encrypting data has become very popular for securing online information because it gives hackers an extremely difficult time deciphering messages even if they can tap into the data stream. There are many different forms of encryption but the main focus of this paper will be on the encryptions used for cryptocurrencies. Namely SHA-256, and Scrypt encryption[1,6].

Fig. 1. A simplified pictographic representation of an TLS protocol between a client or user and the server or data receiver [7].

1.

The user asks the receiver to establish connection. All of these steps are encrypted so any 3rd party attempting to receive data from these steps will get an encrypted message that looks like nonsense. For example:

Message sent-Hello, 3rd party snooperMessage Received- AjYT68Bj&^([5] 2. The receiver responds with a message verifying connection. 3. The receiver sends a TLS certificate verifying the secure connection. This certificate needs to be bought from a third party who will install a unique software on the companys servers [5,8]. 4. The receiver requests that the user sends a TLS certificate to verify security on both sides of the connection [5]. 5. The user sends an TLS certificate [5].

A. TLS Protocol
The TLS Protocol claims to give companies a guaranteed secure method for customers sending money and information via the internet. This Protocol can be broken down into the following steps. If at any point one of these steps are not satisfied, connection is broken. These steps are summarized in Fig. 1 [5].

Akbari (Eng 3302 Unit 2 Final Draft)

6. The user sends a session key and the servers public key. The session key can be thought of as a password specifically for this information being sent and received. The servers public key is a password that is specific for every data transfer done with the server using TLS [5]. 7. The user and receiver make one final verification that the data will be exchanged in the next phase and that this data will be encrypted with the session key made in step 6 [5]. 8. The user sends the encrypted data. 9. Both parties send a finished verification message [5]. The TLS protocol benefits from extreme attention to every detail where interference could occur. Multiple verification steps allow for multiple checks if the server is legitimate.

Fig. 2. The first step of the compression process starting with the 8 32 bit variables Ai-Hi predefined, and also with the equation constraints summed up in (1) Maj(A,B,C),(2) Ch(E,F,G), (3) 0(x), (4) 1(x), (5) Wi and also with Ki being a fixed constant. The output from this step is the encrypted message Bi, Ci, Di, Fi, Gi, Ai+1, Ei+1, Hi+1 [8].

Steps for SHA-256 encryption are as follows and illustrated in Fig 2. Equations for the steps are outlined after.
1. The original message represented by the

B. SHA-256 Encryption
Secure Hashing Algorithm (SHA) was developed by the NSA to create a secure encryption for the Digital Signature Standard in order for the authentication of United States electronic documents. Several advances of the secure hashing algorithm have been developed to keep up with new technology [8]. SHA-256 is a version of the NSAs Secure Hashing Algorithm which utilizes a compression algorithm to take an incoming message and divide it into a 512 bit message then put it through a series of other transforms finally resulting in an encrypted message. A reverse transform is done on the encrypted message with knowledge of certain constants by the receiving party to end up with the original message [8].

2. 3. 4. 5.

6.

variable Mi is expanded into 512 bits using equation (1), (2) and (3) [8]. Additional fixed 32 bit variables Ai-Hi are defined along with another constant Ki [8]. Variables Ai-Hi are compressed with equations (4), (5), (6), and (7) [8]. The compressed variables are combined to form a new output Ai+1, Ei+1, Hi+1 [8]. The encrypted output consists of Bi, Ci, Di, Fi and, Gi, from the original predefined 32 bit fixed variables plus the compressed functions containing the original message Ai+1, Ei+1, Hi+1. This output guarantees that there are 2256 ways to try and find 1 letter in the encrypted message [8]. This output is sent to someone who has knowledge of the constants and functions and can therefore use another algorithm to reverse engineer and get the message [8].

Akbari (Eng 3302 Unit 2 Final Draft)


Table 1. An S-box from a different encryption, the Data Encryption Standard. This is an older encryption so the table can fit in this document unlike the one for SHA-256 which is extremely long. Matching rows and columns then shifting them based on equations (1) and (2) determine how it is used [8]

The following formula represents the 512 bit message transform done to the original message where Wi is the 512 bit message, and Mi represents sixteen 32 bit letters of the message being sent. Equations (2) and (3) use XORed (), rotated to the right (ROTR) functions and XORed shifted to the right functions(SHR) of S-boxes. An S-box is a predefined table that is symmetric and determined by which encryption you are using. Table 1 is an example of an S-box [8].
{ ( ( ) ) ( )

The S-boxes noted as equations (6) and (7) are the same as the previous S-box functions but are defined in all ROTR instead of ROTR and SHR [8].
( ) ( ) ( ) ( ) ( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

( )

The additional variables Ai ,Bi, Ci, Ei, Fi, Gi, are also compressed with 2 functions Maj(A,B,C) and Ch(E,F,G) with the following AND() and OR() constraints:
( ) ( ) ( ) ( ) ( )

) (

( )

Akbari (Eng 3302 Unit 2 Final Draft)

C. Scrypt Encryption
Scrypt encryption was developed in order to make hardware attacks extremely costly and memory extensive. The process of scrypt encryption follows the same equation line as the secure hash algorithm with a twist: implementing an additional mix function ROMixH (B,N) [9]. Parameters: H: K: Any hash function. Like SHA-256 Length of output produced by H, in bits.

far less than ROM which can be measured in terabytes and is where memory is usually stored. Expensive devices such as graphics processing units (GPUs) are needed to crack Scrypt encryptions due to this RAM storage [9].

IV. Analysis of TLS, SHA-256 and Scrypt Encryption

A. TLS Protocol
TLS Protocol has been around since 1995 and the weaknesses of this method are outlined from anecdotal attacks on servers [10]. The first way low level computer hackers try to break TLS protocol is by using invalid TLS certificates. Certificates usually show up in the browser heading where it will say HTTPS followed by a lock and the TLS owners company name. If an invalid certificate is present, any browser will notify the user that the site is not secure. This usually will only work on the computer illiterate [10]. The second way is for the computer hacker to obtain valid company TLS certificates and use them. This method involves hacking the company infrastructure and therefore is extremely hard to do for any well-known company with up to date security. This is can only be done by high level hackers [10]. A third way is to directly crack the encrypted keys which usually contain 1024-2048 bytes. This method involves getting past all of the security put forth by the encryption and will be summed up in the next section [10]. Analyzing these methods shows that the only easy way to overcome the TLS protocol is to create fraudulent certificates and even then, the user is always warned of the fraudulent HTTPS. TLS proves that a credible company using TLS as a form of security is very hard to hack based on
5

Integer: A bijective function from {0,1}k to {0, . . .2k 1}. Input: B: Input of length k bits. N: Integer work metric, < 2k/8 Output: B Output of length k bits. [9].

Steps including these parameters for the mix function ROMixH (B,N) are as follows: 1. Set a variable X equal to B the input length of k bits [9]. 2. For i=0 to N-1 set a variable Yi equal to X and then set X equal to H(X) [9]. 3. For i=0 to N-1 set a variable j equal to Integer(X) mod N and then set X equal to H(XYj) [9]. 4. Set B equal to X [9]. This scrypt algorithm functions as an assurance that all data will be stored in random access memory (RAM). In a normal computer, RAM usually extends from 2-32 gigabytes. This is

Akbari (Eng 3302 Unit 2 Final Draft)

the steps taken to verify the user and server parties at every step [5,10].

B. SHA-256 and Scrypt encryption


Statistical analysis of SHA-256 shows that there are some weaknesses in the system. Using 8 random tests with a set limit of statistical process control threshold (SPCT), a study found that samples out of the accepted SPCT range. An ideal encryption creates a level hardiness regardless of what method a hacker uses to attempt to crack a system. Hackers knowing what inputs provoked this reaction could abuse them, however the SPCT only shows that there are a range of inputs that make a certain encryptions easier to crack. Because the encryption wasnt completely random, improving the fundamental equations would yield to overall improvement of the randomness [2]. This does not mean that cracking the encryption is easy. For example, if an encryption is extremely hard to crack, easier than extremely hard to crack is still extremely hard to crack. From the encrypted equations shown in section III specifically equations (1)-(5), there are 2256 x The length user password [2] possible solutions to an SHA-256 encryption so brute force hacking (running a program that cycles through random solutions) would take several lifetimes if the user has a lengthy password. The key component of SHA-256 encryption is the necessity of a secure password. If the encryption is run through a protocol like TLS then it will be secure since the encryption password will be high digit string set by the TLS provider. If the encryption password is left up to users then the secureness of the encryption is directly proportional to how long and random the password is [2]. From the analysis of SHA-256 it can be concluded that Scrypt is even more secure since it

has similar securities but just guarantees that any hardware used to try and crack a password/message will have to be an expensive RAM based system [9].

V. Cryptocurrency Security Summary

A. Online Wallet security


Storing your virtual wallet online seems convenient and simple plus the 3rd party will usually guarantee storage security. The problem with this guarantee is that these virtual currencies are still very much in their infancy, therefore you are trusting strangers with your cryptocurrency. The companies that have been around since the very start of the cryptocurrencies have still only been around for a couple years. This idea was stressed when one of the most reputable Bitcoin exchange websites filed for bankruptcy with thousands of peoples Bitcoins left unclaimed. Assuming you can guarantee security online and they are using TLS protocol with transactions, online wallets could potential be secure based on the analysis in section IV [5,10,11].

B. Offline Wallet security


Storing your virtual Wallet offline with the cryptocurrency software means that you are taking all variables out of the equation with the exception of SHA-256/Scrypt encryption security. Based on the analysis in section IV done for the encryption security, it can be said that with a lengthy password for encryption, your cryptocurrency will theoretically be safe from anyone who tries to directly hack your wallet. The only alternative to brute force hacking the offline wallet is for someone to directly gain access to the passcode via snooping around your computer and finding it saved somewhere or you somehow revealing the information to a third party [8-10].

Akbari (Eng 3302 Unit 2 Final Draft)

V. Conclusion This paper reviewed the future validity of cryptocurrencies solely based off of computer and network security ideas such as SHA-256 encryption, Scrypt encryption and TLS protocol. Analysis of TLS protocol revealed that with a proper company run server security is good. However, considering the infancy of Cryptocurrencies there is no credible 3rd party to be trusted at this point in time so online storage of virtual currencies should be avoided[5,13]. Analysis of SHA-256 and Scrypt encryptions revealed that the encryption system is very secure only if the user provides a lengthy passcode to avoid brute force hacking. There are some weaknesses in the system based on statistical analysis but these are also irrelevant if the password is long enough [2,8]. Future research into improving SHA-256 and Scrypt encryptions should be aimed at

improving the randomness of the compression functions namely equation (4) and (5). This can be done by directly changing the equations around and/or adding additional variables to increase the number of random results up from 2256. Increasing this number will also make the security less based on the users password. TLS and Scrypt security can also be directly improved from this research since encryption is used within the TLS/Scrypt protocol [2,5,8,13]. VI. Acknowledgments The author would like to think J. Ascher and H. Lin for constructive criticism during Revision Club.

Akbari (Eng 3302 Unit 2 Final Draft)

References 1. Nielson M. 2013 Dec 6. How the Bitcoin protocol actually works [Internet]. [2013 Dec 6, cited 2014 March] . Available from: http://www.michaelnielsen.org/ddi/how-the-bitcoin-protocolactually-works/ 2. Davis R. 2005. SHA-256 Limited Statistical Analysis [E-book]. Fairfax(VA):Femto-Second; [2005, cited 2014 March]. Available from http://www.femtosecond.com/papers/SHA256LimitedStatisticalAnalysis.pdf 3. Schneier B. 1997. Cryptography, Security, and the Future [E-book]. Vol. 40. Communications of the ACM; [1997, cited 2014 March]. Available from https://www.schneier.com/essay-005.html 4. Wouter . 2013 March. An accidental millionaire by BitCoin [Internet]. Free Knowledge Institute; [2013 March, cited 2014 March] . Available from: http://freeknowledge.eu/blog/wouter/an-accidental-millionaire-by-bitcoin 5. Dierks T. 2008. The Transport Layer Security (TLS) Protocol. Network Working Group (Version 1.2) [E-book]. [2008 August, cited 2014 March] Available from: http://tools.ietf.org/html/rfc5246 6. Bassham L. 2012. Third-Round Report of the SHA-3 Cryptographic Hash Algorithm Competition [Internet]. NISTIR 7896; [November 2012, cited 2014 March]. Available from: http://nvlpubs.nist.gov/nistpubs/ir/2012/NIST.IR.7896.pdf 7. TLS Protocol. N.d. MIT UVT. Web. 15 Mar. 2014. http://mit.uvt.rnu.tn/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6857Fall2003/BE87D8FB-827F-4F53-A7772BE9AF751506/0/chp_ssl_1.jpg>https://www.globalsign.com/ssl-information-center/what-isan-ssl-certificate.html 8. Mendel F, Pramstaller N, Rechberger C. 2006. Analysis of Step-Reduced SHA-256 [E-book]. Austria(**State**):Institute for Applied Information Processing and Communications; [2006, cited 2014 March] Available from: http://eprint.iacr.org/2008/130.pdfhttp://www.economicexpert.com/a/S:box.htm 9. PERCIVAL C. **Year**. STRONGER KEY DERIVATION VIA SEQUENTIALMEMORYHARD FUNCTIONS [E-book]. Cited 2014 March] Available from: http://www.tarsnap.com/scrypt/scrypt.pdf 10. Gregg M. 2013 September. Six ways hackers try to break Secure Sockets Layer-encrypted data [Internet]. Search Networking; [2013 September, cited March 2014] . Available from: http://searchnetworking.techtarget.com/tip/Six-ways-hackers-try-to-break-Secure-Sockets-Layerencrypted-data 11. Shubber K. 2014. Good Riddance to Mt. Gox [Internet]. Slate; [Cited 2014 March] . Available from: http://www.slate.com/articles/technology/future_tense/2014/02/mt_gox_bitcoin_exchange_closu re_could_help_legitimize_the_currency.html

Akbari (Eng 3302 Unit 2 Final Draft)

12. Shirriff K. 2014 Feb 1. Bitcoins the hard way: Using the raw Bitcoin protocol [Internet]. [2014 Feb 1, cited 2014 March] . Available from: http://www.righto.com/2014/02/bitcoins-hard-wayusing-raw-bitcoin.html 13. Matsuura K. 1973. Advances in Information and Computer Security [E-book]. Kagawa:Founding and Former Series Editors; [2008, cited 2014 March] Available from: http://ebookcrop.com/ti/23/Advances-in-Information-and-Computer-Security.shtml