Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KDE Connect Android KDE Connect Android
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Bugzilla
    • Bugzilla
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Network
  • KDE Connect AndroidKDE Connect Android
  • Merge requests
  • !227

Faster and more secure TLS

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Daniel Tang requested to merge danielt/kdeconnect-android:fast-secure-tls into master Jan 18, 2021
  • Overview 4
  • Commits 1
  • Changes 2

Summary

On Telegram, it was discussed that KDE Connect is using a lot of CPU while sending/receiving files. I believe that this overhead comes from encryption, mostly outdated TLS ciphers.

I enabled and prioritized ChaCha20 for better performance. However, I didn't notice much of a difference before and after on my machines (the original problem didn't affect me either). I created this MR in hopes that it would improve performance for others.

Misc

I also disabled TLS 1.1 and below as they are vulnerable and deprecated. To avoid 0-RTT and minApi problems, I didn't enable TLS 1.3. This means that TLS 1.2 is the only version enabled now (unfortunately, I had to raise the minimum Android version to 4.4.4 for this).

I removed the ECDSA ciphers that were doing nothing (we only have an RSA certificate). I wanted to remove TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA as it was outdated, but did not because of backwards compatibility for LTS desktop versions.

Benchmarks

These are benchmarks of this patch. I doubt this will show much, since I've already said that this patch doesn't make much of a difference for me. See Telegram for the screenshots from the user who is affected by this problem.

Android -> KDE, Before

receiveBefore

Android -> KDE, After

receiveAfter

KDE -> Android, Before

sendBefore

KDE -> Android, After

sendAfter

Test Plan

All of the following:

  • At least one user must notice a significant performance improvement when sending/receiving files
  • It must be possible to connect to the same peers as before this patch
  • There shall be no visual or behavioural changes
Edited Jan 20, 2021 by Daniel Tang
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fast-secure-tls