Elliptic-curve cryptography and support in Golang

wesl_ee
edited February 2021 in Whitepaper / Core

Playing around with some concepts laid out in the design document, I've found that Go's native "crypto/elliptic" package doesn't support a secp256k1 curve [1]. It does support a very similar curve, secp256r1, which seems to be comparable. I generated a key pair using OpenSSL (NIST calls this curve "prime256v1" but they are equvalent)) and was able to sign things with this pair in Go.

Though it is easy to change now, this also got me thinking about how we would go about swapping ECCs in the future if we ever needed to. I think the procedure should be easy but it is something to still keep in mind.

[1] https://golang.org/pkg/crypto/elliptic/#Curve

Comments

  • The initial command line client is here: https://github.com/PeernetOfficial/Cmd

    In the file "Test_test.go" it contains some debug functions to play around with encryption/decryption.

    I agree that it makes sense to come up with a standard on how we can evaluate (and swap out) any encryption/hashing algorithm in the future if needed. I wouldn't see a problem if future clients would support 2 schemes and just try out both for incoming packets and see which one validates the signature. After a while (could be either measured in years or % adoption of the network or both) the first scheme could be dropped.

  • anyla11
    edited July 2023

    Cryptocurrency investment can be useful in the future for various reasons, and understanding cryptocurrency prices is essential for making informed investment decisions. Here are some key points to consider:

    1. Potential for High Returns: Cryptocurrencies have historically exhibited significant price volatility, which can create opportunities for substantial returns on investment. Some early adopters of cryptocurrencies like Bitcoin experienced remarkable price increases, leading to substantial profits.
    2. Diversification: Adding cryptocurrencies to an investment portfolio can offer diversification benefits. Cryptocurrencies often have a low correlation with traditional asset classes like stocks and bonds, meaning they may not move in sync with the broader financial markets. This can potentially reduce overall portfolio risk and increase the potential for higher risk-adjusted returns.
    3. Decentralization and Financial Inclusion: Cryptocurrencies operate on decentralized blockchain technology, providing financial services and access to people who may not have access to traditional banking systems. This technology has the potential to empower individuals in underserved regions and promote financial inclusion globally.
    4. Hedge against Inflation: Some cryptocurrencies, like Bitcoin, have a limited supply, making them potentially resistant to inflation. As central banks continue to print money during economic crises, investors may see cryptocurrencies as a store of value to protect against currency devaluation.
    5. Technological Innovation: Cryptocurrencies are underpinned by blockchain technology, which has far-reaching implications beyond just finance. Blockchain has the potential to revolutionize various industries, including supply chain management, healthcare, and real estate, among others.
    6. International Transactions: Cryptocurrencies can facilitate fast and borderless transactions, making them attractive for international trade and cross-border remittances. By eliminating intermediaries and reducing transaction fees, cryptocurrencies can streamline global payments.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!