CryptoCoinsInfoClub.com

Ethereum Encryption Algorithm

Ethereum: Signing And Validating

Ethereum: Signing And Validating

Co-Founder of HelloSugoi. Hacking away on Ethereum (blockchain) DApps. Follow me on A core primitive of Ethereum and other cryptocurrencies is the ability to sign data that can be verified by anyone. This powers the distributed nature of blockchain. In Bitcoin you sign a transaction saying you want to give Sally 4 bitcoin. Without this property, anyone could make fake transactions giving themselves all coins. If you go to ecrecover-example on github for the full codebase. Simply follow the instructions in the README.md and see the results in the command line. Signing is the act of a user A signing data that anyone can validate came from user A. This is used in transactions to check if they are real. A common question is how can you validate transactions are real? The short answer is public-key cryptography. Its an algorithm with 3 parts. Encryption is generally used to hide data in other data. If you encrypt a string like hello world you get something like `dqE3gJz/+5CQHfSJwMP2nQ`. Its purpose is to hide the message hello world. Signing is used to create a different output string, but you also publicize the original message. The key creation will output two strings, a public and private key. It links them through an algorithm that has the signing and validation properties. A signature will take in a public key, private key, and message. The output will be another string that is the signature. Signature = F(public key, private key, message) Notice how validation does not require knowledge of the private key. This is what allows 3rd parties to validate information. If the output of the validation function is equal to the public key then the signature is real, otherwise its fake. The signature is made up of 3 variables: v, r, s. Ethereum employs Elliptic curve cryptograph Continue reading >>

Sha-1 May Be Broken But Ethereum Is Still Secure

Sha-1 May Be Broken But Ethereum Is Still Secure

SHA-1 May Be Broken But Ethereum Is Still Secure The widely used SHA-1 cryptographic hash function has been cracked by Google. Ethereum, however, is still secure. SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function, originally designed by the U.S. National Security Agency. Its purpose is to output a unique hash value (a seemingly random string of numbers and letters) that represents a specific data set; at least, thats how it was intended to work. SHA-1 has been used for digital signatures, file integrity verification, and protecting digital assets like credit card transactions, open-source software repositories, and much more. Now, thanks to the Netherlands Cryptology Group at Centrum Wiskunde & Informatica (CWI) and the Google Research Security, Privacy and Anti-Abuse Group, SHA-1s weakness has been exposed through documented proof of a collision. A collision occurs when two different data sets are input into a one-way function and the same hash output is delivered. This isnt entirely impossible (a collision is a natural, albeit rare, occurrence when mapping an infinite set to a finite set) but the purpose of SHA-1 was to make creating a collision technologically and financially unfeasible. According to Google/CWI, its now practically possible to craft two colliding PDF files and obtain a SHA-1 digital signature on the first PDF file which can also be abused as a valid signature on the second PDF file. The research team was able to create two PDF files that displayed different content, but output the same SHA-1 hash. To help people understand what they did, the two companies provided an infographic detailing their attack, and released a white paper for the more technically-inclined. Google and CWI may have generated the first known collision, but SHA-1s Continue reading >>

Cryptography - Which Cryptographic Hash Function Does Ethereum Use? - Ethereum Stack Exchange

Cryptography - Which Cryptographic Hash Function Does Ethereum Use? - Ethereum Stack Exchange

Which cryptographic hash function does Ethereum use? Many sources refer to the use of the "SHA3" cryptographic hash function within Ethereum, but the Ethereum project began before the SHA3 standard was finalised, and there was some confusion/controversy around the final parameters selected for the standard. Which function specifically did Ethereum actually end up with? Is it the same as the actual SHA3 standard, or one of the variants within the standard? Or is it a parameterisation of Keccak that doesn't match any of the variants? Ethereum uses KECCAK-256 . It should be noted that it does not follow the FIPS-202 based standard (a.k.a SHA-3), which was finalized in August 2015. According to this , NIST changed the padding to SHA3-256(M) = KECCAK [512] (M || 01, 256);which was different than the original padding proposed by the Keccak team. It seems that now people are calling the "original" SHA3 Keccak hashing "Keccak" and the new NIST SHA3 standard as "SHA-3". Using this online generator and the Solidity Online Compiler , I tested the difference between Keccak-256 and SHA3-256. I hashed the word testing using Ethereum and the 2 SHA3 hashing algorithms: Continue reading >>

