Shared clipboard

The application allows you to share the clipboard between an Android phone and a Java desktop application.

For it to work, you'll need to have both applications running: the desktop application, where you'll need to generate an expiring QR code, and the phone application.

On the phone app, there will be two buttons that will paste the clipboard from the desktop device or copy the clipboard from the phone to the desktop device.

When the user presses one of the operation buttons, random bytes will be obtained from the microphone, necessary to complete the operation, and the QR scanner will open, which will allow you to scan a non-expired QR code.

Description

Two apps are included.

  • Desktop app. You can generate the QR code and copy the content you want to share with your phone to the clipboard.
  • Android app. You can choose whether to paste the remote clipboard to your phone or copy the clipboard from your phone to the remote machine. Then you'll need to capture the QR code from the desktop app.

Code description

  • Desktop application: Encryption is used so that shared content is not transmitted over Wi-Fi. A very powerful combination of Diffie-Hellman key exchange and a secret shared via QR code is used.
  • Android application: Java-programmed libraries are used for the desktop application. The rest of the application is in Kotlin (my first application partially written in this language).

Windows

Shared clipboard (2025)

Watch vĂ­deo
Download

Versions

image

Combined Java desktop application (printing the QR code) and Android (reading the QR code and selecting the operation to perform)

Very powerful encryption mechanisms have been added, in which only the length of the shared text is clearly exposed.

The encryption's robustness could be improved to make it practically unbreakable without any additional information, but we left it for a possible future version.


You can see a video of the combined application working Demo video

ADDITIONAL INFORMATION

...

The Android shared-clipboard application does not collect or share any user data.

The desktop shared-clipboard application does not collect any user data, except that it connects to the server to check if a new version is available.

In this process, the server collects the user's IP country, language, and application version, and stores them for purely statistical purposes to keep track of application launches.


Both applications need to obtain purely random data to compose the encryption keys. To do this, the microphone is listened to as a noise source for approximately one second (in both the Android and desktop applications) to obtain the small amount of random data needed for encryption.


The applications do not collect any other user data, and the data mentioned above is used exclusively for technical purposes.

Videos

Downloads