希望将图书馆与示例代码一起使用,以进行开放量子安全
因此,我试图使用以下库:打开量子安全
我正在使用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 to
EVP_CIPHER_CTX_new'
/usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x39): undefined reference toEVP_aes_128_ecb' /usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x4d): undefined reference to
EVP_EncryptInit_ex'
/usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_load_schedule+0x61): undefined reference toEVP_CIPHER_CTX_set_padding' /usr/bin/ld: build/lib/liboqs.a(aes_ossl.c.o): in function
OQS_AES128_free_schedule':
aes_ossl.c:(.text.OQS_AES128_free_schedule+0x17): undefined reference toEVP_CIPHER_CTX_free' /usr/bin/ld: build/lib/liboqs.a(aes_ossl.c.o): in function
OQS_AES128_ECB_enc':
aes_ossl.c:(.text.OQS_AES128_ECB_enc+0x71): undefined reference toEVP_EncryptUpdate' /usr/bin/ld: aes_ossl.c:(.text.OQS_AES128_ECB_enc+0x8c): undefined reference to
EVP_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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如@tsyvarev所述,我正在使用一个静态库,这就是为什么它找不到依赖关系的原因。一旦使用了动态库,我就可以运行代码。
如果您使用此确切的库,则具体答案:
我还必须设置.So文件的路径:
我也做了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:
I also had to set the Path to the .so file:
I also did ldconfig, not sure if that was necessary or not.