Introduction To Zksnarks With Examples Consensys Media

Introduction To Zksnarks With Examples Consensys Media

Blockchain nerd, Ethereal explorer, Mystic Mathematician. Part of the @consensysllc mesh. Creator and chief architect, @uport_me. In this post we aim to give an overview of zk-SNARKs from a practical viewpoint. We will treat the actual math as a black box but will try to develop some intuitions around how we can use them, and will give a simple application of the recent work on integrating zk-SNARKs in Ethereum . The goal of zero-knowledge proofs is for a verifier to be able to convince herself that a prover possesses knowledge of a secret parameter, called a witness, satisfying some relation, without revealing the witness to the verifier or anyone else. We can think of this more concretely as having a program, denoted C, taking two inputs: C(x, w). The input x is the public input, and w is the secret witness input. The output of the program is boolean, i.e. either true or false. The goal then is given a specific public input x, prove that the prover knows a secret input w such that C(x,w) == true. We are specifically going to discuss non-interactive zero knowledge proofs, which means that the proof itself is a blob of data that can be verified without any interaction from the prover. Suppose Bob is given a hash H of some value, and he wishes to have a proof that Alice knows the value s that hashes to H. Normally Alice would prove this by giving s to Bob, after which Bob would compute the hash and check that it equals H. However, suppose Alice doesnt want to reveal the value s to Bob but instead she just wants to prove that she knows the value. She can use a zk-SNARK for this. We can describe Alices scenario using the following program, here written as a Javascript function: In other words: the program takes in a public hash x and a secret value w and returns true if t Continue reading >>

Mining Ethereum/wiki Wiki Github

Mining Ethereum/wiki Wiki Github

The word mining originates in the context of the gold analogy for crypto currencies. Gold or precious metals are scarce, so are digital tokens, and the only way to increase the total volume is through mining it. This is appropriate to the extent that in Ethereum too, the only mode of issuance post launch is via the mining. Unlike these examples however, mining is also the way to secure the network by creating, verifying, publishing and propagating blocks in the blockchain. Mining Ether = Securing the network = verify computation Ethereum Frontier like all blockchain technologies uses an incentive-driven model of security. Consensus is based on choosing the block with the highest total difficulty.Miners produce blocks which the others check for validity. Among other well-formedness criteria, a block is only valid if it contains proof of work (PoW) of a given difficulty.Note that in Ethereum 1.1, this is likely going to be replaced by a proof of stake model. The proof of work algorithm used is called Ethash (a modified version of Dagger-Hashimoto ) involves finding a nonce input to the algorithm so that the result is below a certain threshold depending on the difficulty. The point in PoW algorithms is that there is no better strategy to find such a nonce than enumerating the possibilities while verification of a solution is trivial and cheap. If outputs have a uniform distribution, then we can guarantee that on average the time needed to find a nonce depends on the difficulty threshold, making it possible to control the time of finding a new block just by manipulating difficulty. The difficulty dynamically adjusts so that on average one block is produced by the entire network every 12 seconds (ie., 12 s block time). This heartbeat basically punctuates the synchronisation Continue reading >>

How Ethereum Mining Works

How Ethereum Mining Works

