- Add shared ksync_crypto module: SHA-256, HMAC-SHA256, PBKDF2-SHA256,
ChaCha20-Poly1305 (RFC 8439), hex helpers, random bytes; all verified
against RFC test vectors in tests/ksync_crypto_test.c
- Encrypted account exports (v2): PBKDF2 (600k iterations) +
ChaCha20-Poly1305, passphrase-protected import/export APIs; the v1
plaintext format remains importable
- DeleteKsyncSyncAccount no longer transmits the private key: it signs
a challenge against /api/v1/account/delete and falls back to the
legacy delete-with-key endpoint on 404/405
- JSON writer escapes control characters (including \b, \f, \uXXXX);
reader now decodes escapes, rejects substring keys and keys embedded
in string values
- Token expiry accounts for server clock skew (server_time in the
login response, clamped to +/-24h)
- Optional retry with exponential backoff for transport errors, 429,
and 5xx via retry_max/retry_delay_ms/sleep_ms config fields
- Opt-in end-to-end payload encryption (encrypt_payload flag plus
Wrap/UnwrapKsyncSyncPayload) derived from the account private key