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

File based key management for babyjubjub keys #23

Closed
jimthematrix opened this issue Jul 22, 2024 · 1 comment
Closed

File based key management for babyjubjub keys #23

jimthematrix opened this issue Jul 22, 2024 · 1 comment

Comments

@jimthematrix
Copy link
Contributor

Similar to Ethereum v3 key files to persist encrypted private keys, save the private key in a JSON file like below:

{
    "crypto" : {
        "cipher" : "aes-128-ctr",
        "cipherparams" : {
            "iv" : "6087dab2f9fdbbfaddc31a909735c1e6"
        },
        "ciphertext" : "5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46",
        "kdf" : "pbkdf2",
        "kdfparams" : {
            "c" : 262144,
            "dklen" : 32,
            "prf" : "hmac-sha256",
            "salt" : "ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd"
        },
        "mac" : "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2"
    },
    "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6",
    "version" : 3
}
@jimthematrix
Copy link
Contributor Author

fixed by #26

It turns out the keystorev3 format works completely fine with a private key for the Babyjubjub curve. As such we don't need to include the actual key management capability, but instead encourage clients to use an existing solution like that demonstrated in the integration test (/go-sdk/integration-test/e2e_test.go)

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

No branches or pull requests

1 participant