Node-RED nodes using CryptoJS to encrypt and decrypt messages (sharing)

1,198 views
Skip to first unread message

Bernardo Baumblatt

unread,
Sep 11, 2017, 1:54:19 PM9/11/17
to Node-RED
Hi Folks,

Just sharing the node-red-contrib-crypto-js package recently published.

My two cents.

Best Regards,
Bernardo Baumblatt.

Jéan Roux

unread,
Sep 12, 2017, 11:55:01 AM9/12/17
to Node-RED
Nice!

jo2

unread,
Sep 18, 2017, 5:59:35 AM9/18/17
to Node-RED
Cool stuff!

I am trying to use the HMAC-SHA1 node, but get this error:

"TypeError: node.trace is not a function"

Aslo seen same for node.debug()


Cheers
-jo

Nick O'Leary

unread,
Sep 18, 2017, 6:00:42 AM9/18/17
to Node-RED Mailing List
What version of node-red are you using? They node.trace/debug were added to the Function node very recently.

Nick

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/40b63ccd-872e-437e-8b75-521775c49d34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jo2

unread,
Sep 18, 2017, 6:06:49 AM9/18/17
to Node-RED

0.16.2

jo2

unread,
Sep 18, 2017, 6:15:43 AM9/18/17
to Node-RED
Upgraded to 0.17.5 and the error is gone :-)
Thanks Nick!

mqiu...@gmail.com

unread,
Oct 10, 2017, 2:07:30 PM10/10/17
to Node-RED
Hello Bernardo,

Thanks for your node module!
I tested out your node and I would like to put in some of my thoughts:

1. In your encrypt and decrypt node, can the secret key be stored as credential instead of visible text in the flow file? can they use one config node to manage and share the secret key?

2. Can you add a programmatic way choose the algorithm? for example, setting "msg.algorithm" would over write the node configuration.

These features should not be too hard to implement, but they should add more values to your node modules in my opinion!

Kind regards,
Michael Qiu

Dave C-J

unread,
Oct 10, 2017, 7:00:28 PM10/10/17
to node...@googlegroups.com
as a general rule we prefer that msg properties DON'T override configured properties unless either left blank or explicitly allowed to do so (by an option allowing it). Otherwise a user can set what they think is an option and then unknown to them something in the message changes it.

and yes all secret credentials ought to be stored in the creds file not the main flow file. If that is not currently the case I would advise against using it until it is fixed as it would be too easy to expose your credentials by mistake.

Simon H

unread,
Oct 13, 2017, 8:02:07 AM10/13/17
to Node-RED
'all secret credentials ought to be stored in the creds file not the main flow file' - 
to add my twopenneth - 'and should be overridable by being specified in a msg' :).

I'm doing quite a lot recently where credentials are dynamic; e.g. for MQTT, I use a timed JWT, so it must change regularly.
For encryption, you could easily imagine the key being derived from a website, or created on the fly and posted to a website.

s

Julian Knight

unread,
Oct 13, 2017, 8:45:05 AM10/13/17
to Node-RED
I think lots of people would be interested in seeing some examples of your timed JWT architecture Simon - any chance you might be writing it up somewhere?

Simon H

unread,
Oct 13, 2017, 10:59:25 AM10/13/17
to Node-RED
Time I started a technical blog about the technologies which go in to Nebula....

Julian Knight

unread,
Oct 14, 2017, 5:33:14 PM10/14/17
to Node-RED
Yup! :-)

ANJALI DHABARIA

unread,
Apr 19, 2018, 5:19:36 AM4/19/18
to Node-RED
Sir,
I'm trying to do DES encryption but the output on debug is not 64 bits rather 44 characters.
Is the encrypted output encoded in some form??
Does the key needs to be in hex ??
When I'm sending 8-byte DES-Encrypted string from Arduino, Node-red decryption node outputs null string.

WHAT TO DO!! PLEASE HELP! 
Reply all
Reply to author
Forward
0 new messages