ericcornelissen / NervousFish

An app for your :iphone: to exchange public-keys in a secure manner.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

Add an initial visual identity check activity, closes #2 #122

Closed ericcornelissen closed 7 years ago

ericcornelissen commented 7 years ago

What

A simple initial activity which can be used to verify the identity of another user while connecting via Bluetooth in a visual manner. For now the activity only contains a grid of buttons, later on the buttons will be overlayed with an image to present a more user friendly interface. Each button can be identified and after clicking on 5 buttons the activity will automatically go to the next activity (currently the LoginActivity) and provide it with the selected pattern.

Why

As specified in #107 we need to create a secure way to pair with Bluetooth on top of the standard pairing method. This PR contains the first step towards creating this method.

How

You can run the Cucumber tests and see it there or you can force the code to open the new activity by adding:

Intent intent = new Intent(this, VisualVerificationActivity.class);
this.startActivity(intent);

Alternative implementation

Not considered

Notes

As mentioned before this PR only adds simple activity with some buttons. In future PRs there will be a few additions, for example:

jverbraeken commented 7 years ago

Nice work, Eric!

Have you already looked at another much simpler solution: drawing a single image and then using touch events to get the location of where the user pressed. Such a solution is more elegant, less code and has a lot (!) more precision than 16 buttons (each having 2560x1440 / 16 = 230,400 times less precision than OnTouchEvent(x, y))

ericcornelissen commented 7 years ago

@jverbraeken I don't think we need that kind of precision to make this work, and doing it that way could complicate things significantly for no good reason.

The reason I don't think we need that kind of precision is because of the image that I image will be displayed on top of the buttons. This should be an image with a few distinct figures/drawings that can easily be communicated. These figures will be pretty large so it easy for user to identify them on the screen and touch them in order to replicate the pattern of the master device.

There is really only one downside to this approach, which is that all images have to adjusted for the buttons so that the distinct elements are within the borders of the underlying buttons.