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

Pass binary data (OTP secrets) coded as hex values #31

Closed
cornelinux opened this issue Sep 5, 2016 · 1 comment · Fixed by #36
Closed

Pass binary data (OTP secrets) coded as hex values #31

cornelinux opened this issue Sep 5, 2016 · 1 comment · Fixed by #36
Assignees
Milestone

Comments

@cornelinux
Copy link
Contributor

I am integrating libnitroky in the command line client of privacyIDEA to initialize the (H)OTP slots.
I am creating a "random" OTP seed to initilize the slot with NK_write_hotp_slot.

I think I stumbled upon a small problem. Once my random bytestring contain \x00. Right at the first position. So I guess the C++ implementation interpreted this as an empty seed. And in fact the OTP values did not match.

Maybe we should allow to pass a hexlified string as seed/otp_key

@szszszsz
Copy link
Member

szszszsz commented Sep 5, 2016

Indeed, '0' is not currently supported in any field. It is used as a terminator like with a regular string.
I agree using hexified input is the solution.

@szszszsz szszszsz changed the title Random HOTP seed might fail Pass binary data (OTP secrets) coded as hex values Sep 5, 2016
@szszszsz szszszsz modified the milestone: v1.1 Sep 5, 2016
@szszszsz szszszsz added the ready label Sep 6, 2016
szszszsz added a commit that referenced this issue Sep 9, 2016
@szszszsz szszszsz mentioned this issue Sep 9, 2016
4 tasks
@szszszsz szszszsz self-assigned this Sep 9, 2016
@szszszsz szszszsz added in progress and removed ready labels Sep 9, 2016
szszszsz added a commit that referenced this issue Sep 9, 2016
szszszsz added a commit that referenced this issue Sep 10, 2016
szszszsz added a commit that referenced this issue Sep 10, 2016
#31 pass secret to OTP as hex (breaking change - previously any string was accepted)
sgued pushed a commit to sgued/libnitrokey that referenced this issue Feb 14, 2022
Change CI to CircleCI
Add Windows build

Fixes Nitrokey#30
Fixes Nitrokey#31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants