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

Bug report: Generate TOTP incorrect calculations #1964

Open
lasloflyer opened this issue Jan 17, 2025 · 1 comment · May be fixed by #1966
Open

Bug report: Generate TOTP incorrect calculations #1964

lasloflyer opened this issue Jan 17, 2025 · 1 comment · May be fixed by #1966
Labels

Comments

@lasloflyer
Copy link

Describe the bug
The Generate TOTP tool does not calculate the appropriate TOTP 6 digit code.

To Reproduce
Pasting the same secret key into various TOTP generators (Authy, etc) provides consistently correct 6 digit codes for MFA. However, pasting the same secret key into the Input of CyberChef's Generate TOTP (and pressing Bake) does not calculate the proper 6 digit codes compared to all the others.

Expected behaviour
Expect matching results as all the other TOTP generators are aligned to the same RFC.

  • Version: 10.19.4
  • Compile time: 23/10/2024 15:12:24 UTC
  • User-Agent:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
  • Link to reproduce

Image

@lasloflyer lasloflyer added the bug label Jan 17, 2025
@exactlyaron
Copy link

@lasloflyer GenerateTOTP is using the module ToBase32.mjs but the opt package that this 'operation' uses is actually expecting the string to be in Base32 to start with.

Also the opt package expects the string to be uppercase characters

Think I've got a working GenerateTOTP operator. Need to trim any whitespace and make it all uppercase. Testing works fine so far using MS secret key and Google key.

@exactlyaron exactlyaron linked a pull request Jan 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants