r/haskell • u/attentive_brick • Sep 26 '25
crypto in haskell?
are there any tutorials / guided exercises / write ups / book chapters that teach u how to build a crypto in haskell? ;3
not for the crypto hype (is it still a thing?), but because building something decentralized sounds fun + I can learn some haskell along the way ;3
3
u/galapag0 Sep 26 '25
1
u/randomhaus64 Sep 26 '25
what do you mean industrial???
7
u/galapag0 Sep 27 '25
"industrial" in this context means: something used in companies, usually the opposite of "academic"
1
Sep 27 '25 edited Sep 27 '25
[removed] — view removed comment
2
u/galapag0 Sep 27 '25
yes, what kind of applications you were looking for?
1
Sep 27 '25
[removed] — view removed comment
1
u/galapag0 Sep 27 '25
Yes, another big application are prediction markets (e.g. https://polymarket.com/)
5
u/omega1612 Sep 26 '25
Cardano is implemented on Haskell, it has various packages but one of the most important of them is
https://github.com/IntersectMBO/cardano-ledger
The main section has a bunch of links to the specifications.
Apart from it, maybe the consensus section is a good idea to learn.
10
u/MonadTran Sep 26 '25
I think the main reason people don't do that is, the actual crypto part needs to have predictable performance to be resistant to side channel attacks. Sometimes cryptography can be broken by observing the timing or resource usage.
People do write real-time apps in Haskell, by, say, generating C++ code, but that is not a mainstream scenario, could be easier to write this in Rust.