When attempting to decrypt a message using the Ratchets.decrypt method, an sqlcipher3.dbapi2.DatabaseError is raised with the message "file is not a database."
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tests/sample2.py", line 35, in <module>
server_plaintext = Ratchets.decrypt(
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/ratchets.py", line 56, in decrypt
DHRatchet(state, header)
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/protocols.py", line 118, in __init__
state.DHs = GENERATE_DH(state.DHs.keystore_path)
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/protocols.py", line 125, in GENERATE_DH
x.init()
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/keypairs.py", line 133, in init
self.secret_key = Keypairs.store(pk, _pk, self.keystore_path, self.pnt_keystore)
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/keypairs.py", line 58, in store
keystore = Keystore(keystore_path, secret_key)
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/keystore.py", line 18, in __init__
self.create()
File "/venv/lib/python3.8/site-packages/smswithoutborders_libsig/keystore.py", line 22, in create
self.cursor.execute(f'''
sqlcipher3.dbapi2.DatabaseError: file is not a database
When attempting to decrypt a message using the
Ratchets.decrypt
method, ansqlcipher3.dbapi2.DatabaseError
is raised with the message "file is not a database."Steps to Reproduce
Stack Trace