Code Monkey home page Code Monkey logo

aes-whitebox's People

Contributors

balena avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aes-whitebox's Issues

Need more examples

It would be very kind of you if you made examples:

  1. encrypt/decrypt file
  2. encrypt/decrypt string

PS: Thank you for you work

External encodings were not implemented?

Is that the reason why all the values in XorTable are entirely the same for every entry?

Right now, you could get a ton more performance if you just didn't generate those and do:

n0 = ((aa >> 28) & 0xf) ^ ((bb >> 28) & 0xf);
etc.

which is what the current tables achieve, since the codegen does:

  uint8_t Xor[Nr-1][96][16][16];
  for (int r = 0; r < Nr-1; r++)
    for (int n = 0; n < 96; n++)
      for (int i = 0; i < 16; i++)
        for (int j = 0; j < 16; j++)
          Xor[r][n][i][j] = i ^ j;

r and n are no factor in the calculation, which is either a bug, or we can just get rid of this table entirely.

Compilation errors on Ubuntu18.04

Before compiling, I installed the NTL dependency from Ubuntu repos:

$ sudo apt-get install libntl-dev libntl35

The idea was to include this whitebox implementation in an Android c++ application, and include the tables as binaries files in the assets folders of the app.

Log

[18:09 edu@xps aes-whitebox]  (master)>  make
g++  -lntl aes_whitebox_compiler.o -o aes_whitebox_compiler
aes_whitebox_compiler.o: In function `(anonymous namespace)::GenerateGF2RandomMatrix(int)':
/usr/include/NTL/GF2.h:264: undefined reference to `NTL::RandomBnd(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::GenerateRandomGF2InvertibleMatrix(int)':
/usr/include/NTL/mat_GF2.h:102: undefined reference to `NTL::determinant(NTL::ref_GF2, NTL::Mat<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/mat_GF2.h:73: undefined reference to `NTL::inv(NTL::Mat<NTL::GF2>&, NTL::Mat<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:56: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:56: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/mat_GF2.h:73: undefined reference to `NTL::inv(NTL::Mat<NTL::GF2>&, NTL::Mat<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:46: undefined reference to `NTL::Vec<NTL::GF2>::SetLength(long)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/tmp/aes-whitebox/aes_whitebox_compiler.cc:90: undefined reference to `NTL::operator*(NTL::Mat<NTL::GF2> const&, NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/mat_GF2.h:73: undefined reference to `NTL::inv(NTL::Mat<NTL::GF2>&, NTL::Mat<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `(anonymous namespace)::CalculateTyBoxes(unsigned int*, unsigned int (*) [16][256], unsigned char (*) [256], unsigned int (*) [16][256], bool, bool, int)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `NTL::Vec<NTL::Vec<NTL::GF2> >::swap(NTL::Vec<NTL::Vec<NTL::GF2> >&)':
/usr/include/NTL/tools.h:561: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o: In function `NTL::Vec<NTL::Vec<NTL::GF2> >::ReAllocate(long, NTL::VecStrategy<true>)':
/usr/include/NTL/tools.h:559: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o: In function `NTL::Vec<NTL::Vec<NTL::GF2> >::AllocateTo(long)':
/usr/include/NTL/tools.h:561: undefined reference to `NTL::TerminalError(char const*)'
/usr/include/NTL/tools.h:561: undefined reference to `NTL::TerminalError(char const*)'
/usr/include/NTL/tools.h:564: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o:/usr/include/NTL/tools.h:559: more undefined references to `NTL::TerminalError(char const*)' follow
aes_whitebox_compiler.o: In function `void NTL::default_BlockDestroy<NTL::Vec<NTL::GF2> >(NTL::Vec<NTL::GF2>*, long)':
/usr/include/NTL/vec_GF2.h:43: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `void NTL::default_BlockConstructFromVec<NTL::Vec<NTL::GF2> >(NTL::Vec<NTL::GF2>*, long, NTL::Vec<NTL::GF2> const*)':
/usr/include/NTL/vec_GF2.h:39: undefined reference to `NTL::WordVector::~WordVector()'
aes_whitebox_compiler.o: In function `void NTL::default_BlockConstructFromVec<NTL::Vec<NTL::GF2> >(NTL::Vec<NTL::GF2>*, long, NTL::Vec<NTL::GF2> const*)':
/usr/include/NTL/tools.h:627: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o: In function `void NTL::default_BlockConstructFromVec<NTL::Vec<NTL::GF2> >(NTL::Vec<NTL::GF2>*, long, NTL::Vec<NTL::GF2> const*)':
/usr/include/NTL/vec_GF2.h:39: undefined reference to `NTL::Vec<NTL::GF2>::operator=(NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `NTL::Mat<NTL::GF2>::Mat(NTL::Mat<NTL::GF2> const&)':
/usr/include/NTL/matrix.h:123: undefined reference to `NTL::Vec<NTL::GF2>::FixAtCurrentLength()'
aes_whitebox_compiler.o: In function `NTL::Vec<NTL::Vec<NTL::GF2> >::operator=(NTL::Vec<NTL::Vec<NTL::GF2> > const&)':
/usr/include/NTL/vector.h:810: undefined reference to `NTL::Vec<NTL::GF2>::operator=(NTL::Vec<NTL::GF2> const&)'
/usr/include/NTL/vector.h:816: undefined reference to `NTL::Vec<NTL::GF2>::operator=(NTL::Vec<NTL::GF2> const&)'
aes_whitebox_compiler.o: In function `void NTL::Vec<NTL::Vec<NTL::GF2> >::InitAndApply<NTL::Mat<NTL::GF2>::Fixer>(long, NTL::Mat<NTL::GF2>::Fixer&)':
/usr/include/NTL/matrix.h:21: undefined reference to `NTL::Vec<NTL::GF2>::FixLength(long)'
aes_whitebox_compiler.o: In function `void NTL::Vec<NTL::Vec<NTL::GF2> >::InitAndApply<NTL::Mat<NTL::GF2>::Fixer>(long, NTL::Mat<NTL::GF2>::Fixer&)':
/usr/include/NTL/tools.h:627: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o: In function `NTL::Mat<NTL::GF2>::SetDims(long, long)':
/usr/include/NTL/tools.h:561: undefined reference to `NTL::TerminalError(char const*)'
aes_whitebox_compiler.o: In function `NTL::Mat<NTL::GF2>::operator=(NTL::Mat<NTL::GF2> const&)':
/usr/include/NTL/matrix.h:146: undefined reference to `NTL::Vec<NTL::GF2>::FixAtCurrentLength()'
collect2: error: ld returned 1 exit status
Makefile:47: recipe for target 'aes_whitebox_compiler' failed
make: *** [aes_whitebox_compiler] Error 1

About ECB and CBC

Hi,thank you for sharing this project.
I have a question about ECB and CBC.
As I know, OFB / CFB / CTR do Ciper with IV/nonce first, then XOR with original input, so encryption and decryption can be the same way.
But for ECB and CBC, the table in this project only support encryption I think, is that right ?

So if I want to make it support ECB and CBC, I should make decrypt_table or just make new Cipher method?

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.