https://github.com/plasmapower/nano-key-exchange
Performs a key exchange with nano keys, which produces a shared key that only the two participants will know.
https://github.com/plasmapower/nano-key-exchange
Last synced: 12 months ago
JSON representation
Performs a key exchange with nano keys, which produces a shared key that only the two participants will know.
- Host: GitHub
- URL: https://github.com/plasmapower/nano-key-exchange
- Owner: PlasmaPower
- Created: 2020-05-22T06:43:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-22T07:15:22.000Z (about 6 years ago)
- Last Synced: 2025-02-25T12:48:18.856Z (over 1 year ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nano-key-exchange
Performs a key exchange with nano keys, which produces a shared key that only
the two participants will know.
Contains one function, `nano_get_shared_key`, which takes 3 arguments:
- A constant pointer to the 32 byte private key (not a seed, not expanded)
- A constant pointer to the 32 byte public key of the other party
- A mutable pointer to a 32 byte output buffer for the shared key
It returns a uint8_t which is currently either 0, indicating success, or 1,
indicating a bad public key. On failure, the output buffer isn't modified.
```c
uint8_t nano_get_shared_key(
const uint8_t * secret_key,
const uint8_t * other_public_key,
uint8_t * shared_key_out
);
```