Giter VIP home page Giter VIP logo

Comments (13)

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

I have installed the GMP library on Ubuntu 18.04 and then installed the relic library following the steps below.
cd relic-main
mkdir relic-target
cd relic-target
cmake ..
make
make install
I encountered the following issue while using relic.
微信截图_20240423224906
my program calling the relic library is as follows.
微信截图_20240423225108
Can you help me solve this problem?

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

Hi,

Support to the SM2-P256 curve is not complete and may be buggy. I suggest picking another curve for your implementation and experiments.

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

However, I encountered the same issue when I chose other curves. Could you please tell me if I missed any steps during the installation process? When using ep_param_set_any(), the displayed curve is NIST-P256, but no other curves can be used.

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

I believe the latest commit on HEAD solves the issue for curve SM2_P256. Can you please try to update, build the library+binaries and reopen the issue if it still persists?

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

I want to use the curves in 'relic_ep.h', I modified my program, but it still has errors.
86540a4712b971f3ce262ce3851ef21
3be801d70111aa3e39040c435d69d1b

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

How do I use these curves? Do I need to add ../presets/.sh ../during the installation process?"

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

You cannot pass NIST-P192 because the library by default is built for 256-bit fields. You need to reconfigure+recompile for that.

Yes, the presets configure the library correctly for many parameter sets.

I will continue looking into the other error.

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

I understand that I cannot use NIST-P192, but I still don't know how to use SM2-P256. I'm new to this area, so please forgive my ignorance. And by default, can 256-bit fields only use NIST-P256?

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

I just tried the code below with the latest version and I saw no errors:

#include "relic.h"

int main() {
        ep_t p;

        core_init();
        ep_param_set(NIST_P256);
        ep_param_print();
        ep_rand(p);
        ep_print(p);

        ep_param_set(SM2_P256);
        ep_param_print();
        ep_rand(p);
        ep_print(p);
        core_clean();
        return 0;
}

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

微信截图_20240424014602
I downloaded the project again for configuration, ran your program, and encountered this error. Is it possibly due to the system?

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

I'm sorry, I had pushed the fix to another branch. Not it's back on main.

Can you please try again?

from relic.

121TheShuDynasty avatar 121TheShuDynasty commented on August 19, 2024

Thank you very much, the SM2_P256 curve is usable. I also want to ask another question, when I call the BSI_P256 curve in the same way, an error occurs. The other P256 curves do not have an error and can be called normally.

#include "relic.h"

int main() {
        ep_t p;
        core_init();
        ep_param_set(BSI_P256);
        ep_param_print();
        ep_rand(p);
        ep_print(p);
        core_clean();
        return 0;
}

image

from relic.

dfaranha avatar dfaranha commented on August 19, 2024

BSI_P256 should be fixed now as well.

from relic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.