Reading encrypted udp component sensors in node red

Guys

I am trying to get some UDP component sensors read into local node red instances and the broadcast nature of this component is really useful for this.

I have a dev ESP32 device set up fine using esphome, it talks to HA fine, and it broadcasts UDP fine as well. My node red instances can also see the UDP packets, capture them and poke them into flows as well. So far so good and very promising.

I have mangled up a bunch of node red code and can parse the header and encrypted payload fine too. What I am struggling with is decrypting the payload contents.

So far I have 3 nodes, one that parses the header into its plaintext and encrypted payload components (Parse header), Once that decrypts the encrypted payload (Decrypt payload) and am working on the last part that parses the decrypted payload into a message per sensor.

I have done a first stab at this using some code I found at:-

javascript implementation
https://www.movable-type.co.uk/scripts/tea-block.html

But the decrypt does not seem to be happening, at least there is nothing that resembles the sensor name etc in the decrypted data.

Questions:-

  1. How is the key being hashed in the component, I have looked through the source and am finding it a touch obscure.

  2. Is there anyone that contributed to this component that would be prepared to spend a small amount of time helping me get this last part nailed down.

If I can get this working I would be happy to donate the resulting node.js somewhere or other to help others do similar.

Cheers

aka47