Giter Club home page Giter Club logo

Comments (9)

mingw-io avatar mingw-io commented on June 25, 2024 1

image

from oqs-provider.

baentsch avatar baentsch commented on June 25, 2024

Thanks for giving this a try under Windows. Also glad to see so many tests pass.

The error line in your screenshot unfortunately is too high level to let me get a definite idea what may be wrong.
On the positive side, oqsprovider has many debug facilities: In this case I'd suggest you'd set at least "OQSENC" to get more information what's actually going on.

If you'd be willing to share the (Windows) build scripts that get you to this point I could try to set up a Windows VM somewhere to reproduce. Very important to see for me are path changes as well as changes to "oqs.cnf"...

from oqs-provider.

mingw-io avatar mingw-io commented on June 25, 2024

Thanks for your prompt response.
Unfortunately I don't have more (detailed) info about the failing tests!

I have set the env variable suggested by you and run the same test. This is the output:

OQS PROV: successfully registered dilithium2 with NID 0
OQS PROV: successfully registered p256_dilithium2 with NID 0
OQS PROV: successfully registered rsa3072_dilithium2 with NID 0
OQS PROV: successfully registered dilithium3 with NID 0
OQS PROV: successfully registered p384_dilithium3 with NID 0
OQS PROV: successfully registered dilithium5 with NID 0
OQS PROV: successfully registered p521_dilithium5 with NID 0
OQS PROV: successfully registered dilithium2_aes with NID 0
OQS PROV: successfully registered p256_dilithium2_aes with NID 0
OQS PROV: successfully registered rsa3072_dilithium2_aes with NID 0
OQS PROV: successfully registered dilithium3_aes with NID 0
OQS PROV: successfully registered p384_dilithium3_aes with NID 0
OQS PROV: successfully registered dilithium5_aes with NID 0
OQS PROV: successfully registered p521_dilithium5_aes with NID 0
OQS PROV: successfully registered falcon512 with NID 0
OQS PROV: successfully registered p256_falcon512 with NID 0
OQS PROV: successfully registered rsa3072_falcon512 with NID 0
OQS PROV: successfully registered falcon1024 with NID 0
OQS PROV: successfully registered p521_falcon1024 with NID 0
OQS PROV: successfully registered picnicl1full with NID 0
OQS PROV: successfully registered p256_picnicl1full with NID 0
OQS PROV: successfully registered rsa3072_picnicl1full with NID 0
OQS PROV: successfully registered picnic3l1 with NID 0
OQS PROV: successfully registered p256_picnic3l1 with NID 0
OQS PROV: successfully registered rsa3072_picnic3l1 with NID 0
OQS PROV: successfully registered rainbowVclassic with NID 0
OQS PROV: successfully registered p521_rainbowVclassic with NID 0
OQS PROV: successfully registered sphincsharaka128frobust with NID 0
OQS PROV: successfully registered p256_sphincsharaka128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincsharaka128frobust with NID 0
OQS PROV: successfully registered sphincssha256128frobust with NID 0
OQS PROV: successfully registered p256_sphincssha256128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincssha256128frobust with NID 0
OQS PROV: successfully registered sphincsshake256128frobust with NID 0
OQS PROV: successfully registered p256_sphincsshake256128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincsshake256128frobust with NID 0
OQS PROV: Default or FIPS provider available.
OQS PROV: successfully registered dilithium2 with NID 0
OQS PROV: successfully registered p256_dilithium2 with NID 0
OQS PROV: successfully registered rsa3072_dilithium2 with NID 0
OQS PROV: successfully registered dilithium3 with NID 0
OQS PROV: successfully registered p384_dilithium3 with NID 0
OQS PROV: successfully registered dilithium5 with NID 0
OQS PROV: successfully registered p521_dilithium5 with NID 0
OQS PROV: successfully registered dilithium2_aes with NID 0
OQS PROV: successfully registered p256_dilithium2_aes with NID 0
OQS PROV: successfully registered rsa3072_dilithium2_aes with NID 0
OQS PROV: successfully registered dilithium3_aes with NID 0
OQS PROV: successfully registered p384_dilithium3_aes with NID 0
OQS PROV: successfully registered dilithium5_aes with NID 0
OQS PROV: successfully registered p521_dilithium5_aes with NID 0
OQS PROV: successfully registered falcon512 with NID 0
OQS PROV: successfully registered p256_falcon512 with NID 0
OQS PROV: successfully registered rsa3072_falcon512 with NID 0
OQS PROV: successfully registered falcon1024 with NID 0
OQS PROV: successfully registered p521_falcon1024 with NID 0
OQS PROV: successfully registered picnicl1full with NID 0
OQS PROV: successfully registered p256_picnicl1full with NID 0
OQS PROV: successfully registered rsa3072_picnicl1full with NID 0
OQS PROV: successfully registered picnic3l1 with NID 0
OQS PROV: successfully registered p256_picnic3l1 with NID 0
OQS PROV: successfully registered rsa3072_picnic3l1 with NID 0
OQS PROV: successfully registered rainbowVclassic with NID 0
OQS PROV: successfully registered p521_rainbowVclassic with NID 0
OQS PROV: successfully registered sphincsharaka128frobust with NID 0
OQS PROV: successfully registered p256_sphincsharaka128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincsharaka128frobust with NID 0
OQS PROV: successfully registered sphincssha256128frobust with NID 0
OQS PROV: successfully registered p256_sphincssha256128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincssha256128frobust with NID 0
OQS PROV: successfully registered sphincsshake256128frobust with NID 0
OQS PROV: successfully registered p256_sphincsshake256128frobust with NID 0
OQS PROV: successfully registered rsa3072_sphincsshake256128frobust with NID 0
OQS PROV: Default or FIPS provider available.
1..216
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (1)
OQS ENC provider: key2any_check_selection returns 1
OQS ENC provider: key2any_newctx called
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (1)
OQS ENC provider: key2any_check_selection returns 1
OQS ENC provider: key2any_newctx called
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (1)
OQS ENC provider: key2any_check_selection returns 1
OQS ENC provider: key2any_newctx called
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (1)
OQS ENC provider: key2any_check_selection returns 1
OQS ENC provider: key2any_newctx called
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (2)
OQS ENC provider: key2any_check_selection returns 0
OQS ENC provider: _does_selection called
OQS ENC provider: key2any_check_selection called with selection 135 (2)
OQS ENC provider: key2any_check_selection returns 0
OQS ENC provider: key2any_set_ctx_params called
 cipher set to 0000000000000000: 
OQS ENC provider: key2any_set_ctx_params called
 cipher set to 0000000000000000: 
OQS ENC provider: key2any_set_ctx_params called
 cipher set to 0000000000000000: 
OQS ENC provider: key2any_set_ctx_params called
 cipher set to 0000000000000000: 
OQS ENC provider: _encode called
OQS ENC provider: key2any_encode called with type 0 (dilithium2)
OQS ENC provider: key2any_encode called with pemname dilithium2 PRIVATE KEY
 encode result: 0
OQS ENC provider: key2any_freectx called
OQS ENC provider: key2any_freectx called
OQS ENC provider: key2any_freectx called
OQS ENC provider: key2any_freectx called
# OPENSSL_TEST_RAND_ORDER=1666507336
not ok 1 - test_unprotected_dilithium2_via_DER

Just to be sure I have run all OpenSSL tests and they all pass!

image

How can I further troubleshoot or debug the failing tests?

Thanks again.

from oqs-provider.

baentsch avatar baentsch commented on June 25, 2024

Thanks for sharing the logs: They already tell us the cause of the error: The NIDs ("type") for the algorithms are not properly set: value 0 is clearly wrong and causes the subsequent encode error ("encode result 0" should be 1). OQSPROV output at the start already shows the problem: It should be something like

OQS PROV: successfully registered dilithium2 with NID 1288
OQS PROV: successfully registered p256_dilithium2 with NID 1289
[...]

This in turn is caused by errors calling into an OpenSSL provider core method. The reason for that should be found out by debugging into the function core_obj_create. Again, I would need to set up my own Windows environment (i.e., the Windows-equivalent of https://github.com/open-quantum-safe/oqs-provider/blob/main/scripts/fullbuild.sh) to get to that point. Any assistance with that would be very helpful & welcome.

from oqs-provider.

mingw-io avatar mingw-io commented on June 25, 2024

Hi again.
I am debugging that OpenSSL method at the moment.

I have not used any Windows specific build scripts. Just the same tools but on Windows.
For example: cmake -DCMAKE_INSTALL_PREFIX= ..; then cmake --build; finally ctest.

from oqs-provider.

mingw-io avatar mingw-io commented on June 25, 2024

Me again!
Is it possible that oqs-provider does NOT support static linking? I switched to dynamic linking and the above test passes!

image

It can be useful to 'embed' oqs-provider into libcryto like we do with the legacy provider!

I will continue my testing. More to come!

Cheers.

from oqs-provider.

baentsch avatar baentsch commented on June 25, 2024

I have not used any Windows specific build scripts. Just the same tools but on Windows.

Which compiler/debugger setup, please? MSVC? Which version?

Is it possible that oqs-provider does NOT support static linking?

That confuses me: My understanding of the provider concept so far was that providers must be shared libs such as to be dynamically loaded at runtime into pre-installed/existing openssl(3) installations.

It can be useful to 'embed' oqs-provider into libcryto like we do with the legacy provider!

This certainly would make life easier for consumers.

I will continue my testing. More to come!

Looking forward to that. Reading up on providers in the meantime....

from oqs-provider.

baentsch avatar baentsch commented on June 25, 2024

Is the newly opened issue #82 meant to suggest that dynamic provider loading as discussed above just isn't "flying" under Windows? Allow me to re-iterate my request for a Windows script that builds and tests (and fails) as per your description. Alternatively, could you provide a written description along the lines of https://github.com/open-quantum-safe/liboqs/wiki/Platform-specific-notes-for-building-liboqs#building-on-windows how to reproduce the problems you see? Thanks in advance.

from oqs-provider.

baentsch avatar baentsch commented on June 25, 2024

Closing due to inactivity, also seems like a duplicate of #47.

from oqs-provider.

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.