Nanocoin – A minimal cryptocurrency implemented in Haskell
1–10 of 11 posts
Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#2For 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
TrueRe: Nanocoin – A minimal cryptocurrency implemented in Haskell
#3Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#4Related question: What does one need to do before they can downvote posts?
Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#5Related question: What does one need to do before they can downvote posts?
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
#6Related question: What does one need to do before they can downvote posts?
Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#7Related question: What does one need to do before they can downvote posts?
Don't like it? Hide it.
Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#8https://github.com/wyc/haschain/blob/master/Secp256K1.hs
Should probably wrap it into a Group or something. Of course it's not secure, just for fun.
Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#9Re: Nanocoin – A minimal cryptocurrency implemented in Haskell
#10The 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…
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...