Except the bullets looked all fucked up. Okay, I will assume you're all familiar with existing methods of transferring files on the internet. But basically, what I was delving into here was that FTP has basically been relegated to the purpose of anonymous FTP, where you have a central file distribution server, and you have to give a large number of files out. And then HTTP has sort of evolved into a general-purpose file transfer protocol as well. And one of the problems is that these current methods are entirely client-server, and so the server must therefore have sufficient bandwidth to be able to handle all traffic requests. So, that little move... Wait, that wasn't even the first slide. Ugh. Okay, this is Gimpy. Can anybody loan me their laptop? No. You'd rather really sit me, like, watch me stand up here and mess around with my iBook and Gimpy open-source software. Alright! Let me try to get the fucking first slide to show up. Hey, it changed! There we go. Alright. Here... Here is the basis of what my protocol is. It's a next-generation file distribution architecture that's basically trying to merge the concepts of peer-to-peer protocols and client-server protocols. It's intended primarily as a replacement for anonymous FTP for large distribution sites, like, say, Debian's, like, master distribution servers. And more than that, which I'll get into later, it's a way of replacing, like, large networks of... mirrors, where someone manually has to choose which mirror they want to get a file from. So, it provides a much more effective way of coordinating a large number of servers to coordinate large file transfers. And, yeah, I'll get into that later, but primarily it's for when you have a large number of anonymous FTP mirrors transferring files. And, yeah, that's sort of what the second thing is there, is that it uses server networks rather than individuals, like, individual servers that just function as an island and use rsync or something along those lines to send content. And primarily what it is is intended as a quasi-side-by-side replacement for BitTorrent. And it provides the full client-server experience while still utilizing BitTorrent-like content distribution, where peers take place in all transfers and upload content, to other peers. And I assume you're all familiar with BitTorrent, I hope. No, not at all. Not at all, all right. If someone isn't, please raise your hand, and I can give a more detailed explanation. Um, I'll get into that. He asked about seeding, and I actually take a much different approach to that. Let me... All right. So here's a little bit of background on what BitTorrent is. PDTP is very similar, and I'll get into the exact differences in a bit. But, as I explained earlier, the whole idea of BitTorrent is you have a tracker that various clients can post which pieces they need, which pieces they have. And then other clients can look up what pieces need to be transferred where, and transfer pieces of a single file to each other. And I take the same approach in PDTP. I break files into pieces which are hashed, and transfer between clients. And then I use my own data set, to see what other files the client has. All right. Now, let me go into a little bit of why I started writing this. And about, in early 2003, I started writing the Seed Library for BitTorrent. And as I was writing that, I ran into a number of fundamental design flaws with BitTorrent, which basically drove me insane. The first one is BitTorrent serves static file groupings where if you want to put a torrent on the internet, you have to generate a torrent file from a preset group of content. And because of that, all data within a torrent is entirely static. And that just does not work for something like the web where you do have dynamic content or dynamically generated content. Or if you have, say, a large distribution server where people need to pick individual files out rather than, say, the entire FTP repository. If you were getting updates for a Debian system or FreeBSD upgrading your ports tree, you probably don't want everything on the entire server. So that is the main problem I saw. And one of the other problems... is, you know, there still isn't web browser integration for BitTorrent, and people cannot use BitTorrent to serve websites or any sort of dynamic content like that. And probably the main problem, which I'm sure any of you have experienced if you've tried to download a popular torrent, is BitTorrent uses HTTP for its tracker protocol and uses it asynchronously to where a client will make an HTTP request. Whenever they have completed a piece transfer or need to find a new piece to download or upload. And because of that, the web server can get exhausted by too many clients trying to transfer a torrent at once. And while Bram Cohen promises limitless scale ability to BitTorrent, the problem is the web server just can't handle the load of, say, 10,000 clients all making several hundred requests every second. So... I have taken a different approach, which I will get to in a bit. I'm not sure if any of you have heard about BitTorrent 2, but one of the main things that I'll be moving to is hash trees, where you can check different parts of the file rather than just a set number of pieces. So right now, with BitTorrent, every time you resume a transfer, it hashes. The entire file, again, to see which pieces you have and which pieces you don't, unless you have a client like Azeris that tracks that externally. And it's incredibly slow and annoying. So they're trying to introduce that feature to speed it up. And oddly enough, they decided to go to UDP for their new protocol. I have absolutely no idea why. Because how will they intend to manage drop packets along those lines? I don't know. I have absolutely no idea, and I think it's just going to end up needlessly complicated. So... Yeah, so what PDTP provides is dynamic directory mappings that are updated on the fly whenever the files explored by the server change. The server I'm writing automatically hashes files as they've become available. I know there are various scripts for BitTorrent that will use a program like denotify to automatically generate torrent files. But if you have a large master distribution server for something, and you have, say, tens of thousands of files, that's tens of thousands of torrents. You have to run it once. And BitTorrent has issues running more than one. And Torrent at once on most servers due to scalability issues. And the other nice thing about PDTP is I provide all sorts of components like a proxy server that would allow you to use PDTP behind a firewall. And it would also allow several users behind, say, a NAT gateway to share a single incoming port and it will automatically direct incoming connections. To the proper computer on your local network. And I'll get into how that works in a little bit. And as I mentioned before, BitTorrent uses HTTP asynchronously and connectionlessly. And BitTorrent 2 will move to UDP. And PDTP uses a lightweight TCP based transaction protocol. And PDTP uses a lightweight TCP based transaction protocol. Which I think is the best choice for this job. Which I think is the best choice for this job. Okay, this gets into your tracker cedar question here. If you're aware, BitTorrent uses trackers, which is basically either a Python or a PHP script, which is usually talking to a backend database. If you're aware, BitTorrent uses trackers, which is basically either a Python or a PHP script, which is usually talking to a backend database. If you're aware, BitTorrent uses trackers, which is basically either a Python or a PHP script, which is usually talking to a backend database. If you're aware, BitTorrent uses trackers, which is basically either a Python or a PHP script, which is usually talking to a backend database. BitTorrent client, which is called the Cedar, that has all the pieces you wish to serve to the network. And PDTP is structured quite a bit differently. There are two different components to the protocol, which handle the tracker and Cedar functionality, but they also do different things and are structured a little bit differently, and I'll get into those in a bit. I don't think OpenOffice can read the name of this slide. Okay, never mind. If any of you have ever tried to implement a BitTorrent client of your own, one of the problems you're going to run into is Bram Cohen has not documented the protocol. He has about a two-paragraph description of how it generally works, but for the actual... for the actual mechanics of how BitTorrent functions, you're not going to find any documentation besides the code itself. And I have an entire IETF internet draft in HTML and RFC 269 XML format, which is on your handy-dandy DEF CON CDs, if you have those with you. Which you probably don't, and most of you seem to be sleeping, so... Alright. But if you really care, you can pop in that CD and check out the entire protocol, the protocol specification, and it's also on the web at pdtp.org. And we have applied with INA for port assignments. BitTorrent kind of jacks some ports and called them theirs, so... Alright, so here's where we get into the actual... ... Alright, so here's where we get into the actual... ... ... ... ... ... ... ... ... ... Now, the nice thing about this is you can have multiple servers on a single PDTP network, so where before with BitTorrent, you might exhaust the resources of the system you have doing the service with PDTP, but you can also have multiple servers on a single PDTP network. PDTP, you can say what used to be an FTP mirror is now another PDTP server, and it manages a subset of the available clients and routing pieces to and from each other. And then instead of a seeder, there are hubs. How this actually functions is all the servers connect to the hub rather than having a seeder connect to the tracker. Every network must have a hub, so if you have a server disconnected from a hub, it won't serve any files, and it's basically useless. So if you are connected to a hub, you will be able, if the server is connected to a hub, you will be able to access all the content on the network, as opposed to BitTorrent, where you might run into a dead torrent where there's no seeders for it. And the hub manages the directory listings and serving of the initial pieces to the network, much like a BitTorrent seed. An additional component of the system are piece proxies, which can fetch pieces from the hub and cache them to serve to the network. So if the hub's upstream bandwidth is exhausted, you can use proxies to mitigate that. Yeah. And that's basically what I just said. I'm sorry. This is all a really boring intro. Once I get to the diagrams, it should be a little bit better to, should be a little bit easier for you to figure out how this all comes together. Okay. Okay. There are two types of proxy servers, the piece proxies I mentioned earlier, and the actual just proxy servers, which I mentioned at first. The proxy servers use dynamic protocol translation to allow multiple clients behind a firewall or otherwise, or just on a common corporate network, to share a download from a single server. So if, say, one person on a large corporate network is using a single server, and the server is using a single server, and the network is grabbing a software update, they will actually serve that to all the other clients on the local network. So if Windows Update or something were to eventually make use of this, it would replace SUS, basically, that they can fetch an update, and then every other computer on the network that needs that update can get it from the first person who fetched it. And it also allows people behind a firewall to be able to use the proxy server, which, for example, is a firewall, to make outgoing connections to other peers or receive connections from other peers. And this is what clients can basically do. They can browse available files, they can transfer files, or, and they're either passive, behind a firewall without a proxy, or active, where they can make both incoming and outgoing connections. And that becomes really important. Because you need a large number of active clients on the network for it to be able to function. I did look into some ways of getting around that. I don't know if any of you know about Beep. Yeah, okay. One guy knows about Beep. How about, who knows about JXTA? One person knows about JXTA. Okay. There are several ways of getting past the incoming-outgoing connections. There's the interaction problem with firewalls using protocols like Beep and JXTA. But apparently, no one here knows about those, so I'll just move along. All right. Here's what I really wanted to get to. Here's how it all comes together. So basically, this is the smallest possible configuration of a PDTP network you can have, where you have a single hub and a single server that serves several clients. The server manages who's getting what from each other, and the server manages who's getting what from each other, from whom, and the hub actually has the pieces of the content the clients are interested in. If there's no clients on the network that have an available piece, it will fetch it from the hub. Otherwise, the server will try to locate the piece on the best available client and tell that client to transfer it to the other client, much like BitTorrent. And there's actually a very complex ranking algorithm. You probably don't want me to delve into this because it's a lot of set theory, and I'm sure you don't want to hear about that right now. You'd much rather get on and get trashed or something. Does anybody actually want to hear about that a little or not? No? Okay. This is the next step up, and this is where we actually get into something a little more interesting, AAAAaAANNNNNNNNNN. Which would be user- violatedize. co-opting the law. In this configuration, well, this configuration still has client special from the hub, but okay, I'll get into that part a little later. In this, there's just multiple servers, so multiple servers can allow more than one system. Say you had a big network of FTPers, you could designate several of those as servers, and you would have a single hub that would manage all the clients on the network. There we go. Okay. And in this configuration, the piece proxies are being used to basically shield the hub from the clients themselves, so the upstream bandwidth of the hub will not be utilized, except if they're transferring a piece the piece proxies don't have, or just for serving directory listings. So in this configuration, the only bandwidth that's really being taxed is the bandwidth of the servers and the piece proxies, and the hub is largely minimal in its bandwidth consumption. Okay. I'm not sure if you're... What can I do to liven this up? Everybody is just out there zoned out. I'm sorry it's boring subject material, but there's not really much I can do with it. Does anybody have any questions? Any thoughts? Anything? What? The what? Yeah. No, I haven't read that. The main paper I have read on that is the one Bram Cohen wrote on the properties of randomly selected networks. Okay. Okay. Okay. Okay. Okay. Okay. Somebody else has given us a better eye book here. So all right, let me hook that up. And sorry about it, do you want to just come up here and use the mic? Because I can't really hear you. And I'll hook this other laptop up. The question I have was just about the paper suggested that there was a factory that was a number of potential flaws or vectors for attack from the Microsoft perspective on content distribution networks. And one of the things they said was around that the service that would host the directories of the databases, so if you had a database of all the content you could find on the network, because if a client can find it where that database is, their lawyers could find it where that database is, that would be where they would focus their efforts is being able to bring lawyers against your database over your directory server. And yeah, not really sure if you saw that on the last diagram, but in the configuration I had there, the hub server, which manages the directory listings and the available pieces, is actually entirely shielded from the client network through the piece proxies and the PDTP servers. And okay, if you were saying if someone has, say, illicit content being served through a hub, how would they shield that from the lawyers of a company that wants to take it down? Well, what they would have to do is take down all the actual servers, the PDTP servers and the piece proxies. So if you can find people to run those for you who will just take them down on request, you can actually keep the addresses of the, where the actual content is hosted, separate. All right. Okay. Who did any of this again? I have a picture of a motorcycle up here. Oh, do what now? Oh, yeah, which I can't see. All right, I've just got a picture of a motorcycle up here is the thing. All right. Well done, all right. So yeah, this is kind of what I was talking about before Braham Cohen's paper. Braham Cohen, who developed BitTorrent, wrote a paper on the Adventitious Property's random networks and that's what he depends on to provide, handle things like clients who aren't really contributing to the network. He uses an algorithm called choking, where the tracker will either say, this client is doing a good job transferring pieces on the network, and it'll be unchoked, or this client is just leeching pieces off the network and not uploading anything, and then it becomes choked. PDTP uses a weighted scoring algorithm, where it basically keeps track of every piece that a given client has uploaded, and multiplies the score of the destination host by all those values to compute a new score every time a transfer finishes. So clients have been successfully uploading a lot of content, will be ranked higher, and then clients who may be slower will have a lower score, and therefore... If a client experiences a slow upload to a crappy client with a low score, that value will be weighted lower in the average. So that's basically how it tries to select the best peers. All right, the actual protocol format is binary, like most modern protocols. It's fully bidirectional. It supports synchronous operation. It's continuous operations and asynchronous operations. And who here knows what ASM.1 is? Okay. It's used primarily by the X.509 public key architecture. It's a standardized binary format, and I did consider using it at first, but I just decided it was far too complex, and given a large series of input validation errors, the Functioning practise is a little in both OpenSSL and Microsoft's SSL implementation, I decided it's probably too complex for its own good for me, just starting from scratch. So I developed my own binary format, binary protocol format. It's pretty simple here. You have a length value, a serial number. Whenever you have synchronous transactions, you give them a unique serial number, and then when you get a reply to that, it will have the same serial number. An opcode, this is just a value that determines which command you're executing on the server. If you look down at the bottom, it uses the first bit of that to determine between a request or a reply. And then after that, it takes an arbitrary number of binary objects, which can be strings, integers, basically strings and integers. And it lets you basically have variable arguments to any given operation. And that's the format of the objects. They just have a length identifier for what they are, and then the actual payload. And one thing, if you look at this, the length of the entire transaction is the first thing that's given, and then every object, it's own explicit length. So there's no need to compute lengths, which dramatically decreases the complexity of input validation. And then it also uses existing standards for authenticating either clients or servers on the network, servers to hubs or proxies to hubs. And who's familiar with HMAC here? Same few people have been raising their hands, every time, okay. It uses the HMAC hashing algorithm with the secure hash algorithm to authenticate. One of the mean things I've seen missing in internet file transfer for years is integrity validation. I'm sure many of you have heard about when like SunSite got broken into, the University of Alberta got broken into, and the master distribution of OpenSSH was Trojan, and nobody realized it at first. PDTP provides a way for clients to get a signed X.509 certificate for the server, and it will also, at the option of the server administrator, let you compute and apply DSS signatures to files, which will be given to clients after or upon request. So after a file is finished downloading, it can compute the DSS signature for that file, and check to see that the signed key for the server, or with the signed key for the server, and then check to see if it matches the pre-computed signature given by the server. So there's a formalized mechanism to prevent file tampering. So hopefully you won't run into the Trojans using PDTP. So hopefully you won't run into the Trojans using PDTP. So hopefully you won't run into the Trojans using PDTP. Another feature, this hasn't gone to IANA yet, it has its own decentralized search system. Who's familiar with Hotline? Okay, more people, alright. It's sort of based on the idea of Hotline, where you had trackers that would keep track of servers, but what it allows is for clients to query large numbers of servers at once by just sending a single search request UDP datagram, which they'll resend a few times if the server doesn't reply, and if they don't get any reply after that, they'll just assume it's down. And after they've given that datagram, and the server's done doing its search, it'll fire back another UDP datagram at them, telling the search is complete. They'll also have a key for them to fetch the search results from the server, then they connect via TCP to fetch the search results. Then they connect via TCP to fetch the search results. So the nice thing about this is I will be keeping a master list of all trackers, and then the trackers only keep track of the addresses of servers, so nowhere in the first two tiers of that entire system is the actual content being searched for exposed. So hopefully no one will have any sort of legal recourse to try to shut a system like that down. And yeah, there's what I just said about how the search process works. They send a UDP request, and then the server responds if it's up, and then the clients can fetch the search results via TCP. These are the actual implementations that I and a few other people have been working on. They're all available on SourceForge. There's a client library. It's designed for use in both single and multi-thread applications, and it's written in C. Everything is all portable across Win32, Mac OS X, Linux, any BSD you want, and Solaris. I'd like to support a few additional Linux operating systems like HPX and IRX, but I don't have access to those systems, so I can't really do testing. If anybody wishes to help with the development and volunteer in HPX or IRX system, that would be great. Server component is... Well, the server components are all part of a project called Squall, which is also available on SourceForge. There's a Squall server, which is a PCP server, Squall hub, Squall piece proxy, and Squall proxy. And again, everything is portable across... The server is limited to NT-based Windows and won't run on Windows 95, 98, or any... It uses file system monitoring features found in NT only. I'm also in the process of developing a GUI client written using Qt 4. Trolltech just released the developer preview of Qt 4, which has a number of features I really need for it, including... Anybody know Qt, or should I just not go into this? Oh, one guy... Uh... Sure, it uses that. It's not present in Qt 3s, the cross-thread signals and slots, where you can call a signal in one thread and invoke a slot in another. And then, because I have far too much know and not invent here, I'm developing my own Apache portable router with a one-time, like, application library, which supports a lot of features that APR doesn't. Um... Who here is actually, like, an avid programmer? Would you consider yourself an avid programmer? Not many people. Okay. Um... Of you three people who raised your hands, are any of you familiar with continuations? No. Okay, I just won't go into that then. But USRI provides a cross-platform implementation of continuations and file system monitoring. So it's got a lot of cool features. Um... Getting involved, considering how many of you are programmers, you probably don't want to do that, but we're certainly looking for documentation writers if you're at all interested, or testers, yeah. Sign me up. Sign you up, all right. I know everybody loves writing documentation. But, yeah, basically right now, all we have is deoxygen output, which probably no one here knows what that is. Three, same three guys. Wow, you guys are great. Who knows what Javadoc is? Okay, a few more people. Deoxygen is basically an open-source counterpart to Javadoc for whatever language you want. I'm using it with C. But the main thing you need are unit testers, and there's no programmers here, so I'm probably not gonna find any of them. And I had one more slide, but it seems to have vanished. All right. Okay, so, that's the basic overview. Do you have any questions? Two minutes, all right. No questions on anything? You, yeah. I've got a question. You've got a question. Okay, I'll bet you come up here, and we'll get you mics for your question. And, uh, now, is the actual file that's being distributed on the PDTP server itself? No, it's on the hub. Oh, so there's actually a central file for this. It's not like BitTor, where it's actually on a client's file. Um, well, the clients will fetch it initially from the hub, and then transfer it to each other. Or they can fetch it from the piece proxy. So in order for something to be served on PDTP, or PDTP, it has to actually be uploaded first to a server? Yeah, um, one of the nice things is all you have to do to put the file on the hub is just drop it into a directory that you're exporting. So there's no generating a torrent file. You just upload it to that directory, and the server will automatically pick it up through file system monitoring and generate hash lists for it. Okay. All right. Um, my question is, uh, does the PDTP bypass stateful inspection firewalls to be able to, uh, establish the connection to be able to transfer the file? It has its own proxy server that can be used to do outgoing connections and also receive incoming ones. Everything's keyed by IP, too, so it only allows one connection per host. So anybody behind an at firewall who wants to transfer the same file from the same server pretty much needs to use the proxy server. But, yeah, it will route the incoming connections since the proxy server has complete access to all the protocol, the whole wire protocol from the client to the server. It knows which host is gonna be making an incoming connection or what's gonna need to make an outgoing connection, and it can route the connection appropriately. All right. Yay, multiple questions. All right. Last one. All right. Yeah, um, the client library basically runs each thread or each, uh, transfer its own thread, and then it allows you to multiplex directory listing traffic or multiple file transfers through that connection. So you can still browse all the content on the server while multiple transfers are going. It's all written in C, so it has its own server that you can run on any Windows, Linux, BSD, Mac OS X, or your Solera system. All right. All right.