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

refactor: support sha512 hash from ChubbyAnt sedutil #114

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

matfax
Copy link

@matfax matfax commented Oct 19, 2023

The sha512-based sedutil fork from ChubbyAnt has been out there since 2021. This refactors the library, gosedctl, and sedlockctl to support their sha512 hashing method. This allows migration from their sedutil to go-tcg-storage without a hassle.

In particular, the following changes have been made:

  • Migrated the hashing method from sedlockctl to pkg for reuse in multiple cmds
  • Added reusable sha512 method to hashing library
  • Added kong flag for hashing method selection, adding sedutil-sha512 option
  • Overhauled kong structures to avoid redundant boilerplate for hashing
  • Use kong's file type checks where applicable
  • Provide device as argument, not flag
  • Passwords can be provided as environment variables
  • Added stdin fallback for missing password flags
  • Fixed some error handling issues
  • Updated dependencies

This is a BREAKING CHANGE for cmds. -p short flags had to be removed from gosedctl because kong does neither support overriding embeedding configs nor does it prefix shorts when embedding.

This matches the updated sedutil hashing method from ChubbyAnt.
This enables more idiomatic reuse of the hashing functions.
This enables the selection of the hashing method.
The input syntax had to be overhauled in order to idiomatically implement the hashing for all passwords.
The device is now provided as argument, not flag.
Passwords and hashing methods can be provided as environment variables.
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.

1 participant