Closed Evanfeenstra closed 11 months ago
server_hmac should be Option<[u8; 32]>. Because an hmac is not created if the mutations are empty, so it could be None (right now if there is no hmac, then its a zero-length array, but that is confusing and was a mistake on my part)
server_hmac
Option<[u8; 32]>
signer/handle_lss_msg
check_hmac
Option
client_hmac should be [u8; 32]
client_hmac
[u8; 32]
auth_token should be [u8; 32]
auth_token
server_hmac
should beOption<[u8; 32]>
. Because an hmac is not created if the mutations are empty, so it could be None (right now if there is no hmac, then its a zero-length array, but that is confusing and was a mistake on my part)signer/handle_lss_msg
should fail if muts are NOT empty, but server_hmac is None https://github.com/stakwork/sphinx-rs/blob/master/lss-connector/src/signer.rs#L168check_hmac
should return false if server_hmac is None (for example in signer/handle_lss_msg Msg::Created,check_hmac
is only called if muts are not empty) https://github.com/stakwork/sphinx-rs/blob/master/lss-connector/src/signer.rs#L121Option
, and tests should include both Some and None forserver_hmac
client_hmac
should be[u8; 32]
auth_token
should be[u8; 32]