ikalchev / kpabe-yct14-cpp

A lightweight Key-Policy Attribute-Based Encryption scheme in C++
Apache License 2.0
19 stars 4 forks source link

Error compiling using scons #6

Open thejduman opened 7 months ago

thejduman commented 7 months ago

I am using WSL with Ubuntu under Windows 10. I installed all the relevant libraries to compile the code. However, when attempting to compile using scons -f SConstruct.py I get an error. The full output from the compiler is below.

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o kpabe.o -c -std=gnu++14 -Os -I. -I/usr/local/include -I/usr/local/include/pbc kpabe.cpp
kpabe.cpp: In function 'void mbedtlsSymCrypt(const uint8_t*, size_t, uint8_t*, uint8_t*, size_t*, mbedtls_operation_t)':
kpabe.cpp:54:49: error: 'const struct mbedtls_cipher_info_t' has no member named 'key_bitlen'
   54 |    mbedtls_cipher_setkey(&ctx, key, cipherInfo->key_bitlen, mode);
      |                                                 ^~~~~~~~~~
kpabe.cpp:57:54: error: 'const struct mbedtls_cipher_info_t' has no member named 'iv_size'
   57 |    mbedtls_cipher_crypt(&ctx, iv.data(), cipherInfo->iv_size, input, ilen, output, olen);
      |                                                      ^~~~~~~
scons: *** [kpabe.o] Error 1
scons: building terminated because of errors.

Do you have any ideas of what the issue could be?