Skip to content

Conversation

@tvlooy
Copy link

@tvlooy tvlooy commented Sep 9, 2025

Description:

When scanning the 2FA codes with FreeOTP it reports that the tokens contain insecure cryptographic parameters. The key is too short. Google authenicator standard is 32 characters.

Review

@michalkleiner
Copy link
Contributor

Thanks for the PR @tvlooy. Would you be able to update the expected tests as well, please? See https://github.com/matomo-org/matomo/actions/runs/17588686587/job/49979193367?pr=23585#step:3:791 for details on the failure.

@tvlooy
Copy link
Author

tvlooy commented Sep 10, 2025

Done!

When scanning the 2FA codes with FreeOTP it reports that the tokens contain insecure cryptographic parameters. The key is too short. Google authenicator standard is 32 characters.
@tvlooy
Copy link
Author

tvlooy commented Sep 10, 2025

Oh, that didn't work the way I expected it. I now updated the PR and sqashed commits.

@tvlooy
Copy link
Author

tvlooy commented Sep 18, 2025

@michalkleiner can we merge this now or is there still something missing?

@sgiehl
Copy link
Member

sgiehl commented Sep 29, 2025

@tvlooy We won't merge this for now, as it's unclear if a bigger key size could cause issues with existing 2FA apps.
Various services (including Microsoft, GitHub, ...) are still using 16 chars.

In addition, there are also discussions around the warning in FreeOTP here:
freeotp/freeotp-android#287
https://github.com/orgs/community/discussions/172923

@michalkleiner michalkleiner added the Do not close PRs with this label won't be marked as stale by the Close Stale Issues action label Oct 30, 2025
@michalkleiner
Copy link
Contributor

One possible solution I can think of would be to make the key length configurable, defaulting to the current 16 characters. Then if someone wanted, they could adjust the config locally to 32.

@tvlooy
Copy link
Author

tvlooy commented Oct 30, 2025

While I understand the concern, it would benefit everyone if the security were sufficient by default. It shouldn’t be something people have to think about. Adding options can also create opportunities for misuse.

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

Labels

Do not close PRs with this label won't be marked as stale by the Close Stale Issues action

Development

Successfully merging this pull request may close these issues.

3 participants