Skip to content

Conversation

@IdrisHanafi
Copy link

@IdrisHanafi IdrisHanafi commented Mar 5, 2025

Summary & Motivation (Problem vs. Solution)

This PR fixes an issue where decrypted private keys were incorrectly converted to UTF-8 strings instead of the expected hexadecimal format...The current implementation works for regular text like a mnemonic.

This change introduces a new flag in the decrypt command called --hex-output which ensures that raw bytes are correctly converted as hexadecimal string representations.

Test

(Don't worry below is a throwaway ETH account purely for testing)
Before:

$ turnkey decrypt --export-bundle-input test.json --organization $ORG_ID --signer-quorum-key $SIGNER_QUORUM_KEY
"\ufffd[\ufffd.\ufffd\ufffd|\ufffd\u0005\ufffd\ufffd\ufffda\u003eό\ufffd5y9....<Redacted>"

After:

$ go run main.go decrypt --export-bundle-input ~/dev/turnkey-test/test.json --organization $ORG_ID --signer-quorum-key $SIGNER_QUORUM_KEY --hex-output
"fc5b812e96...<Redacted>"

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