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

hdk shared secret api #1410

Merged
merged 14 commits into from Jun 14, 2022
Merged

hdk shared secret api #1410

merged 14 commits into from Jun 14, 2022

Conversation

neonphog
Copy link
Contributor

@neonphog neonphog commented Jun 7, 2022

Summary

@thedavidmeister - Here's what I'm thinking for getting the shared secrets into lair, let me know your thoughts:

  • Using unsized bytes for key ref so users can supply other references that make more sense in app-specific ways (e.g. prefixes like (my_key_type:[32 random bytes]). But we'll still auto-generate an identifier if they pass in None to either create or ingest.
  • We provide:
    • x_salsa20_poly1305_shared_secret_create_random - generates a random shared secret
    • x_salsa20_poly1305_shared_secret_export - exports an existing shared secret encrypted as a box for a specific other agent
    • x_salsa20_poly1305_shared_secret_ingest - which can import shared secrets either exported via hdk or generated from some custom app-specific process.
  • We've got a bit of a mix of verb-noun function names and noun-verb function names... I went with noun-verb, I prefer them in general because they then sort together lexicographically.

TODO:

  • CHANGELOG(s) updated with appropriate info
  • Just before pressing the merge button, ensure new entries to CHANGELOG(s) are still under the UNRELEASED heading

@neonphog neonphog marked this pull request as ready for review June 10, 2022 19:11
crates/hdk/src/x_salsa20_poly1305.rs Outdated Show resolved Hide resolved
crates/hdk/src/x_salsa20_poly1305.rs Outdated Show resolved Hide resolved
crates/hdk/src/x_salsa20_poly1305.rs Outdated Show resolved Hide resolved
@neonphog neonphog merged commit 8fd20bc into develop Jun 14, 2022
@neonphog neonphog deleted the hdk-shared-secret branch June 14, 2022 16:28
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.

None yet

2 participants