secp256k1 | Optimized C library for EC operations on curve secp256k1 | Cryptography library

 by   Bitcoin-ABC C Version: v0.27.1 License: MIT

kandi X-RAY | secp256k1 Summary

kandi X-RAY | secp256k1 Summary

secp256k1 is a C library typically used in Security, Cryptography, Bitcoin applications. secp256k1 has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

optimized c library for cryptographic operations on curve secp256k1. this library is used for consensus critical cryptographic operations on the ecash network. it is maintained within the bitcoin abc repository, and is mirrored as a separate repository for ease of reuse in other ecash projects. developers who want to contribute may do so at [reviews.bitcoinabc.org] use at your own risk. this library is intended to be the highest quality publicly available library for cryptography on the secp256k1 curve. however, the primary focus of its development has been for usage in the ecash system and usage unlike bitcoin’s may be less well tested, verified, or suffer from a less well thought out interface. correct usage requires some care and consideration that the library is fit
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              secp256k1 has a low active ecosystem.
              It has 11 star(s) with 15 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. On average issues are closed in 17 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of secp256k1 is v0.27.1

            kandi-Quality Quality

              secp256k1 has no bugs reported.

            kandi-Security Security

              secp256k1 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              secp256k1 is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              secp256k1 releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of secp256k1
            Get all kandi verified functions for this library.

            secp256k1 Key Features

            No Key Features are available at this moment for secp256k1.

            secp256k1 Examples and Code Snippets

            No Code Snippets are available at this moment for secp256k1.

            Community Discussions

            QUESTION

            subtle crypto with ECDSA : Cannot create a key using the specified key usages
            Asked 2021-Jun-10 at 15:15

            I wanted to import an ECDSA private key in Chrome to sign some data, tried yet with crypto.subtle.importKey: feeded the importKey with a derivated private key using secp256k1.

            When trying to use the lib, I got stuck with the following error: Cannot create a key using the specified key usages.

            The code:

            ...

            ANSWER

            Answered 2021-Jun-10 at 15:15

            Web Cryptography API does not support the secp256k1 curve. It will also not support it in the future.

            Source https://stackoverflow.com/questions/67922741

            QUESTION

            Point Doubling (P -> 2P) The Base Point of the Secp256k1 Elliptic Curve
            Asked 2021-May-16 at 00:55

            as a learning exercise, I am trying to code the first point doubling (Base point P -> 2P) for the Secp256k1 Elliptic Curve. I am using Javascript, and the ethers package for BigNumber. Frustratingly, I am running into a problem where the result I am getting for 2P doesn't appear to lie on the curve. Can someone please help me determine where I am making a mistake?

            The coordinates I'm getting as a result are:

            ...

            ANSWER

            Answered 2021-May-16 at 00:55

            As kelalaka pointed out in a comment on the original post, I was confusing the the order of the group and the finite field Fp. I was getting values modulo the Group Order, when I should've been using the values modulo prime p used to define the finite field.

            The new and correct result I get is:

            Source https://stackoverflow.com/questions/67551727

            QUESTION

            ECDSA signing/verifiying appears to be only considering the first 32 bytes of the data
            Asked 2021-May-15 at 10:43
            ec = OpenSSL::PKey::EC.new('secp256k1')
            ec.generate_key
            signature = ec.dsa_sign_asn1("A" * 64)
            refute ec.dsa_verify_asn1("A" * 32, signature) # Fails here
            
            ...

            ANSWER

            Answered 2021-May-15 at 10:43

            When signing, not the data itself is signed, but the hash of the data. This is necessary on the one hand to be able to sign longer messages and on the other hand for security reasons (s. here).

            For secp256k1 typically a digest with an output size of 256 bit is used (s. here), e.g. SHA256.

            If you take a digest with a larger output size, the leftmost n bits of the hash are considered according to NIST FIPS 186-4 (s. here, where n is the key size, i.e. bit size of the generator order, 256 bit for secp256k1).

            This is the reason why in the posted example the verification is successful: Only the first 32 bytes are considered, which are identical.

            If the hashed value of the data is used instead, the verification fails as expected:

            Source https://stackoverflow.com/questions/67543512

            QUESTION

            How to generate a random hexadecimal string in Julia
            Asked 2021-Apr-28 at 22:05

            I am trying to generate a random hexadecimal string for a blockchain wallet application but I am not sure how I would do it in Julia. In Python, I would do something like

            ...

            ANSWER

            Answered 2021-Apr-26 at 13:41

            As stated in the documentation of the standard library:

            Julia also provides the RandomDevice RNG type, which is a wrapper over the OS provided entropy.

            Note that the word "entropy" is abused here. The OS will - with high likelihood - not directly return entropy, it will return random bytes from it's own seeded pseudo random number generator.

            Source https://stackoverflow.com/questions/67267644

            QUESTION

            Make serde only produce hex strings for human-readable serialiser?
            Asked 2021-Apr-18 at 12:37

            I'm currently using serde-hex.

            ...

            ANSWER

            Answered 2021-Apr-18 at 12:37

            The implementation of a function usable with serde's with-attribute is mostly boilerplate and looks like this. This only differentiates between human-readable and other formats. If you need more fine-grained control, you could branch on a thread-local variable instead.

            Source https://stackoverflow.com/questions/67145666

            QUESTION

            Hyperledger besu with permissioning enabled error
            Asked 2021-Apr-02 at 12:16

            I am using the quickstart network provided by Hyperledger besu, and I want to test and see how permissioning works with the permissioning management dapp. I use this repo: https://github.com/bretthenderson/besu-quickstart So when I run the run-permissioning.sh script to build the dapp and run the test network everything works fine and the network starts succesfully then when I run the run-permissioning-dapp.sh script it works fine and it compiles and deploys the permissioning smart contracts then restarts the network with permissioning enabled but after that the bootnode container crashes with these logs :

            ...

            ANSWER

            Answered 2021-Apr-02 at 12:16

            The fix is to the issue is to add --permissions-nodes-contract-version=2 to your besu command line.

            This is because in v 2.0.0 of permissioning smart contracts repo we changed the interface as per the changelog https://github.com/ConsenSys/permissioning-smart-contracts/releases/tag/v2.0.0 It is in the besu docs here https://besu.hyperledger.org/en/stable/HowTo/Limit-Access/Specify-Perm-Version/ but I have already reported this issue and it has been fixed on the documentation of on-chain permissioning tutorial.

            you can find more details here

            1. Github issue
            2. Besu Docs

            Source https://stackoverflow.com/questions/66918644

            QUESTION

            "No negotiable cipher suite" when using OpenJDK 8, but not when using Oracle Java 8
            Asked 2021-Mar-29 at 06:19

            I'm trying to connect to a MariaDB (10.5.6-MariaDB-log) database using OpenJDK 8 with sqlline. The connection should use ssl. The user in the database is created like this:

            ...

            ANSWER

            Answered 2021-Mar-29 at 06:19

            Turns out, the solution is rather simple. When adding another extension directory to the java command, the connection works:

            Source https://stackoverflow.com/questions/66777539

            QUESTION

            How to generate private EC private / public key pair in DER format using node.js, where public key is compressed?
            Asked 2021-Mar-25 at 18:18

            Goal:
            Generate private / public EC key pair using specified curve.
            Public key should be in compressed DER.
            Private key should be in DER.

            Example:
            Private key Base64:

            ...

            ANSWER

            Answered 2021-Mar-25 at 18:18

            I managed to solve it.

            1. Generate keys using ecdh.generateKeys and export public key as compressed.
            2. Use ASN1.js and create schema for RFC5480 and RFC59159.
            3. Encode as DER generated keys using created ASN1.js schemas.

            Source https://stackoverflow.com/questions/66382638

            QUESTION

            transaction could not be decoded: could not recover secp256k1 key: calculated Rx is larger than curve P
            Asked 2021-Mar-23 at 16:02

            I am getting following error while trying to compile solidity contract:

            ...

            ANSWER

            Answered 2021-Mar-22 at 07:44

            In my case, downgrading the version of @truffle/hdwallet-provider in package.json from 1.2.4 to 1.2.3 helped:

            Source https://stackoverflow.com/questions/66741987

            QUESTION

            How to find a point of an elliptic curve in crypto++ (with given x)? Or how to compute a root in finite field? Or root of Polynomial Ring?
            Asked 2021-Mar-15 at 08:54

            Is there any way in crypto++ to check if an EC contains a point with a given x-coordinate?

            One solution would be solving the EC polynomial for given x. One side of the equation already done in code. I 'just' need to compute the root of it (over a finite field)

            ...

            ANSWER

            Answered 2021-Mar-15 at 08:54

            Yes, you can. The library has support for compression and decompression of points. During the decompression, the library must find y if it can.

            The header of the DecodePoint

            Source https://stackoverflow.com/questions/66592082

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install secp256k1

            libsecp256k1 can be built using autotools:. This library aims to have full coverage of the reachable lines and branches.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Bitcoin-ABC/secp256k1.git

          • CLI

            gh repo clone Bitcoin-ABC/secp256k1

          • sshUrl

            git@github.com:Bitcoin-ABC/secp256k1.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cryptography Libraries

            dogecoin

            by dogecoin

            tink

            by google

            crypto-js

            by brix

            Ciphey

            by Ciphey

            libsodium

            by jedisct1

            Try Top Libraries by Bitcoin-ABC

            bitcoin-abc

            by Bitcoin-ABCC++

            bitcoinabc.org

            by Bitcoin-ABCHTML