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

registration of [X|I]* keys beforehand #2

Open
stef opened this issue Mar 19, 2023 · 1 comment
Open

registration of [X|I]* keys beforehand #2

stef opened this issue Mar 19, 2023 · 1 comment

Comments

@stef
Copy link

stef commented Mar 19, 2023

in the file https://github.com/Inria-Prosecco/noise-star/blob/main/noise-all/api-XK/XK_25519_ChaChaPoly_BLAKE2b/XK.h#L149 the the following comment is found:

/* ...
 * we don't accept unknown remote static keys: all remote keys should have been
   registered in the device by adding the proper peers.

However the XK pattern itself is actually meant in the case the responder does not know the static key of the initiator.
By naively changing the example for KK in the examples directory. The example fails with Error: Receive message 2, since i do not register alice with bob:

    // Register Alice
    //peer *peer_alice = Noise_XK_device_add_peer(bob_device, (uint8_t*) "Alice", alice_spub);
    //if (!peer_alice) return 1;
    //peer_id alice_id = Noise_XK_peer_get_id(peer_alice);

(the example does succeed if i uncomment these lines though)

i have two questions in this regard,

  1. is it possible to use noise-star in XK setting without actually knowing the initiators keys in advance?
  2. is it possible to extract the public key of the initiator in the first message so that i can "register" it at that point, and possibly use it for other authorization checks later?
@stef stef changed the title registration of X keys beforehand registration of [X|I]* keys beforehand Mar 19, 2023
@stef
Copy link
Author

stef commented Mar 21, 2023

ok, i guess if i change my perspective and squint i can see this as a kind of "authorized_keys" file like in ssh, this actually makes sense for "[I|X]" patterns in some use-cases. and if i do so, i also know how to ask your fine code to give me the rs of the initiator.

you can close this issue, but also keep it open as a reminder for others that are initially confused by this.

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