希望将图书馆与示例代码一起使用,以进行开放量子安全

发布于 2025-01-26 12:55:30 字数 1817 浏览 3 评论 0原文

因此,我试图使用以下库:打开量子安全

我正在使用Windows Linux子系统,因此我遵循Linux设置。我认为我正确地遵循了所有步骤,因为我没有任何错误。

我接下来想在此处运行以下示例:示例kem

此示例代码也在存储库中。

当我在第二个链接的底部运行建议的命令时,我会得到以下内容:

/usr/bin/ld:build/lib/liboqs.a(aes_ossl.co):在函数oqs_aes128_ecb_ecb_ecb_ecb_schedule':aes_ossl.c:st.。text.text.oqs_aes_aes_aes128_ecb_ecb_schedule+0xcidule+0xciend consection: evp_cipher_ctx_new' /usr/bin/ld:aes_ossl.c :(。text.oqs_aes128_ecb_ecb_ecb_load_schedule+0x39):undefined引用> evp_aes_128_ecb'/usr/usr/usr/bin/bin/bin/bin/bin/ld:aes_oss_ossl.c:aes_ossl.c:at.text._o+toxt.o+foldiel_oqs_ae_ecb)到 evp_encryptinit_ex' /usr/bin/ld:aes_ossl.c :(。text.oqs_aes128_ecb_ecb_ecb_schedule+0x61):未定义的引用evp_cipher_ctx_set_set_set_set_padding'/usr/usr/usr/bin/ld:build/lib/lib/lib/lib/lib/libeqs.a(a es_ossl.ossl.co) oqs_aes128_free_schedule': aes_ossl.c :(。text.oqs_aes128_free_schedule+0x17):未定义的引用evp_cipher_ctx_free'/usr/bin/ld:build/lib/lib/liboqs.a(aes_ossl.co) aes_ossl.c :(。text.oqs_aes128_ecb_enc+0x71):未定义的引用evp_encryptupdate'/usr/bin/ld/ld:aes_ossl.c:at(.. aes_ossl.c:(。text.oqs_aes_aes_aes_aes128_ecb_enc+0x8c) /usr/bin/ld:aes_ossl.c :(。text.oqs_aes128_ecb_enc+0xa9):未定义的引用`evp_cipher_ctx_free'

另外50个左右的相同类型错误的行。

这个错误显然告诉我它找不到需要编译的函数或文件,但是我不确定为什么?我什至无法找到其中一些功能。

我的猜测是我以某种方式构建了文件,但我不确定。

如果有人在这个图书馆有任何经验,或者想帮助我完成细节,请告诉我。

谢谢。

So I am trying to use following library: Open Quantum Safe

I am using windows linux subsystem, so I followed the linux setup. I think I followed all the steps correctly, as I didnt have any errors.

I next wanted to run the example provided here: example KEM

This example code is also in the repo.

When I run the command suggested at the bottom of the second link I get the following:

/usr/bin/ld: build/lib/liboqs.a(aes_ossl.c.o): in function OQS_AES128_ECB_load_schedule': aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x2b): undefined reference toEVP_CIPHER_CTX_new'
/usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x39): undefined reference to EVP_aes_128_ecb' /usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x4d): undefined reference toEVP_EncryptInit_ex'
/usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x61): undefined reference to EVP_CIPHER_CTX_set_padding' /usr/bin/ld: build/lib/liboqs.a(aes_ossl.c.o): in functionOQS_AES128_free_schedule':
aes_ossl.c:(.text.OQS_AES128_free_schedule+0x17): undefined reference to EVP_CIPHER_CTX_free' /usr/bin/ld: build/lib/liboqs.a(aes_ossl.c.o): in functionOQS_AES128_ECB_enc':
aes_ossl.c:(.text.OQS_AES128_ECB_enc+0x71): undefined reference to EVP_EncryptUpdate' /usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_enc+0x8c): undefined reference toEVP_EncryptFinal_ex'
/usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_enc+0xa9): undefined reference to `EVP_CIPHER_CTX_free'

and another 50 or so lines of the same type of errors.

This error is clearly telling me it cannot find functions, or files that it needs to compile, but I am not sure why? Some of these functions I cannot even locate.

My guess is that I somehow built the files wrong, but I am unsure.

If anyone has any experience with this library, or maybe wants to help me with the specifics, please let me know.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摘星┃星的人 2025-02-02 12:55:30

正如@tsyvarev所述,我正在使用一个静态库,这就是为什么它找不到依赖关系的原因。一旦使用了动态库,我就可以运行代码。

如果您使用此确切的库,则具体答案:

 cmake -GNinja .. -DBUILD_SHARED_LIBS=ON 

我还必须设置.So文件的路径:

 LD_LIBRARY_PATH=/usr/liboqs/build/lib

我也做了ldconfig,不确定是否需要。

As mentioned by @Tsyvarev, I was using a static library which is why it was not able to find the dependencies. Once I used the dynamic library I was able to run the code.

Specific answer if you are using this exact library:

 cmake -GNinja .. -DBUILD_SHARED_LIBS=ON 

I also had to set the Path to the .so file:

 LD_LIBRARY_PATH=/usr/liboqs/build/lib

I also did ldconfig, not sure if that was necessary or not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文