status-go/signal
Alex Jbanca 43b2c3b7ce
perf(sqlCipher): Increase cipher page size to 8192 (#3591)
* perf(sqlCipher): Increase cipher page size to 8192

Increasing the cipher page size to 8192 requires DB re-encryption. The process is as follows:
//Login to v3 DB
PRAGMA key = 'key';
PRAGMA cipher_page_size = 1024"; // old Page size
PRAGMA cipher_hmac_algorithm = HMAC_SHA1";
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1";
PRAGMA kdf_iter = kdfIterationsNumber";

//Create V4 DB with increased page size
ATTACH DATABASE 'newdb.db' AS newdb KEY 'key';
PRAGMA newdb.cipher_page_size = 8192; // new Page size
PRAGMA newdb.cipher_hmac_algorithm = HMAC_SHA1"; // same as in v3
PRAGMA newdb.cipher_kdf_algorithm = PBKDF2_HMAC_SHA1"; // same as in v3
PRAGMA newdb.kdf_iter = kdfIterationsNumber"; // same as in v3
SELECT sqlcipher_export('newdb');
DETACH DATABASE newdb;

//Login to V4 DB
...

Worth noting:
The DB migration will happen on the first successful login.
The new DB version will have a different name to be able to distinguish between different DB versions.Versions naming mirrors sqlcipher major version (naming conventions used by sqlcipher), meaning that we're migrating from V3 to V4 DB (even if we're not fully aligned with V4 standards). The DB is not migrated to the v4 standard `SHA512` due to performance reasons. Our custom `SHA1` implementation is fully optimised for perfomance.

* perf(sqlCipher): Fixing failing tests

Update the new DB file format in Delete account, Change password and Decrypt database flows

* perf(SQLCipher): Increase page size - send events to notify when the DB re-encryption starts/ends
2023-06-13 18:20:21 +03:00
..
doc.go rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
events_community_archives.go feat: add signal indicating that history messages are being imported 2022-12-05 10:51:53 +01:00
events_db.go perf(sqlCipher): Increase cipher page size to 8192 (#3591) 2023-06-13 18:20:21 +03:00
events_discord_import.go feat: introduce discord import tool 2022-10-28 09:52:26 +02:00
events_discovery.go Dump peer infos as discovery summary 2018-05-15 13:11:28 +03:00
events_messenger.go Added portManager debug logging 2022-10-26 10:26:59 +01:00
events_node.go Add error to login signal (#1594) 2019-09-03 15:00:14 +02:00
events_pairing.go Smoke test on API and signals 2022-09-09 13:24:56 +01:00
events_pn.go Local notifications service (#2026) 2020-10-28 10:56:14 +03:00
events_shhext.go chore: remove unneeded success signal 2022-12-07 12:15:23 -04:00
events_sign.go Move signal logic into signal package 2018-05-03 09:35:58 +02:00
events_stats.go feat: upload/download rate for waku v1 messages (#2286) 2021-08-03 15:27:15 -04:00
events_subs.go Implement subscription for eth and shh filters using signals. (#1455) 2019-05-07 09:05:38 +02:00
events_sync_from_waku.go feat: accounts improvements applied 2023-05-25 19:46:47 +02:00
events_wakuv2.go Pass connection status chan to go-waku 2021-09-23 19:00:40 +03:00
events_wallet.go Download transfers starting from latest block header (#1467) 2019-06-14 13:16:30 +03:00
ios.go Intrododuce `NodeConfig.TorrentConfig` and CLI flags 2022-03-21 12:59:09 +01:00
signals.c Gomobile support (#1164) 2019-02-01 18:02:52 +01:00
signals.go synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
signals_test.go Move signal logic into signal package 2018-05-03 09:35:58 +02:00