Today, miners play an important role in making sure ethereum works. This role isn't immediately obvious, though. Many new users think that the sole purpose of mining is to generate ethers in a way that doesn't require a central issuer (seeour guide" What is Ether? "). This is true. Ethereum's tokens are created through the process of mining at a rate of 5 ether per mined block. But mining also has another at least asimportant role. Usually, banks are in charge of keeping accurate records of transactions. They ensure that money isn't created out of thin air, and that users don't cheat and spend their money more than once. Blockchains, though, introduce an entirely new way of record-keeping, one where the entire network, rather than an intermediary, verifies transactions and adds them to the public ledger. Although a 'trustless' or 'trust-minimizing' monetary system is the goal, someone still needs to securethe financial records, ensuring that no one cheats. Mining is one innovation that makes decentralized record-keeping possible. Miners come to consensus about the transaction history while preventing fraud (notably the double spending of ethers) an interesting problem that hadnt been solved in decentralized currencies before proof-of-work blockchains. Although ethereum is looking into other methods of coming to consensus about the validity of transactions, mining currently holds the platform together. Today, ethereum's mining process is almost the same as bitcoins . For each block of transactions, miners use computers to repeatedly and very quickly guess answers to a puzzle until one of them wins. More specifically, the miners will run the blocks unique header metadata (including timestamp and software version) through a hash function (which will return a fixed-length, Continue reading >>

Ethash Ethereum/wiki Wiki Github

Ethash Ethereum/wiki Wiki Github

This spec is REVISION 23. Whenever you substantively (ie. not clarifications) update the algorithm, please update the revision number in this sentence. Also, in all implementations please include a spec revision number Ethash is the planned PoW algorithm for Ethereum 1.0. It is the latest version of Dagger-Hashimoto, although it can no longer appropriately be called that since many of the original features of both algorithms have been drastically changed in the last month of research and development. See for the original version. The general route that the algorithm takes is as follows: There exists a seed which can be computed for each block by scanning through the block headers up until that point. From the seed, one can compute a 16 MB pseudorandom cache. Light clients store the cache. From the cache, we can generate a 1 GB dataset, with the property that each item in the dataset depends on only a small number of items from the cache. Full clients and miners store the dataset. The dataset grows linearly with time. Mining involves grabbing random slices of the dataset and hashing them together. Verification can be done with low memory by using the cache to regenerate the specific pieces of the dataset that you need, so you only need to store the cache. The large dataset is updated once every 30000 blocks, so the vast majority of a miner's effort will be reading the dataset, not making changes to it. See for design rationale considerations for this algorithm. WORD_BYTES = 4 # bytes in wordDATASET_BYTES_INIT = 2**30 # bytes in dataset at genesisDATASET_BYTES_GROWTH = 2**23 # dataset growth per epochCACHE_BYTES_INIT = 2**24 # bytes in cache at genesisCACHE_BYTES_GROWTH = 2**17 # cache growth per epochCACHE_MULTIPLIER=1024 # Size of the DAG relative to the cacheEPOCH_LEN Continue reading >>

A Closer Look At Ethereum Signatures

A Closer Look At Ethereum Signatures

Asymmetric cryptography is one of the most important computer science inventions of the previous century. It also lies at the heart of all blockchain technology. In this post well take a deeper look at how Ethereum uses the Elliptic Curve Digital Signature Algorithm (ECDSA) to validate the origin and integrity of messages. Encryption techniques like ECDSA are also essential in securely extending existing blockchains. Weve seen this in my past post analyzing decentralized exchanges where a DEX uses signatures in its offchain communication. As the blockchain ecosystem matures I expect we will see more Layer-2 and Layer-3 extensions of the existing low level blockchain infrastructure. In Ethereum like any other blockchain system there is a private and a public key. These keys are generated when you create a new blockchain account. Keeping the private key secure is essential because any copy of it allows access to the ledger. Hardware wallets to securely store the private key have become an essential best practice. The notion of an account is a bit of a misnomer, because in strict technical terms there are only keys and a ledger of funds that correspond with those keys. An Ethereum or Bitcoin address is essentially a hashed version of the public key. Elliptic Curve Cryptography (ECC) and ECDSA are a specific flavor of asymmetric cryptography. They are widely used in blockchain technology because of three reasons: Their computational performance is economical compared to a lot of other algorithms The keys that are generated are relatively short Bitcoin started it, so most new blockchain projects have copied it ECDSA uses the algebraic structure of elliptic curves over finite fields. Without getting into the mathematics of it, they require a set of constants to define this c Continue reading >>

Bitcoin Vs Ethereum: Driven By Different Purposes

Bitcoin Vs Ethereum: Driven By Different Purposes

Bitcoin Vs Ethereum: Driven by Different Purposes Ethereum has received a lot of attention since its announcement at the North AmericanBitcoinConference in early 2014 byVitalikButerin. The natural consequence of its rising popularity has been its constant comparison toBitcoin, the first virtual currency. It is important for investors to understandthe similarities and differences between BitcoinandEthereum. Bitcoin, the first virtual currency, was born seven years back. It introduced a novel idea set out in a white paper by the mysterious SatoshiNakamoto:Bitcoinoffers the promise of lower transaction fees than traditional online payment mechanisms and is operated by a decentralized authority, unlike government issued currencies . There are no physicalBitcoins , only balances associated with public and private keys. Over these years, the acceptance of the concept of a virtual currency has increased among regulators and government bodies.Althoughit isnt a formally recognized medium of payment or store of value, it has managed a niche for itself and continues to coexist in the financial system despite being regularly scrutinized and debated. The attempts to understandBitcoinmoreclosely resulted in the discovery of blockchain , the technology that powers it. Theblockchainis not just the hottest topic in theFinTechworld but also asought after technology in many industries. Ablockchainis a public ledger of all transactions in a given system that have ever been executed. It is constantly growing as completed blocks are added to it. The blocks are added to theblockchainin linear, chronological order through cryptography, ensuring they remain beyond the power of manipulators. Theblockchainthus stands as a tamper-proof record of all transactions on the network, accessible to all Continue reading >>

Glossary | Ethereum Builder's Guide

Glossary | Ethereum Builder's Guide

One of the things that cryptocurrency, and really any new genre of technology, is notorious for is the sheer quantity of vocabulary that gets generated to describe all of the new concepts. Anyone dealing with peer-to-peer internet software on anything more than a casual basis needs to deal with concepts of cryptography, including hashes, signatures and public and private keys, symmetric and asymmetric encryption, denial of service protection, as well as arcane constructions such as distributed hash tables and webs of trust. New Bitcoin users are forced to contend with learning not just the common basics of cryptography, but also additional internal jargon such as "blocks", "confirmations", "mining", "SPV clients" and "51% attacks", as well as economic concepts like incentive-compatibility and the fine nuances of centralization and decentralization. Ethereum, being a decentralized application development platform based on a generalization of a cryptocurrency, necessarily incorporates both of these sets of concepts, as well as adding many of its own. To help anyone new to Ethereum, whether they are in it as cryptocurrency enthusiasts, business owners, social or political visionaries, web developers or are simply ordinary people looking to see how the technology can improve their lives, the following list is intended to provide a basic summary of the vocabulary that Ethereum users often tend to use: See also: Computational infeasibility: a process is computationally infeasible if it would take an impracticably long time (eg. billions of years) to do it for anyone who might conceivably have an interest in carrying it out. Generally, 280 computational steps is considered the lower bound for computational infeasibility. Hash: a hash function (or hash algorithm) is a process Continue reading >>

Privacy On The Blockchain

Privacy On The Blockchain

Blockchains are a powerful technology, as regular readers of the blog already likely agree. They allow for a large number of interactions to be codified and carried out in a way that greatly increases reliability, removes business and political risks associated with the process being managed by a central entity, and reduces the need for trust. They create a platform on which applications from different companies and even of different types can run together, allowing for extremely efficient and seamless interaction, and leave an audit trail that anyone can check to make sure that everything is being processed correctly. However, when I and others talk to companies about building their applications on a blockchain, two primary issues always come up: scalability and privacy. Scalability is a serious problem; current blockchains, processing 3-20 transactions per second, are several orders of mangitude away from the amount of processing power needed to run mainstream payment systems or financial markets, much less decentralized forums or global micropayment platforms for IoT. Fortunately, there are solutions , and we are actively working on implementing a roadmap to making them happen. The other major problem that blockchains have is privacy. As seductive as a blockchains other advantages are, neither companies or individuals are particularly keen on publishing all of their information onto a public database that can be arbitrarily read without any restrictions by ones own government, foreign governments, family members, coworkers and business competitors. Unlike with scalability, the solutions for privacy are in some cases easier to implement (though in other cases much much harder), many of them compatible with currently existing blockchains, but they are also much less s Continue reading >>

Algorithmia - Open Marketplace For Algorithms

Algorithmia - Open Marketplace For Algorithms

Trustless Machine Learning Contracts; Evaluating and Exchanging Machine Learning Models on the Ethereum Blockchain Algorithmia Research - Besir Kurtulmus, Kenny Daniel - 2018 Download Paper Blog Post Example Contract Source Code Using blockchain technology, it is possible to create contracts that offer a reward in exchange for a trained machine learning model for a particular data set. This would allow users to train machine learning models for a reward in a trustless manner. The smart contract will use the blockchain to automatically validate the solution, so there would be no debate about whether the solution was correct or not. Users who submit the solutions wont have counterparty risk that they wont get paid for their work. Contracts can be created easily by anyone with a dataset, even programmatically by software agents. This creates a market where parties who are good at solving machine learning problems can directly monetize their skillset, and where any organization or software agent that has a problem to solve with AI can solicit solutions from all over the world. This will incentivize the creation of better machine learning models, and make AI more accessible to companies and software agents. A consequence of creating this market is that there will be a well defined price of GPU training for machine learning models. Crypto-currency mining also uses GPUs in many cases. We can envision a world where at any given moment, miners can choose to direct their hardware to work on whichever workload is more profitable: cryptocurrency mining, or machine learning training. Bitcoin was first introduced in 2008 to create a decentralized method of storing and transferring funds from one account to another. It enforced ownership using public key cryptography. Funds are store Continue reading >>

How Does A Hashing Algorithm Work?

How Does A Hashing Algorithm Work?

Hashing algorithms are an important weapon in any cryptographers toolbox. They are everywhere on the internet, mostly used to secure passwords, but also make up an integral part of most crypto currencies such as Bitcoin and Litecoin . The main features of a hashing algorithm are that they are a one way function or in other words you can get the output from the input but you cant get the input from the output just like elliptic curve cryptography where you cant get the private key from the public key. The other property is that the same input creates the same output. Most hashing algorithms, including the SHA and RIPEMD are all descended from the MD4 family. The MD4 hashing algorithm was developed by Ronald Rivest specifically to allow very easy software implementation. The MD4 algorithm and subsequent SHA algorithms use 32 bit variables with bitwise Boolean functions such as the logical AND, OR and XOR operators to work through from the input to the output hash. So how does a hashing algorithm work in this case a look at SHA1: 2- Then choose a word to hash. In this case we will choose the word CRYPTO 3- Convert the word to ASCII American Standard Code for Information Interchange. Each letter has a number assigned to it. CRYPTO 01000011-01010010-01011001-01010000-01010100-01001111 CRYPTO 0100001101010010010110010101000001010100010011111 6- Add zeros to make the message equal to 448 mod 512 (modular arithmetic just like a clock except with 512 hours). So a 48 bit message with the added one will need to have 399 zeros added to the end, and if the message was 64 characters (or 512 bits) long you would need 447 zeros. 01000011010100100101100101010000010101000100111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Continue reading >>

Ethash - Wikipedia

Ethash - Wikipedia

This article has multiple issues. Please help improve it or discuss these issues on the talk page . This article relies too much on references to primary sources . Please improve this by adding secondary or tertiary sources . ( Learn how and when to remove this template message ) The topic of this article may not meet Wikipedia's general notability guideline . Please help to establish notability by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond its mere trivial mention. If notability cannot be established, the article is likely to be merged , redirected , or deleted . Continue reading >>

Dev Writes Ethereum Code For Insecure Sha-1 Crypto Hash Function

Dev Writes Ethereum Code For Insecure Sha-1 Crypto Hash Function

Dev writes Ethereum code for insecure SHA-1 crypto hash function Interaction with legacy systems but not all think it's a good idea Using Ethereum's programming language Solidity, a dev has controversially written code for making data authentication signatures with the insecure SHA-1 cryptographic hash function. Nick Johnson, the London-based Ethereum developer who authored the code, told The Register: "SHA1 is still used by a lot of legacy systems, including many SSL/TLS certificates, parts of DNSSEC, and Git. Being able to verify hashes produced in those systems lets us interact with them on the Ethereum blockchain." But not all agree that's a good idea. University College London postdoctoral blockchain researcher Patrick McCorry told The Register: "This comes down to a security vs compatibility argument. "Attacks only get better and we as a community should do our best to move away from broken algorithms." But he conceded that "many protocols in the web still rely on SHA-1 and this works OK because the cost (and time) to find a collision is still absurdly high". The US National Security Agency and National Institute of Standards and Technology came up with the basic algorithms for making the SHA-1 signatures in the 90s . They're widely used for proving that data from software code to emails and website certificates hasn't been altered. But in February, researchers found a way to change a PDF and leave its SHA-1 signature the same a "collision" which means SHA-1 is now essentially useless for proving documents haven't been altered. An issue was opened in November 2016 on the Ethereum GitHub repo for a precompiled contract for the SHA-1 hashing algorithm, in order to verify different services on-chain at lower cost than running it on the network. Johnson admitted: "SH Continue reading >>

More in ethereum