Skip to content

Commit

Permalink
sphinx: don't zero the realm value
Browse files Browse the repository at this point in the history
The realm value is provided by the calling code (which will zero it where needed).
  • Loading branch information
bitonic-cjp committed Jul 17, 2018
1 parent aa216e4 commit 9d72d63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion common/sphinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ struct onionpacket *create_onionpacket(

for (i = num_hops - 1; i >= 0; i--) {
memcpy(hops_data[i].hmac, nexthmac, SECURITY_PARAMETER);
hops_data[i].realm = 0;
generate_key_set(params[i].secret, &keys);
generate_cipher_stream(stream, keys.rho, ROUTING_INFO_SIZE);

Expand Down
5 changes: 2 additions & 3 deletions common/sphinx.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ struct route_step {
*
* @ctx: tal context to allocate from
* @path: public keys of nodes along the path.
* @hoppayloads: payloads destined for individual hosts (limited to
* HOP_PAYLOAD_SIZE bytes)
* @num_hops: path length in nodes
* @hops_data: data destined for individual hosts.
* hops_data[..].hmac will be filled in by this function.
* @sessionkey: 32 byte random session key to derive secrets from
* @assocdata: associated data to commit to in HMACs
* @assocdatalen: length of the assocdata
Expand Down

0 comments on commit 9d72d63

Please sign in to comment.