Skip to content

Using chacha20 and SQL logic error #87

Answered by utelle
regs01 asked this question in Q&A
Discussion options

You must be logged in to vote

After a quick check of the SQLdb implementation I most likely found the cause of the problem. As far as I can tell the method ExecuteDirect starts internally a transaction. However, PRAGMA rekey must not be enclosed in a transaction - it is simply mere chance that it works for some cipher schemes.

This behaviour can be reproduced in the SQLite3mc shell:

BEGIN; -- Start transaction
PRAGMA cipher='chacha20';
PRAGMA rekey='passphrase';

results in the message Parse error: SQL logic error.

Unfortunately, the SQLdb package doesn't seem to offer a method to execute SQL statements without starting a transaction. However, creating a transaction object, setting its options to [stoUseImplicit], and …

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@utelle
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by regs01
Comment options

You must be logged in to vote
1 reply
@utelle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants