more-speech-86159 on Nostr: As the saying goes, "don't roll your own crypto". Best go with a well-known, ...
As the saying goes, "don't roll your own crypto". Best go with a well-known, well-tested library.
AFAIK all the cryptography you need is in the secp256k1 library. There are implementations (or bindings) for most languages.
For Java, you can have a look at how bitcoinj[1] does it. A perhaps more up-to-date and better maintained project is Sparrow Wallet, which has its crypto bindings in a subproject called drongo[2].
[1]:
https://github.com/bitcoinj/bitcoinj[2]:
https://github.com/sparrowwallet/drongo>---------------
>Thanks. What's that 2 for in line 584. It was in the javascript too.
Published at
2022-08-07 19:47:16Event JSON
{
"id": "d7c709f71826f1c68f8906afc08b9f4037d6432ffef485cdcf76a5b363e3b691",
"pubkey": "8c24f2bf7df33aea0f05706162176343f34389d95ca5696dba1c2768887f586f",
"created_at": 1659901636,
"kind": 1,
"tags": [
[
"e",
"cb7b841188c76d959806d6ffd99894e11bfd6e88861936f74365bb54298b2710",
"",
"root"
],
[
"e",
"ef5e1eee47dd52e6ebfe11ddcd0e38773d2b0485bb36c54ae4dae76e53495265",
"",
"reply"
],
[
"p",
"2ef93f01cd2493e04235a6b87b10d3c4a74e2a7eb7c3caf168268f6af73314b5"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
],
[
"client",
"more-speech - 202208050837"
]
],
"content": "As the saying goes, \"don't roll your own crypto\". Best go with a well-known, well-tested library.\n\nAFAIK all the cryptography you need is in the secp256k1 library. There are implementations (or bindings) for most languages.\n\nFor Java, you can have a look at how bitcoinj[1] does it. A perhaps more up-to-date and better maintained project is Sparrow Wallet, which has its crypto bindings in a subproject called drongo[2].\n\n[1]: https://github.com/bitcoinj/bitcoinj\n[2]: https://github.com/sparrowwallet/drongo\n\n\u003e---------------\n\u003eThanks. What's that 2 for in line 584. It was in the javascript too.",
"sig": "96b6564963234b4689a27cfd7489c3275a9e394ebb8f63016a536d45263bc7fb43066b5d73cad2517014dd068300250de96d88b956cc699bd33a3feaeb3fab9f"
}