-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Overview
RedPhone is an encrypted VoIP client designed with the mobile environment in mind. In any RedPhone call, there are generally four participating entities:
- The
initiatorRedPhone client. This is typically the device of the RedPhone user who is initiating a call to another RedPhone user. - The
responderRedPhone client. This is typically the device of the RedPhone user who is receiving a RedPhone call from another RedPhone user. - The
masterRedPhone server (described below). - The
relayRedPhone server (described below).
So in the RedPhone environment, there are two types of clients (initiators and responders) as well as two types of servers (master and relay).
The RedPhone Server (as a general class) is responsible for:
- Signaling. The RedPhone Server receives call setup requests from
initiatorsand signalsrespondersthat they are receiving an incoming call. - Authentication. The RedPhone Server provides a server-trusted level of authentication that
initiatorsandrespondersare who they claim to be when setting up calls, making it non-trivial to spoof calls. - NAT Traversal. The RedPhone Server acts as a TURN server, efficiently relaying opaque encrypted RTP packets from one device to another in order to deal with the impossibility of direct peer-to-peer communication on most carrier networks.
The third responsibility, NAT traversal, demands that clients wishing to conduct calls with appropriate low-latency characteristics need to be near the RedPhone server. It would not be acceptable for an initiator and responder, both located in Asia, to route all of their traffic through a RedPhone server on the east coast of the United States.
So in practice, RedPhone servers are divided into two types:
-
masterservers, which are responsible for signaling and authentication. These can be located in trusted locations and given isolated access to the RedPhone user database and signaling interfaces. -
relayservers, which are responsible for NAT traversal. These can be scattered in POPs throughout the world, in order to provide the lowest-latency path for a call. Since all authentication and signaling are delegated to amasterserver, therelayservers don't need to be as highly trusted, and can be located in POPs where adversaries might be able to eventually gain physical access.
So we see that a call has the following steps:
- An
initiatorcontacts amasterRedPhone server, and signals that they would like to establish a call with aresponder. - The
responderreceives an encrypted signal, connects to themasterRedPhone server, and indicates that it has received the call signal. - If the
responderchooses to answer the call, it is relayed through the closest availablerelayRedPhone server.
The signaling protocol is custom to RedPhone (documented in depth elsewhere), and the voice traffic is encrypted using ZRTP.