Optimizing SHA-256

A hardware maker optimizes one or more of: cost, performance, efficiency, time to market or reliability.

In this article we walk the interested reader through this process for SHA-256, with emphasis on ASICs, and finally leading to the supply chain. In parentheses you find the rough improvement. C = cost, E = efficiency, P = performance. Note that C+5% means cost was improved (=reduced) by 5%. The article is rather dry without drawings. With sufficient interest we might add more detail or drawings. From FPGA on it’s a firsthand account.

For now it’s good as it is. Enjoy.


[This article is an edited version of the talk given by Werner Almesberger at ETC Summit 2019 in Vancouver, on Oct 4th, 2019.]
Video: https://www.youtube.com/watch?v=_enGUG_Jbi4

Good afternoon, my name is Werner Almesberger.

I’ve worked on the Linux kernel many years ago, and today I talk about what I am working on at the moment. For a change that has nothing to do with software, it’s a mining ASIC for ETC, for Ethash. Linzhi is a Shenzhen-based fabless semiconductor company, we announced our Ethash miner at the last ETC Summit, expecting a performance of about 1.4 …


The Original Idea

Scrypt predates cryptocurrencies, and first appeared in the cryptocurrency scene as part of Tenebrix in September 2011, implemented by ArtForz. A few weeks later it was picked up by Charlie Lee for Litecoin, and is in use by Litecoin until today.

Tenebrix promised Scrypt to be ‘GPU resistant’, and to ‘resist the creation of efficient GPU, FPGA and even ASIC implementations’. It promised to ‘remain CPU friendly and GPU hostile’, and to become a ‘CPUclusive cryptocurrency’.

Early Tenebrix users reported hashrates of about 1.6 khash/sec on their CPUs.
Today Tenebrix is history, however Litecoin is still around and…


We know more than what we have talked about so far.
We know but we cannot prove.

There are two types of knowledge: A priori and a posteriori knowledge.

Our knowledge about the attack on Ethereum is a posteriori knowledge, so we don’t need to ask anyone, and we don’t need proof ourselves.
We know.
A posteriori are empirical facts unknowable by reason alone.

Since we don’t want to ally with the attackers, and we have no proof that would satisfy an audience that is tired in a world of fake news and FUD, what we decided to do is…


Linzhi E1400 masks released.
Linzhi E1400 masks released.

Today we ordered the first set of wafers for our Ethash ASIC, announced almost a year ago on September 13, 2018 at the ETC Summit 2018 in Seoul. This is called the chip tapeout.

The announced specs were for 1400 MHash at 1000 Watts. Pricing was announced as 4 months ROI, and the timeline was given as 12/18 for tapeout, 04/19 for samples and 06/19 for mass production.

The key points of today’s first wafer order for our new Linzhi E1400 Ethash ASIC are:

  • Name of chip: Linzhi E1400
  • Number of wafers ordered: 37
  • Theoretical maximum Ethash performance from ordered…


EIP 1057 (ProgPoW): Open Chip Design for 1% cost/power increase
​仅带来1%能耗比提升的开源芯片设计

Adding a pseudo-random program to the PoW algorithm is a key technical idea described in EIP 1057 (ProgPoW). The theory goes that the compute area of a GPU is underutilized compared to memory bandwidth. ProgPoW is then designed such that it “saturates both compute and memory bandwidth at once”.

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1057.md

Since the GPU is almost fully utilized, there’s little opportunity for specialized ASICs to gain efficiency.
There should be little opportunity for efficiency gains compared to a commodity GPU.
While a custom ASIC is still possible, the efficiency gains available are…


Can you make an ASIC for algorithm X?
How fast can it be?
Can it be better than Y?

Today we want to document the 5 steps that we typically think through, roughly, to answer such questions.
We intentionally leave out considerations for platform, programmability and software stack, industry trends or competition. This article is about the technical feasibility of a chip design for a given algorithm.

1. Math First

If we have an algorithm’s math description, we start from that. If we only have source code, we need to convert it to a math description first.
The reason for going to math first…


ECIP 1043 proposed to set a limit on the maximum size of the DAG, and no longer increase it on epoch schedule.
https://github.com/ethereumproject/ECIPs/pull/91

ECIP 1043 was closed by its author Cody Burns in December 2018, but today we take another look at motivation and specification, from our perspective of being a Shenzhen asicmaker (with upcoming Ethash chip).

Motivation (from the ECIP):

  • DAG has failed at ASIC Resistance and now serves as deterrent to broader investment in ASICs
  • increasing DAG has negative impact on security and acts as anti-competitive bug preventing investment in mining
  • increasing DAG will eventually reach limit of…


Linzhi Ltd. is a private fabless semiconductor company in Shenzhen.
On January 8th, we called upon Ethereum developers to publish rules and guidelines for what constitutes a good ProgPoW ASIC maker.
https://www.coindesk.com/ethereum-miner-linzhi-calls-out-project-coders-for-proposed-asic-ban

Today Alexey Akhunov published a wonderful opinion piece with 4 claims, which we see as a massive effort to bridge the hardware-software divide.
https://medium.com/@akhounov/my-take-on-progpow-looking-for-a-reasonable-answer-to-a-reasonable-question-9f13ffd4e9d7
The Qi Hardware community provided a Chinese translation of Alexey’s claims:
https://qihardware.org/2019/02/03/my-take-on-progpow-chinese.html

To respond, we first quote Chris Ziomkowski, founder of XTend.online (unaffiliated with us).

The reasonable question was: “What should chipmakers do to not be labeled bad actors after designing a crypto (here…


On January 8, 2019, Linzhi Ltd, a private fabless semiconductor company in Shenzhen, called upon Ethereum developers to publish rules and guidelines for what constitutes a good ProgPoW ASIC maker.

https://www.coindesk.com/ethereum-miner-linzhi-calls-out-project-coders-for-proposed-asic-ban

Little did we know that an intensive debate between many stakeholders would ensue, and since we now feel that has come to a conclusion, we want to summarize lessons learned, our takeaway. Biased.

Ethereum Governance

Ethereum is a wonderful project, decentralized, romantic. Anyone can be a developer, pseudonymous and anonymous members are welcome. Motives or second agendas are not questioned in crypto utopia.
Polkadot, cat herders, magicians, Vitalik, core devs…

Linzhi ASICs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store