You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would appreciate any help or guidance. I am working on Arduino IDE with the official library wolfssl, which was installed using the Arduino Library Manager. However, I am able to use <wolfssl/wolfcrypt/aes.h> but not <wolfssl/wolfcrypt/wc_kyber.h>. I do not know whether the wolfssl in Arduino was compiled with libqos or not, or if the way to work with PQC is different from what I using.
I will leave my code below. This is just a simple example to set things up and build upon.
void setup() {
Serial.begin(115200);
Serial.println("WolfSSL library is included successfully!");
// Initialize WolfSSL
Serial.println("Initializing WolfSSL...");
if (wolfSSL_Init() != WOLFSSL_SUCCESS) {
Serial.println("Failed to initialize WolfSSL");
return;
}
Serial.println("WolfSSL initialized successfully");
// Initialize Kyber
Serial.println("Initializing Kyber...");
// Set key type to KYBER512, KYBER768, or KYBER1024
kyberkey.type = KYBER512;
kyber_init();
}
void loop() {
// Your code here
}`
The error that I am getting is:
user/.arduino15/packages/esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld:user/.cache/arduino/sketches/83F0BC3D0F174449E307A31B46415E99/sketch/first_test_pqc_test.ino.cpp.o:(.literal._Z5setupv+0x18): undefined reference to kyber_init' user/.arduino15/packages/esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld:user/.cache/arduino/sketches/83F0BC3D0F174449E307A31B46415E99/sketch/first_test_pqc_test.ino.cpp.o: in function _Z5setupv':
user/Arduino/first_test_pqc_test/first_test_pqc_test.ino:23: undefined reference to `kyber_init'
collect2: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
Thanks in advance !!
The text was updated successfully, but these errors were encountered:
You're trying to call kyber_init() but that is not considered a public API; it is marked with WOLFSSL_LOCAL. You'll want to use the following instead: wc_KyberKey_Init()
Thanks for using wolfSSL! Can you please let us know a bit about yourself and your project? Where are you located? Is this out of personal, academic or professional interest? What are you trying to make? What are your goals?
Version
5.7.4
Description
Hi folks!!!
I would appreciate any help or guidance. I am working on Arduino IDE with the official library wolfssl, which was installed using the Arduino Library Manager. However, I am able to use <wolfssl/wolfcrypt/aes.h> but not <wolfssl/wolfcrypt/wc_kyber.h>. I do not know whether the wolfssl in Arduino was compiled with libqos or not, or if the way to work with PQC is different from what I using.
I will leave my code below. This is just a simple example to set things up and build upon.
`#define WOLFSSL_EXPERIMENTAL_SETTINGS
#define WOLFSSL_HAVE_KYBER
#define WOLFSSL_WC_KYBER
#define WOLFSSL_SHAKE256
#define WOLFSSL_SHA3
#include <wolfssl.h>
#include <wolfssl/wolfcrypt/wc_kyber.h>
KyberKey kyberkey;
void setup() {
Serial.begin(115200);
Serial.println("WolfSSL library is included successfully!");
}
void loop() {
// Your code here
}`
The error that I am getting is:
user/.arduino15/packages/esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld:user/.cache/arduino/sketches/83F0BC3D0F174449E307A31B46415E99/sketch/first_test_pqc_test.ino.cpp.o:(.literal._Z5setupv+0x18): undefined reference to
kyber_init' user/.arduino15/packages/esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld:user/.cache/arduino/sketches/83F0BC3D0F174449E307A31B46415E99/sketch/first_test_pqc_test.ino.cpp.o: in function
_Z5setupv':user/Arduino/first_test_pqc_test/first_test_pqc_test.ino:23: undefined reference to `kyber_init'
collect2: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
Thanks in advance !!
The text was updated successfully, but these errors were encountered: