Coder Social home page Coder Social logo

Comments (5)

cryptojedi avatar cryptojedi commented on July 16, 2024

from kyber.

KursatCAKAL avatar KursatCAKAL commented on July 16, 2024

It is fine when you compile it. I am trying to debug code step by step in CLion. Did you try it ? Here are the steps which I follow:

1-) Download algorithm from the page : https://csrc.nist.gov/Projects/post-quantum-cryptography/selected-algorithms-2022
2-) Open Folder in CLion.
3-) Select Algorithm Implementation Type
4-) Go kyber512 or kyber1024
5-) Open PQCgenKAT_kem.c in CLion IDE.
6-) Open Terminal in CLion.
7-) Run "make" command in kyber512 directory
6-) Click Run ico next to the main function at line 26. Then select debug.

I am getting same error when I try to Build (ctrl +f9) or Debug my project.

How did you debug your project in your development cycle?

from kyber.

KursatCAKAL avatar KursatCAKAL commented on July 16, 2024

Sorry for missing some details.

If you want to debug your project. You need below steps:

1-) Create CMakeList.txt
2-) Include it into your project folder.
3-) Open your project folder with CLion.
4-) Select CMake project in "Open or Import Project" window
5-) Make sure related configurations are generated in "Open Project Wizard" window.
Related configurations means that Build Type, Toolchain, Generator, CMake Options etc.
6-) CLion will generate debug options.

Dear @cryptojedi , Could you please share me how do you debug your project in your development cycle? Do you want to add specific cases for above steps?

My CMakeList.txt:

cmake_minimum_required(VERSION 3.12)
project(PQCgenKAT_kem C)

set(CMAKE_C_STANDARD 11)

# Set the source files and headers
set(SOURCES
        cbd.c
        fips202.c
        indcpa.c
        kem.c
        ntt.c
        poly.c
        polyvec.c
        PQCgenKAT_kem.c
        reduce.c
        rng.c
        verify.c
        symmetric-shake.c
        )

set(HEADERS
        api.h
        cbd.h
        fips202.h
        indcpa.h
        ntt.h
        params.h
        poly.h
        polyvec.h
        reduce.h
        rng.h
        verify.h
        symmetric.h
        )

# Add the executable target
add_executable(PQCgenKAT_kem ${SOURCES} ${HEADERS})

# Set compiler flags
target_compile_options(PQCgenKAT_kem PRIVATE -O3 -march=native -fomit-frame-pointer)

# Link the necessary libraries
target_link_libraries(PQCgenKAT_kem crypto)

from kyber.

cryptojedi avatar cryptojedi commented on July 16, 2024

I'm using a combination of printf-debugging and gdb. I have never used CLion and I'm afraid I cannot offer help here.

from kyber.

KursatCAKAL avatar KursatCAKAL commented on July 16, 2024

Thank you.

Wish you enjoy work.

from kyber.

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.