Closed Zapotecatl closed 1 year ago
Hi, the section Default Settings says this:
"Currently the cipher scheme sqleet: ChaCha20 is set as the default. However, this can be changed by setting the preprocessor symbol CODEC_TYPE to one of the values listed in the following table"
The preprocessor symbol CODEC_TYPE
defines which cipher scheme will be used, if a cipher scheme was not explicitly selected at runtime. If a non-default cipher scheme should be used, it is necessary to issue a PRAGMA cipher=
command naming the requested cipher scheme.
I want to use CODEC_TYPE_AES128. My platform is ubuntu.
If you want to make this cipher scheme the default one, you can simply define the preprocessor symbol CODEC_TYPE
accordingly ...
I have tried with this:
./configure CFLAGS="-DSQLITE_HAS_CODEC -DCODEC_TYPE=CODEC_TYPE_AES128"
... as you did above. However, setting SQLITE_HAS_CODEC
has no effect, unless your own code makes use of that symbol. That is, the following command will be sufficient:
./configure CFLAGS="-DCODEC_TYPE=CODEC_TYPE_AES128"
Also I have tried with:
../configure --with-aes128cbc CODEC_TYPE=Yes
looks this works.
Not sure what happens. My guess is that it's pure luck that it works.
Some developers want to create a smaller executable by excluding the code for the cipher schemes they don't want to use. For this purpose the configure option --without-<scheme>
can be used where <scheme>
can have the values aes128cbc
, aes256cbc
, chacha20
, sqlcipher
, or rc4
. In any case the symbol CODEC_TYPE
should be set to the actually requested default cipher scheme.
Or maybe is something like this (I have not tested this code, I read the multiple ciphers documentation and I think my main program could be like this):
This will not work. The default cipher scheme needs to be specified, when compiling the library itself, not the code using the library.
Please, could you tell me what is the correct way to configure the cipher scheme for AES 128?
Your first mentioned approach is the right one.
@utelle thanks a lot!
Hi, the section Default Settings says this:
"Currently the cipher scheme sqleet: ChaCha20 is set as the default. However, this can be changed by setting the preprocessor symbol CODEC_TYPE to one of the values listed in the following table"
I want to use CODEC_TYPE_AES128. My platform is ubuntu.
I have tried with this:
./configure CFLAGS="-DSQLITE_HAS_CODEC -DCODEC_TYPE=CODEC_TYPE_AES128"
looks this works.
Also I have tried with:
../configure --with-aes128cbc CODEC_TYPE=Yes
looks this works.
Or maybe is something like this (I have not tested this code, I read the multiple ciphers documentation and I think my main program could be like this):
Please, could you tell me what is the correct way to configure the cipher scheme for AES 128?