| Figure 1: A flow handler takes as input one network flow and generates zero or more output flows. |
| Figure 2: Two TESLA stacks. The encryption flow handler implements input flow f with output flow g. The migration flow handler implements input flow g with output flows h1 . . . hn. |
tesla +crypt -key=sec.gpg +migrate ftp marsThis would open an FTP connection to the host named mars, with encryption (using sec.gpg as the private key) and end-to-end migration enabled. We refer to the libtesla.so library as the TESLA stub, since it contains the interposition agent but not any of the handlers themselves (as we will discuss later).
class flow_handler {
protected:
flow_handler *plumb(int domain, int type);
handler* const upstream;
vector
Figure 3: An excerpt from the flow_handler class definition. address and data are C++ wrapper classes for address and data buffers, respectively. |
| Figure 4: Possible interprocess data flow for an application running under TESLA. M is the migration handler, E is encryption, and CM is the congestion manager handler. |
class crypt_handler : public flow_handler {
des3_cfb64_stream in_stream, out_stream;
public:
crypt_handler(init_context& ctxt) : flow_handler(ctxt),
in_stream(des3_cfb64_stream::ENCRYPT),
out_stream(des3_cfb64_stream::DECRYPT)
{}
bool write(data d) {
// encrypt and pass downstream
return downstream[0]->write(out_stream.process(d));
}
bool avail(flow_handler *from, data d) {
// decrypt and pass upstream
return upstream->avail(this, in_stream.process(d));
}
};
Figure 5: A transparent encryption/decryption handler. |
| Figure 6: Results of the bandwidth test on a loopback interface. |
| Figure 7: Results of the bandwidth test on a 100-BaseT network. Only the null test is shown; triple-DES performance was similar to performance on a loopback interface (the right graph of Figure 6). |
| Figure 8: Results of the latency test over a 100-BaseT network. The block size is one byte. |