Getting cryptography right is non-trivial. So take this with caution. As I understand it, you want to generate a key pair on each side and exchange the public keys. That can be done easily via wifi too since you only exchange _public_ keys. The problem is to be sure you got the right ones (i.e. that they have not been faked by e.g. a man in the middle attack). To ensure this, you might e.g. calculate a cryptographic hash of the public keys (to shorten the data that has to be compared) and display them on both sides. The user may then compare the hashes.
Am Samstag, 29. September 2012 15:21:51 UTC+2 schrieb Jasper Horn: > > I have an idea for an app that will both have a component that runs on the > computer of the user and a component that runs on the phone. The idea will > be that the two will communicate over wifi. > > To make this secure, I want to set up a public/private key pair on the > computer and the phone. In order to do this in a user-friendly way, I want > to do so automatically over usb. However, in exploring how much of what I > want is actually possible on android, I have been unable to find out how to > have an app communicate over usb to a program on the computer. > > Technically, it would be similar to using the computer as a USB accessory, > but I doubt it would actually be similar enough to make this work. I have > also read that it might be possible using ADB port forwarding, but this > doesn't really look like it would make it more user-friendly for end users. > Finally, I suppose I could solve the problems by only using the file system > and mounting it, storing the public key in a file on the s-card, but it's > not really the ease of use that I am looking for. > > Is there a way of communicating between an application running on a pc and > an app running on an android device that I have missed? > Is there a mistake in my current understanding of the possibilities? > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en