Live data from Hacker News

Nanocoin – A minimal cryptocurrency implemented in Haskell

github.com

1–10 of 11 posts

Re: Nanocoin – A minimal cryptocurrency implemented in Haskell

#2
The extensive README is also a pretty good intro to how one can do crypto (as in cryptography: get off my lawn!) in Haskell using the excellent cryptonite library.

For those who won't click through to TFR:

    > import Crypto.Number.Hash (SHA3_256)
    > import Crypto.PubKey.ECC.ECDSA (sign, verify)
    > import Crypto.PubKey.ECC.Generate (generate)
    > import Crypto.PubKey.ECC.Types (getCurveByName, SEC_p256k1)
    
    > let msg = "hello world" :: ByteString
    > let secp256k1 = getCurveByName SEC_p256k1
    > (pubKey, privKey)  sig  verify SHA3_256 pubKey sig msg
    True

Re: Nanocoin – A minimal cryptocurrency implemented in Haskell

#5

Related question: What does one need to do before they can downvote posts?

I've wondered that myself. There's also no 'flag' link for comments that I can see as well.

And to the guy who says there's no downvoting, why do some comments get lighter and lighter until they're almost impossible to see? Especially if it's an unpopular opinion?

Re: Nanocoin – A minimal cryptocurrency implemented in Haskell

#10
post #2

The extensive README is also a pretty good intro to how one can do crypto (as in cryptography: get off my lawn!) in Haskell using the excellent cryptonite library. For those who won't click through to TFR: > import Crypto.Number.Hash (SHA3_256) > import Crypto.PubKey.ECC.ECDSA (sign, verify) > import Crypto.PubKey.ECC.Generate (generate) > import Crypto.PubKey.ECC.Types (getCurveByName, SEC_p256k1) > let msg = "hello…

Is cryptonite anything like production ready? I mean, does it protect against timing side channels (perhaps using crypto instructions like AES-NI), etc.

Something I didn't like about it is that it exposes crypto primitives, including stuff like TripleDES, with no warning[0]. The tutorial also has you handle IVs directly.[1]

[0] https://hackage.haskell.org/package/cryptonite-0.24/docs/Cry...

[1] https://hackage.haskell.org/package/cryptonite-0.24/docs/Cry...

Post reply on HN