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

feat: add sha256 and sha512 support #135

Merged
merged 2 commits into from
Feb 26, 2025
Merged

feat: add sha256 and sha512 support #135

merged 2 commits into from
Feb 26, 2025

Conversation

yitsushi
Copy link
Owner

As the original implementation followed only RFC-4226, it had only SHA1 support. This covers a lot of tokens, but secure tokens are not SHA1, but SHA2 based as described in RFC-6238.

Until now, I though only hardware tokens use SHA2 (SHA256, SHA512) and maybe some edge cases, but not common. That was probably true almost 10 years ago when I originally created this tool. Today, even tho I didn't see 256 or 512 tokens yet, I think it's more common, and soon they will be used in a lot of places.

Resolves #133

References:

As the original implementation followed only RFC-4226, it had only SHA1
support. This covers a lot of tokens, but secure tokens are not SHA1, but
SHA2 based as described in RFC-6238.

Until now, I though only hardware tokens use SHA2 (SHA256, SHA512) and
maybe some edge cases, but not common. That was probably true almost 10
years ago when I originally created this tool. Today, even tho I didn't
see 256 or 512 tokens yet, I think it's more common, and soon they will
be used in a lot of places.

Resolves #133

References:
- #133
- https://www.ietf.org/rfc/rfc4226.txt
- https://www.ietf.org/rfc/rfc6238.txt

Signed-off-by: Victoria Nadasdi <victoria@efertone.me>
@yitsushi
Copy link
Owner Author

Additional note:
I did not add a set-algo command, as I think we should not follow that pattern and implement a proper update command. It was a design choice back then because there was only one property we could change, but now we have more, and probably we could just let users change Account Name (rename) and Namespace (move) with a single update command and flags.

Signed-off-by: Victoria Nadasdi <victoria@efertone.me>
@yitsushi yitsushi merged commit 28337f3 into main Feb 26, 2025
9 checks passed
@yitsushi yitsushi deleted the 133-add-sha2 branch February 26, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support sha256
1 participant