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

KeePass built-in OTP Secret Issue #62

Closed
Coool opened this issue Aug 2, 2022 · 10 comments
Closed

KeePass built-in OTP Secret Issue #62

Coool opened this issue Aug 2, 2022 · 10 comments

Comments

@Coool
Copy link
Contributor

Coool commented Aug 2, 2022

Hi!

I'm using KeePass built-in OTP Secret TimeOtp-Secret-Base32. When press OTP button, returns “String of HEX type must be in byte increments” error. Can't figure out what's wrong.

Thanks.

@belaviyo
Copy link
Owner

belaviyo commented Aug 3, 2022

Hi,

What is the format of the string stored in the TimeOtp-Secret-Base32? If you can generate a dummy OTP secret that does not work as expected, please share it so I can reproduce the issue.

@Coool
Copy link
Contributor Author

Coool commented Aug 3, 2022

TimeOtp-Secret-Base32
TimeOtp-Secret-Base32 = 3C6OD4JE4T3YRYCZEMD5DGPOMTSQ

@belaviyo
Copy link
Owner

belaviyo commented Aug 4, 2022

Thanks for the report. It is now fixed. Can you try the developer version to confirm?
https://github.com/belaviyo/keepass-macpass-helper/archive/refs/heads/master.zip -> v3

@Coool
Copy link
Contributor Author

Coool commented Aug 4, 2022

TOTP.js error, complaining could not find. Fix to totp.js or rename TOTP.js to totp.js.

Thanks.

P.S.
Could not load v3 manifest in Waterfox in Develepor mode. Complaining that not supported. Edited existing 0.7.2.2 loaded plugin. 😉

P.S.S.
Why are no new releases found in GitHub Release section?

belaviyo added a commit that referenced this issue Aug 6, 2022
@belaviyo belaviyo reopened this Aug 6, 2022
@belaviyo
Copy link
Owner

belaviyo commented Aug 6, 2022

I found a bug in the b32ToHex conversion. Still, the generated token is different from what KeePass generates. Though, I am not sure which one is correct.

My observation:
Using this secret on https://authy.com's mobile app generates compatible tokens with my extension. Also, crypto-totp and totp-generator node modules generate the same time-based tokens.
These tokens are different from what KeePass generates. Interestingly, KeePassXC generates different tokens from KeePass and Authy! There is something wrong with this secret, or it is not b32 encoded, or it might not be RFC4648 variant. Can you provide the "otpauth://totp/..." URL? Would it be possible to generate a new secret and retry?

Please try the latest commit (ff version attached) with some other secrets of yours and see if you can regenerate this issue.

ff.zip

@Coool
Copy link
Contributor Author

Coool commented Aug 6, 2022

If you talk about my provided token above, then it maybe not the which one to rely on. It's one of my existing secret only modified. I don't have any issue so far with your plugin and Tray TOTP Plugin. I don't use regularly KeePass {TIMEOTP} parameter with Auto-Type.
You can try otpauth://totp/Coool:coool@email.com?secret=NMCWBVTA6EVWG3U4DGCT6TLHIKFN3DQF&issuer=Coool&algorithm=SHA1&digits=6&period=30
I will update you if I have any issue with new release.

Thanks.

@belaviyo
Copy link
Owner

belaviyo commented Aug 6, 2022

Ok, then, please keep using the ff.zip version. If everything works as expected, I'll release this version so that the extension switches to the native crypto lib instead of the old custom lib.

@Coool
Copy link
Contributor Author

Coool commented Aug 7, 2022

Haven't observed any problems. How long do you think to monitor any issue? Week?

@belaviyo
Copy link
Owner

The new version with the updated OTP module is submitted to the stores.

@Coool
Copy link
Contributor Author

Coool commented Aug 21, 2022

belaviyo, great news!

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

No branches or pull requests

2 participants