From 084fc15ece735e19b62bc8fcf52c2c6801dd45a4 Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sat, 5 Dec 2020 00:24:23 -0800 Subject: [PATCH] Clarify readme --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b360823..a7307e9 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,6 @@ # OpenSend ## Send files between systems quickly and securely -### How does it work? -OpenSend uses a combination of 2048-bit RSA and AES GCM encryption. This is accomplished using golang's crypto/rsa and crypto/aes libraries. First, a shared AES key is generated. Then, an RSA keypair is generated. The AES key is encrypted using the RSA public key -of the receiver. This key is then saved to a file. Next, the shared AES key is used to encrypt all the files in `~/.opensend`. To send the key, the sender first needs to discover the receiver. This is accomplished using mDNS. The key is then exchanged using a TCP socket and golang's encoding/gob library. After that, the sender starts an HTTP server with some custom functions to send the file index and key. The receiver gets the index, files, and encrypted key from this server. Once it gets all the files, it sends a stop signal to the server and decrypts the shared key using its RSA private key. The resulting key is then used to decrypt all files in `~/.opensend`. - -### Ports to whitelist -- TCP 9797 for key exchange -- TCP 9898 for file transfer - ### Usage #### Receiver @@ -43,4 +35,13 @@ Opensend can run on iOS using the [iSH app](https://apps.apple.com/us/app/ish-sh - When running sender, add `--send-to ` - This applies bidirectionally - Known issues - - Opensend takes a while to become ready on iOS \ No newline at end of file + - Opensend takes a while to become ready on iOS + +### Ports to whitelist +- TCP 9797 for key exchange +- TCP 9898 for file transfer + +### How does it work? +OpenSend uses a combination of 2048-bit RSA and AES GCM encryption. This is accomplished using golang's crypto/rsa and crypto/aes libraries. First, a shared AES key is generated. Then, an RSA keypair is generated. The RSA public key is then exchanged using TCP and golang's encoding/gob library. The AES key is encrypted using the RSA public key +of the receiver. This key is then saved to a file. Next, the shared AES key is used to encrypt all the files in `~/.opensend`. To send the encrypted AES key, the sender first needs to discover the receiver. This is accomplished using zeroconf. After that, the sender starts an HTTP server with some custom functions to send the file index and key. +The receiver gets the index, files, and encrypted key from this server. Once it gets all the files, it sends a stop signal to the server and decrypts the shared key using its RSA private key. The resulting AES key is then used to decrypt all files in `~/.opensend`. \ No newline at end of file