Cryptocurrency Business Use “Reverse Merger” to Enter Mainstream Markets
Staying true to their creative nature, several cryptocurrency businesses, especially the exchange platforms are following the “reverse merger” approach to move close to mainstream markets, reportsSouth China Morning Post, February 22, 2019.
Taking the Back-Door Entry
Leave it to the brains in the crypto industry to circumvent any obstacle thrown their way.
An increasing number of cryptocurrency exchanges are inching closer to mainstream financial markets by purchasing listed companies and then aiming to raise firms by camouflaging as a veteran of the traditional financial services industry they once despised.
The latest example of the aforementioned approach is February 11, 2019, deal which saw the US-based crypto broker-dealer Voyager Digital sneak its way into the Toronto Venture Exchange after it acquired a controlling stake in a mineral exploration company called UC Resources.
A major upside to this “back door” approach is that it doesn’t require the companies to go through the excruciating and tiring process of a full initial public offer (IPO).
Fei Ding’an, managing partner at Ledger Capital, a digital asset investment firm said:
“Many [cryptocurrency] exchanges have put a lot of strategic effort into trying to legitimize their operations and their reputations, and for some there’s an assumption that having some exposure to the traditional public market will help.”
In fact, Voyager Digital isn’t the first firm to follow the relatively less straining route to mainstream markets.
In January 2019, Star Xu led OKC Holdings acquired 60.5 percent stake in a Hong Kong-listed construction firm named LEAP Holdings for $61.69 million.
Regaining the Lost Confidence
Exposure to mainstream markets could help re-establish the confidence lost in cryptocurrency businesses in recent times.
The industry, especially the cryptocurrency exchanges, have had their goodwill tarnished continually due to unfortunate events like hack attacks, money laundering, and security mechanism failures.
BTCManagerreported on September 19, 2018, how the New York Attorney General Barbara Underwood’s office slammed cryptocurrency exchanges like Binance, Gate.io, and Kraken for running their operations without obtaining the mandatory licenses and breaking the city’s digital currency regulations.
On a more recent note, the dramatic story surrounding Canada’s Quadriga CX has again highlighted the need for a robust and secure exchange platform that puts customer’s safety at the top of their priority list.
Anthony Xie is the founder of HodlBot, a tool that helps investors diversify their portfolios and automate their trading strategies.
In order to remain decentralized, cryptocurrencies using a proof-of-work system must not allow a single party to control the majority of total hashing power.
But as the global pool of hashing power grows more liquid, cryptocurrencies need to pass another important test. They must be able to resist an attack from the total rentable global hashing power for their specific algorithm. Otherwise, arbitrageurs may find it financially attractive to rent hashing power in order to perform 51% attacks.
There are a few things preventing this from happening:
Algorithm-specific miners — Many rigs are optimized for a certain hashing algorithm, and switching to another, e.g. SHA-256 → X11, is unfeasible.
Illiquid mining market — Most of the global hash power is illiquid and not rentable. Therefore, a large upfront investment is required to build significant hashing power. The upfront cost for an attack is almost always not worth it.
Opportunity cost — Cryptocurrencies are usually designed to heavily favor good actors by providing them with greater rewards for acting in the benefit of the entire network. Any attack must outweigh the risk of failure including loss of mining rewards, loss of reputation and damage to the network. Long-term miners do not want to destroy their future earning potential by successfully attacking a network, shaking market confidence, and causing the price to fall.
But times are changing. The mining market is becoming more liquid.
Why is the liquid mining market growing?
Computer storage was once an illiquid market, now it is an extremely liquid online commodity. The same thing is happening to hash power.
There are two major forces driving this.
The long-run price increase of cryptocurrency will incentivize miners to invest in hashing power until any incremental gain is equal to the cost. In other words, if prices continue to go up, so will global hashing power.
The total percentage of hashing power for rent will increase because buyers and sellers both benefit from the ability to rent and lend respectively. Separation of concern leads to higher degrees of specialization and increased operational efficiency. This is why hardware manufacturers sell their mining rigs and don’t mine themselves. If renters focus all of their time on finding opportunities with the highest amount of ROI, they are likely going to be the best at extracting value per unit of hashing power.Conversely, lenders can de-risk their business because their rental income is implicitly diversified across each entire hashing algorithm. In this world, lenders can simply focus on rental relations, asset utilization, and upkeep.
Rent-a-miner attacks are already possible
Crypto51 calculates how much it would cost to rent enough hashing power to match the given network hashing power for an hour. NiceHash does not have enough hashing power for most larger coins, so this figure is sometimes theoretically above 100 percent.
The quoted attack costs do not include the money you earn in the form of block rewards, so in many cases, the costs will actually be substantially lower.
Crypto51 is quoting the spot price for what is available on NiceHash. In real life, the more you rent, the more expensive it will be because of supply and demand.
Coins vulnerable to rent-a-miner attacks
Ranked by Market Cap
ETP is the #91 ranked coin on CMC. You can rent up to 21x the network’s hashing power. The cost of an attack is only $162 per hour. ETP/BTC and ETP/USD pairs are available on Bitfinex.
Vulnerable coins assuming 2x the rental capacity
Currently, these coins are out of reach since the total rental capacity available on NiceHash is not enough to fully match the network’s hashing power.
But let’s imagine the likely circumstance that NiceHash is able to 2x their total rental capacity. Now coins like ETC (rank 18), BCN (rank 40), are easily in reach.
Vulnerable coins assuming 5x the rental capacity
A 5x increase in rental capacity puts coin like DASH (rank 15) and BTG (rank 28) in danger.
So what if 51% attacks are possible? How do attackers make money?
Fortunately, it’s impossible to ever create a transaction for a wallet that you do not own the private key to. But, controlling the majority hashing power means you can execute a double spend attack by temporarily reverting certain transactions on the ledger.
The mechanics of a double spend attack
When miners find a new block, they are supposed to broadcast this to all other miners so that they can verify it, and add a new block to the blockchain. However, a corrupt miner can create their own blockchain in stealth.
To execute a double-spend, the attacker will spend his or her coins on the truthful chain. But they will leave out these transactions on the stealth chain.
If the corrupted miner can build a longer chain faster than all the other miners on the network, they can broadcast the stealth chain to the rest of the network.
Because the protocol adheres to the longest chain, the newly broadcasted corrupt chain will become the de facto, truthful blockchain. The transaction history for the attacker’s previous spend will be erased.
Note that just because a miner controls 51% of hashing power, does not mean they will always have a longer chain. In long-run they will probably have a longer chain. To guarantee this in the short-run, an attacker would likely want to control closer to 80% of the network power.
Where to spend the coins? Exchanges are likely the target
For a double-spend to pay-off, you need to find a way to actually extract value from the spent coins. If you can’t spend the coins in the first place, there’s no point.
The most likely place an attacker would spend their coins on is an exchange because they are the single biggest buyers of various cryptocurrencies.
Here’s what the attack would look like:
Choose a target network that looks profitable
Accumulate a significant amount of coins on the target network
Rent NiceHash hashing power and silently grow the stealth chain
Trade these coins on an exchange for another currency e.g. BTC
Withdraw BTC to another wallet.
Broadcast the stealth chain to the network
Get the initial coins back
Repeat with a different exchange.
How exchanges will likely respond
As you can probably imagine, exchanges do not enjoy being bamboozled. If this kind of behavior becomes too costly for them, they will likely respond by increasing security surrounding withdrawal periods, deposit periods, and account verification.
Waiting longer for withdrawal will make it more costly for attackers, as they must then maintain the majority hashing power for longer. But this also draws the ire of legitimate traders and exchange users who already complain about the inordinate time it takes to get their cryptocurrencies out.
Another way exchanges may respond is by carefully screening coins that are so easily compromised. However, delisting coins also mean a reduction in trading volume and revenue. I hope this happens, because altcoins that are solely used for speculation, are in dire need of an existential threat.
Ultimately, we’ll likely see a combination of both. The harder it becomes to successfully get away with a double-spend attack, the less money an attacker can justify spending. In the long-run, the balance of these two forces will converge on some market equilibrium.
How cryptocurrencies will respond
Altcoins may find new ways to combat this threat by:
Using more obscure algorithms for which there are few miners. This is at best a band-aid solution. Fewer miners for your algorithm means it’s difficult to grow your hashing power. If your network grows, then the algorithm will no longer be obscure.
New projects may be to stake their security on the blockchains of larger networks. e.g. ERC-20. Pushing for new consensus algorithms that are more resilient to 51% attacks e.g. proof of stake. POS isn’t perfect though and has challenges of its own.
Big is beautiful
How much larger is the rental market going to grow? It’s not inconceivable to witness a 100x increase, so how many coins are really safe?
Coins with high market caps and low cost of attack are particularly fallible. Given that this is true, will the market respond accordingly by discounting insecure coins? Conversely, will the market place a premium on cryptocurrencies with mammoth mining networks?
To quote a Hacker News comment:
“Rent-a-miner attacks seem like another amusing example of when the emergence of a market can break a system. Satoshi foresaw people trying to mount a 51% attack by buying a ton of machines, and so he went to great lengths to ensure this was unlikely using mining. I don’t think Satoshi foresaw the liquid AWS-like market for instant hashing power. The ability to mount a limited-time 51% attack makes the attack literally 1000x easier than a buy-machine 51% attack.”
On Thursday (February 21st), Brian Armstrong, Co-Founder and CEO of Coinbase, decided to address, in an article for Fortune, four common misconceptions about cold and hot cryptoasset custody solutions.
Armstrong started by explaining that “hot” in this context means online (i.e. connected to the internet) and “cold” means offline (i.e. not connected to the internet); naturally, the former implies a much greater risk of attack by hackers.
First, Armstrong says that it is not true that “you can’t trade crypto using funds in cold storage.” In fact, he says, some crypto custody solutions, such as Coinbase Custody, “let you trade over-the-counter (OTC) using delayed settlement,” which means that they let you trade the cryptoassets they are holding for you in cold storage, and the actual transfer out of cold storage only happens after the trade has been executed.
Another company that allows this is BitGo, which announced on January 16th that it had partnered with Genesis Global Trading (one of the largest crypto over-the-counter brokers) to allow BitGo Trust clients to “easily execute buy and sell orders without having to manage keys or move their assets from the industry’s most secure cold storage.”
BitGo launches partnership with Genesis Global Trading. Now BitGo clients can Buy/Sell with Genesis directly from cold storage
Second, Armstrong notes that it is wrong to believe that “you can’t ‘stake’ (or earn interest on) funds in cold storage.” One example of a crypto project that uses a Proof-of-Stake (PoS) consensus mechanism with a staking model that works with cold storage is Tezos, and he explains below:
“… you can delegate your funds in cold storage to a “baker” and earn interest. The baker, which acts as the staking equivalent of a miner in the Bitcoin example, keeps a smaller percentage of funds online—and those don’t need to be customer funds. In other words, customer funds are kept safely offline but are still fully able to participate in the network, earning a yield for the customer.”
Third, the Coinbase CEO argues that cold storage does not mean “relying on a single authorized user who could lose funds,” and that a “well-designed crypto custody solution doesn’t rely on any single person,” rather using “multiple keys to achieve consensus and redundancy,” with larger transactions requiring more signatures.
Fourth, he explains that although hardware security modules (HSMs) as part of a custody architecture can provide very good security, they are not as quite safe as cold storage, which forces hackers to perform some kind of physical attack in order to get access to private keys.
Finally, he explains that there is a place for both hot and cold storage solutions:
“Hot storage is best when customers need real-time access to funds, measured in minutes or seconds. In exchange for this, there is some additional security risk, which can be mitigated, in keeping funds live on the Internet.
Cold storage is best when security is paramount, typically when storing larger amounts. As I mentioned above, you can still trade and stake funds in cold storage, but the price you pay is that the time it takes to withdraw funds is typically measured in hours. Depending on how difficult you want to make the withdrawal of funds that may be a pro, not a con.”
Noelle Acheson is a veteran of company analysis and member of CoinDesk’s product team.
The following article originally appeared in Institutional Crypto by CoinDesk, a newsletter for the institutional market, with news and views on crypto infrastructure delivered every Tuesday. Sign up here.
To the fanfare of vindication, the news dropped last week that two public pension funds were anchor investors in a blockchain fund managed by Morgan Creek. “The institutions are here!,” went the cry, “we knew it would happen!”. It echoed the chorus of jubilation that greeted the news late last year that Yale Endowment fund was dipping its sizeable toe into the blockchain sector via an investment in two crypto funds.
Much like that reaction, this one is overblown – but the news is positive, and highlights a few bigger-picture trends that point to increased institutional involvement.
First, let’s look at why it’s overblown.
Technically, it’s not “two public pensions.” It’s actually two separate sections of the same investment program (Fairfax County Retirement Systems).
These pension funds are not investing in cryptocurrencies, they are investing in a blockchain venture fund, which will mainly take equity positions in startups. The fund can hold a relatively small amount of cryptocurrency (up to 15 percent) but currently does not do so.
The amount being invested is small, only $21 million, which is less than 0.3 percent of Fairfax County’s total pension AUM. 15 percent of that (the maximum that can be allocated to cryptocurrencies) is just over $3 million, a tiny drop in the ocean when it comes to the overall market.
It is not at all unusual for a pension fund to invest in venture capital. Pension funds like venture capital. It’s not just the above-average returns (CalPERS, one of the largest pension funds in the world, confirmed last week that private equity was its best-performing asset class both long- and short-term), much-needed given the lackluster expectations for other asset classes. It’s also that they get to “mark-to-model”, which means it is valued at the expected price, not the market price.
But here’s the part we can get excited about: We are talking about pension funds, typically the most conservative type of fund there is. It’s not that we have here a pension fund being brave – they’re not allowed to do that. It’s that we have here a pension fund that sees blockchain investments as mature enough that unexpected bravery is not needed.
Also, pension funds like long-term investments. This decision, therefore, sends the constructive message that blockchain projects are not a quick turnaround.
And it’s worth noting that these are not just any pension funds. Fairfax County is the most populous and one of the wealthier areas of one of the wealthier states.
Its pension payment outlook is far from rosy, however. The two investing pension plans (employees and police) are respectively only 70 percent and 85 percent funded – they don’t have enough assets to meet their expected future liabilities.
To complicate the situation even further, the aging population means that, by 2025, the area is likely to have more people on pension than employees. This makes the need to find sources of “extra” return – even if it means more risk – increasingly urgent.
What ails Fairfax County can be seen across the country.
In 2017, the median funding ratio of public pension plans in the US was just over 70 percent – some states are at 30 percent. Better returns are becoming less of a “nice to have” and more of an imperative – this means that the risk profile of pension funds (for better or worse) is likely to change over the coming years, which in turn will encourage managers to look more closely at alternative investments with low correlation.
It is also significant, but not surprising, that the first pension fund forays into blockchain investment came from the public sector. A report released earlier this month by the Centre for Retirement Research shows that, in the US, 72 percent of public pension portfolios are in “risky assets” (equities and alternatives), vs. just 62 percent for private plans. This is more logical than it seems: Accounting rules dictate that private sector use a bond yield as the discount rate; public sector plans can use the expected rate of return on their investments. The higher the risk, the higher the expected return, and the lower the necessary funding.
So, while we can’t conclude that “the institutions are here” with this news – it’s not the turning point it may initially seem – we can expect to see more announcements like this as public pension funds around the US decide that blockchain-based investments, including crypto assets, have an acceptable – perhaps even desirable – risk profile.
Fund managers, especially conservative ones, tend to move as a pack, so this could happen relatively quickly. That doesn’t mean it will happen soon, though – the crypto asset market still needs some maturation in both infrastructure and liquidity. But the Morgan Creek announcement, plus a recent report from market researchers Cambridge Associates encouraging institutions to start looking at the sector, indicates that the shift has started.
Blackmailers have reportedly managed to rake in over $330,000 worth of bitcoin, the flagship cryptocurrency, through an email-based ‘sextortion’ campaign that has been ongoing since at least 2017, and saw its activity surge last year.
According to a report published by UK firm Digital Shadows, the cybercriminals received said amount from over 3,100 unique BTC addresses. The funds ended up in 92 different bitcoin addresses believe to belong to the same organization, that could reportedly be making an average of $540 per victim.
The firm’s report, first spotted by The Next Web, tracked a sample of 792,000 emails sent to victims. The ‘sextortionists’ reportedly sent them an email that would include a known password as “proof” they hacked them, and claimed to have video evidence of them seeing adult content online.
The threat was that the video would be published online, if a ransom in BTC wasn’t paid. Last year, Cornell University computer science professor Emin Gün Sirer warned potential victims to “never pay, never negotiate” with cybercriminals trying to extort them.
Per Sirer, the emails were being sent to every email account on the popular website haveibeenpwned, which shows whether emails addresses had their data leaked on well-known online security incidents.
A Sophisticated Operation
The UK firm’s report seems to show the ‘sextortion’ operation was a sophisticated one, as scammers were seemingly trying to hire more people to help them target high-net-work individuals.
These hires could be getting high salaries, up to $768,000 a year, if they had experience in network management, penetration testing, and programming. The cybercriminals have notably also been using social media to target their victims.
The scammers’ capabilities are said to have varied in skill, as while some struggled to distribute a large amount of emails that could get past email server or spam filters, others managed to show high levels of sophistication, with emails sent from accounts specifically created for the campaigns.
Moreover, these campaigns were launched on a global scale, as the servers the emails came from were in five different continents. The highest amount of emails came from Vietnam, Brazil, and India. These servers could, however, have been compromised by the scammers as well.
Fidelity Becomes First Financial Institution to Take Bitcoin Lightning ‘Torch’
Fidelity Digital, the digital assets arm of Fidelity Investments, has become the first financial institution to receive the so-called bitcoin payments ‘torch’ that is being relayed from user to user around the globe via Bitcoin’s Lightning network.
Fidelity Becomes First Bank to Take the #LNTorch
With more than 27 million customers, Fidelity manages $7.2 trillion dollars in total assets. It’s the United States leader in 401(k) retirement savings plans and is one of the largest 403(b) retirement plan providers for not-for-profit institutions.
The investment giant announced it had received the #LNTorch on Friday, February 22nd from Tokyo-based and self-proclaimed ‘Bitcoin Maximalist’ who’s “interested in mining/trading,” Twitter user @Wiz who received it from Bitcoin entrepreneur, Charlie Shrem.
“Who wants to be the next torchbearer?” tweeted Wiz. “Reply with a LN invoice for 3.64M sats and I’ll choose who I deem to be the most trustworthy.”
The 3.64 million satoshis equate to about $142 USD at current market BTC price.
Fidelity Digital Assets then replied:
We and our research team at the Fidelity Center for Applied Technology have received the #LNTorch from @Wiz.
“Who should we pass it to? #LNTrustChain,” Fidelity asks, which is expected to launch its Bitcoin custody service next month.
Fidelity Becomes 229th Torch Bearer
As Bitcoinistreported, Lightning Torch has gained a surprising level of recognition in the few weeks it has existed. The initiative involves passing a lightning payment between nodes, with each receiving user adding 10,000 satoshis ($0.34) and passing on to a new node.
Fidelity Digital Assets becomes the 229th entity overall to get the torch, according to the official tracker website. Previous bearers included BitMexResearch, Binance CEO ‘CZ’ Changpeng Zhao, and TRON’s Justin Sun.
But, more importantly, Fidelity becomes the first financial institution to get its hands on the digital ‘torch.’
This may not be surprising, however, as Fidelity has been spearheading the institutional plunge into cryptocurrencies over the past few months. In October 2018, the investment giant announced it would open cryptocurrency trading to its 27 million customers.
Therefore, participation in this payment relay will likely provide some valuable experience for Fidelity Digital assets that is looking “to create a full-service enterprise-grade platform for digital assets,” according to its founding head, Tom Jessop. He adds that:
…[f]amily offices, hedge funds and other sophisticated investors are starting to think seriously about this space.
It will also be interesting to monitor whether this nascent, albeit rapidly growing second-layer network, will be able to handle the relayed BTC payment as it changes hands and snowballs.
(Though, perhaps that may be the entire point of this whole thing, i.e. bringing awareness to this new technology as it’s already producing some unique use-cases.)
According to monitoring resource 1ML.com, there are currently 6561 reachable nodes and 29,777 channels on Lightning, offering a total payment capacity of 718.25 BTC ($2.85 million). The figures represent an impressive monthly growth of 26 percent in network capacity.
Will Elon Musk Be Next?
Bitcoinistreported that participants in the ongoing transaction relay have been urging Tesla CEO Elon Musk to paste an invoice and receive the torch.
This follows after Twitter CEO Jack Dorsey became the bearer to much fanfare earlier this month while hinting that Bitcoin Lightning payments may be coming to Twitter. (But you can kind of try this already.)
Will Elon Musk eventually take part in the Lightning torch relay? Let us know in the comments below!
In the following introduction, BTCManager will investigate the simple, yet powerful, coding language used in the Bitcoin Network. The Bitcoin Scripting language, or Bitcoin Script, was designed with only a few functions in mind; it is compact, Turing incomplete, and stack-based. In this way, the language serves these ends efficiently and securely.
Despite its minimal functionality, in comparison to networks like Ethereum, it has nonetheless proven itself throughout a decade to be powerful enough to support transactions in value adequately.
Bitcoin Script and “Programmable Money”
The programming language behind the pioneer cryptocurrency is, in the eyes of many, a perfect example of Occam’s Razor.
It is elementary, even compared to pre-cryptocurrency coding languages. More importantly, Satoshi Nakamoto designed this simplicity intentionally. A language that has multiple capabilities and allows for complex transactions of data also allows for a greater number of attack vectors. Critics have explained that a language such as Solidity, while impressive in its scope, falls short as far as security goes.
Moving along this point, Bitcoin Script is Turing incomplete. By comparison, Solidity is Turing complete, meaning it can replicate any Turing machine or an abstract machine capable of autonomously following a particular algorithm. Grasping this concept, one can begin to understand how a smart contract operates.
Returning to the primary focus, Bitcoin Script does not offer this feature, or not in the same way, a deeper dive into smart contracts using the Bitcoin Blockchain will be the subject of later articles.
Bitcoin’s main use-case has always been cryptocurrencies and the transfer of value. The added characteristics of Turing complete languages were, thus, not necessary. That, however, does not mean Script is limited.
Furthermore, the limitations in Bitcoin Script prevents a “logic bomb,” or an infinite loop from being included in any single transaction. This restriction eliminates the possibility of a denial-of-service (DoS) attack on the network. The extent of these constraints, such as transactions that extend beyond merely sending a value to X and Y, will be covered in upcoming installments.
Characteristics of the Bitcoin Scripting Language
Bitcoin’s coding language uses “reverse polish” as a system of notation, meaning lines such as “3 + 4” will appear as “3 4+” with growing complexity. Another feature harks back to Bitcoin Script’s roots in “Forth-like.” This feature is relevant simply in that these two languages are both “stack based.”
Stacks are a very common data structure which, in the words of Andreas Antonopolous, allows information on “top of the stack” to either “push” or “pop.” The former operation explains the process of adding information to the stack, while the latter describes removing information from a stack. Furthermore, the order in which information is popped or pushed follows the “LIFO” principal, or Last-In, First-Out.
An operation like “3 4+,” would behave in the following:
Push “3” on to the stack.
Push “4” on to the stack.
The “+” operator, takes these two parameters, pops them both off the stack, adds them together, then pushes the result back on the stack. (i.e., pop, pop, add, push)
The resulting operation leads, in this case, to a “7” on the stack and the program terminates.
In Bitcoin Script, this operation would follow the same steps, but would also include the prefix “OP” before each variable. Let’s next look into how all this new vocabulary comes together in a real Bitcoin transaction.
A Bitcoin Script in Action
The majority of operations are signature transactions. This includes payments, exchanges, and most workings involving public and private keys. For the sake of this article, let’s take apart an exchange between the author and his colleague, Eddie Mitchell. Here the author (sender) will specify the public key of Mitchell (recipient), who will redeem the bitcoin sent by specifying a signature using the same public key.
Following this, the first two instructions of such a transaction are the signature and the public key used to generate that signature. This information is identified as “<sig>” and “<pubKey>” and pushed onto the stack. Mitchell determines these values as he is the recipient. This first half of the transaction is often called “scriptSig” or the “Unlocking Script.” In this section of the operation, there is also reference to a previously existing Unspent Transaction Output (UTXO).
The inclusion of the UTXO ensures that the author indeed owns the amount of bitcoin he is looking to send to Mitchell. The Bitcoin network completes this validation via miners and Bitcoin full nodes. In Mastering Bitcoin, author Andreas Antonopoulos explains it thusly:
“Each input contains an unlocking script and refers to a previously existing UTXO. The validation software will copy the unlocking script, retrieve the UTXO referenced by the input, and copy the locking script from that UTXO.”
The second portion of the transaction, the “Locking Script” or “scriptPubkey,” is then executed by the author. Based on the above image, the next instruction “OP_DUP” pops off the <pubKey> from the stack, duplicates it, then returns it to the stack.
The specific hashing function used for Bitcoin transactions is called SHA-256 (Secure Hash Algorithm) and is part of a larger group of functions known as SHA-2, which comes from a National Security Agency development in 1993. Other members of the SHA-2 family include SHA-224, SHA-256, SHA-384, and SHA-512 with each number representing the bit length of the message they produce.
The applications are vast within the field of information security, with the most relevant being Bitcoin and Haschash’s Proof-of-Work (PoW) consensus mechanism. The most notable feature of SHA-256 is its ability to prevent DoS attacks as mentioned above.
Returning to the transaction between the author and his colleague, users still need to add another piece of data to the stack. This next bit of information is the public key that the author specified at the beginning of the transaction. It is needed to generate the signature to redeem the bitcoin requested.
At this point, there are two critical pieces of hashed data on top of the stack: The hash of the public key as specified by the author and the hash of the public key used by Mitchell. From there the “OP_EQUALVERIFY” command is engaged which ensures that the author has indeed used the correct public keys. Following a handful of failed bitcoin transactions in his early days, the author has triple-checked that the public keys are those of Mitchell. As the public keys do match, the OP_EQUALVERIFY command expends these data points. Users are now only left with a signature and a public key. The final step is to verify that the signature of this transaction is indeed correct.
The Bitcoin scripting language is advantageous here as it needn’t draw from an extensive library to confirm the validity of the signature. All of this is built into the language.
The “OP_CHECKSIG” instruction at the end, then pops the remaining two items off of the stack, and if the <sig> matches the <pubKey>, then the operation will be rendered valid.
Compare, Contrast, and Adding Complexity
Although the following introduction was brief, it should give a basic idea of how a Bitcoin transaction is executed. Building on this, developers and enthusiasts can begin experimenting with more advanced operations, which will be the subject of later briefs.
Upcoming articles that build on this will dive deeper into digital signatures (ECDSA), multi-signature operations, Pay-to-Script-Hash (P2SH), and Timelocks.
For more information about other blockchain languages, please refer to BTCManager’s coverage of EOS, Ethereum, and TRON programming platforms.