OTP Translation error #14

klali opened this Issue Mar 28, 2013 · 5 comments


None yet

2 participants

klali commented Mar 28, 2013


Sometimes the translation algorithm makes errors, for example: vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin can be decoded into both vvbfbfjghfuetiketuivbgckfjlflgtnvenblckvtclj and vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin.

Maybe it would be better to prefer the one that matches the original instead of just taking the first?


Kami commented Mar 28, 2013


I'll dig in and try to figure out what is the best way to do in cases like this (picking the matching one or picking the first one).

@Kami Kami added a commit that referenced this issue Mar 30, 2013
@Kami If there are multiple interpretations for a given OTP, first try to f…
…ind the one

which matches the input OTP. If the one is found, use the input OTP, otherwise
use last of the available interpretations.

Reported by Klas Lindfors, part of #14.
Kami commented Mar 30, 2013

I've pushed a branch which should improve this behavior - #15.

Can you please have a look / review it?


klali commented Apr 2, 2013

It looks good to me (as in it works as I expect it to..) =)


Kami commented Apr 2, 2013

@klali Thanks, I've merged it into master.

I will work on creating a new release and publish it on PyPi later today.

Kami commented Apr 3, 2013

New version (1.6.2) with this change has been published to PyPi - https://pypi.python.org/pypi/yubico/1.6.2

@Kami Kami closed this Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment