Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with login with the app and the length of the challenge #39

Open
basvandervlies opened this issue Aug 5, 2019 · 3 comments

Comments

@basvandervlies
Copy link

commented Aug 5, 2019

I am using PrivacyIdea TIQR token and with suite OCRA-1:HOTP-SHA1-6:QN10. Which means I generate a 10 bits random value:

QH10-­‐S     –     the     input     for     the     challenge     (in     this    case    a    10-­‐digit    hexadecimal    value    represented    as    a    string)    and    the    size    of    the    session    data    (in    this    case    the    default    value    of  64 bytes

I encounter problems when login with the TIQR token after a successful enrollment. I noticed that the authentication process was flaky. Sometimes it worked and other times it showed me that I entered the wrong PIN code.

After some debugging I encounter that values equal or above 2147483648 does not work. So the generated string is stored in a int to the power 31 (2^31). Is this a correct assumption?

@basvandervlies

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

The strange part if change the ORCA suite to use a shorter length:

  • OCRA-1:HOTP-SHA1-6:QN08

Is does not work at all.

@7hommay

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

When specifying a numerical value (string) for the challenge, the client converts the value to a hexadecimal (string). This conversion was limited to signed 32 bit values due to the format specifier that was used. So your assumption was correct. I've opened a PR to expand the conversion to 64 bit unsigned values. Hopefully that resolves the issue.

@basvandervlies

This comment has been minimized.

Copy link
Author

commented Aug 16, 2019

@7hommay thanks

7hommay added a commit that referenced this issue Aug 16, 2019

Merge pull request #41 from SURFnet/feature/issue-39
Expand hex conversion to 64 bit values (Issue #39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.