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

Fix rhythm by sending the number of intervals #301

Closed jverbraeken closed 7 years ago

jverbraeken commented 7 years ago

What

This Pull Request adds to the repository a fix for the K-means clustering key generation algorithm that didn't work correctly. A short interval was interpreted as 0, a long interval as 1. Therefore long was encoded the same as short-short-short-long (both 1). To fix this there is a very large offset in the final encoding (10^10) at which position the number of intervals is placed.

Why

This Pull Request is needed because the algorithm didn't work correctly

How

This feature can be viewed/tested within the project by running the new tests

Alternative implementation

Other implementations that I've have considered are ...

Notes

None