1

I am currently learning about networks and network security. As an exercise I created an application similar to Apple's AirDrop. Like AirDrop my application discovers peers (yet only in the same wifi network) and establishes a connection to share files. It all works great, however my application relies on a plain TCP connection and transferred data is not encrypted!! From some research I learned that AirDrop uses TLS to encrypt data.

My Question is, how is this possible in a peer to peer network connection? Doesn't TLS require a certificate issued by a CA? Does that mean that whenever a user activates AirDrop a certificate must be created?

How would one incorporate TLS in such an application where you could be the client (when accepting a file) or be the server (when sharing a file)?

Alex
  • 281
  • 1
  • 8
  • 1
    No, you don't need a certificate signed by a CA to do encryption. Certificates are used to determine the trustworthiness of a connection, not the quality of the encryption. At a basic level you will need to open a TCP connection, share the public keys over plain-text, then being encrypting the remaining traffic. This question is likely too broad for StackOverflow, so you may want to narrow it down to specifics and share any code that you may have. – Jake Holzinger Jan 23 '19 at 01:13
  • 1
    There is no such the as a peer-to-peer connection in TCP. One end is a server, the other is the client. use TLS. – user207421 Jan 23 '19 at 03:42

0 Answers0