Hunting for open GameKit solutions

On iOS, GameKit offers a simple way for applications to connect to each other using ad-hoc peer-to-peer communication without having to be connected to a common network. Despite its name, GameKit has been used for many non-gaming purposes as well as for games. These include contact information exchanges, media sharing, device-to-device presentations and so forth.
It's surprising, therefore, that Apple has not introduced a computer-based standard to allow Mac and Windows computers to participate in this information exchange (let alone Android and BlackBerry devices) using the common GameKit programming frameworks.
When you look closely at GameKit, you begin to experience the sense of top-down control and paranoia that permeates this implementation. If anything, Apple comes off as just a wee bit psychotic looking at the measures it takes to control GameKit connections, which are (after all) nothing more than Bonjour and Bluetooth handshakes.
Now, I understand that Apple's agreements with major recording labels have tinged the way the company transmits copyrighted information (which is why my AirPlayer/Banana TV applications do not support the highly encrypted RAOP standard), but GameKit mostly involves opt-in sharing of simple information like "where did my chess piece just move to?" or "what is this guy's address and phone number?" You simply have to approve who the information goes out to, and the person who gets the information has to OK the incoming data.
Let's start by looking at the handshaking part of the connection. Unlike normal Bonjour communication, GameKit does not use plain text tcp and upd names like _airplay._tcp.. Nope, every connection name is encrypted using SHA1 digests to produce an unrecognizable hash. Instead of _mikesgameapp._udp., you get something like _j3rd2iopqrsnw._udp.. I'm making the specifics up there, but you get the idea.
What's more, GameKit adds another hash to each host name. Instead of connecting to, say "Binky," you need to connect to 00sjtkK0A..Binky, a Bonjour host whose prefix includes further authentication information. In addition, each host announces the version it supports (the txtvers TXT field) and whether it is acting as a server ("A") or client ("B"), using the state TXT field.
Before you can even start the actual handshake, a GameKit connection must pass through these hurdles. If you do not do this correctly, the connection will not appear as a possible peer.
iOS developer Matthias Ringwald has been investigating GameKit and looking to open it up for use on OS X, Linux and Windows. As of yesterday, he had successfully gotten past the first hurdle -- reverse engineering the TCP/UDP service name to allow computers to advertise on Bonjour or search for matching services using a standard Bonjour net services browser -- but that's about as far as things have gotten. Getting the server name hash and effecting the handshake are challenges that remain.
Reversing GameKit looks like a slow and arduous process, but it wouldn't be the first time Apple technologies were opened to outside use.
Share
On iOS, GameKit offers a simple way for applications to connect to each other using ad-hoc peer-to-peer communication without having to be...
Add a Comment
Anyone who has written any kind of server that handles any data of value knows that you can't be sufficiently paranoid.
Security is hard. I haven't looked into the code, and I don't know whether GameCenter does it right or not, but nothing in the article seems psychotic to me.
C'mon, Kai. You have to admit that a sentence like "Apple comes off as just a wee bit psychotic" isn't very impartial. And, you also realize that teaching someone how to use Apple technology can be done with a negative angle. I got down as far as the third paragraph and thought,"This must be Erica" from the negative bent.
So, yes Erica's stories are generally Anti-Apple, sometimes unnecessarily alarmist, but John C. Dvorak has proven that's one way to make a name for yourself. The original poster makes some points that were accurate to some degree, but maybe went overboard with the "paranoia". But, I can see where that may have come from Erica's use of the term.
@Kai
You do realize that the author is talking about a long string of posts. I think Erica is great and respect the intellectual investigation, but most times there is an investigation of the Apple platform from the perspective of "it should be open, let's open it - to hell with everything else" and while this is cool - it does indeed over time have an "anti-Apple" tinge.
You know, if this were my site I'd give you a stern talking to.
You realize that you are claiming that a person that teaches people how to use Apple technology at both a consumer, professional and technical level has a "pathological anti-apple stance"?
Do you even realize, a little bit, that it makes you look like the one with some kind of "psychosis" as you say?
Here, let me help you: You look a little crazy here :)
-K
I dunno, a more likely explanation is that they want to make sure Game Center doesn't get overrun by cheaters who exploit the protocol in various ways. Microsoft maintains even more control over Xbox Live and they still have to deal with cheating.
I suspect that at some point Apple will introduce Game Center support into MacOS X. They really don't have any incentive to introduce it to Windows and Linux at this point.
Many people are complaining about how Apple doesn't take security seriously, others are complaining about how locked down things are. Since no one is truly happy, maybe they are doing ok.
After all, compromise is the art of making sure all parties are equally dissatisfied.
Deals of the Day
more deals- Targus Truss Case for iPad and iPad 2 for $15 + free shipping
- Apple iPhone 4 8GB for Verizon, AT&T, or Sprint for $50 + pickup at Best Buy
- Unlocked iPhone 4S 16GB for GSM (AT&T, T-Mobile) for $619 + free shipping
- Apple iMac Core i7 Quad 3.4GHz 27" w/ 24GB RAM, 2TB HDD for $2,677 + $29 s&h
- Used Apple Magic Mouse for $36 + $4 s&h
- 9-Piece iPhone Bundle, includes 1,900mAh battery for $8 + free shipping
6 Comments