opc ua encrypting

Unified Architecture topics related to OPC UA Specification, compliant behavior and any technical issues of OPC UA, like Security, Information Model, Companion Specs DI, PLCopen, ADI, ...

Moderator: Support Team

Post Reply
kakamo
Jr. Member
Jr. Member
Posts: 2
Joined: 24 Oct 2016, 07:52

opc ua encrypting

Post by kakamo »

Hy,

I am newby in OPC UA , and i have a question about encrypting in OPC UA message. Can we decide if a paquet of OPC UA communication beetwen client and server (Message type == MSG) is encrypted just by analysing the "Encoding mask" field? if it is equale to 0x01, it mean message note encrypted, if not , the message is encrypted.

I made this conclusion from analysing wireshark capture, is it correct?

cacamille3
Hero Member
Hero Member
Posts: 73
Joined: 15 Feb 2012, 21:43

Re: opc ua encrypting

Post by cacamille3 »

I suppose you refer "Encoding Mask" as the first byte of the Message - TypeId, which is an ExpandedNodeId,
The first Byte actually stands for the encoding DataEncoding of the NodeId of the ExpandedNodeId.

According to the OPC UA Specification the possible values are:

Two Byte: 0x00 - A numeric value that fits into the two byte representation.
Four Byte: 0x01 - A numeric value that fits into the four byte representation.
Numeric: 0x02 - A numeric value that does not fit into the two or four byte representations.
String: 0x03 - A String value.
Guid: 0x04 - A Guid value.
ByteString: 0x05 - An opaque (ByteString) value.
NamespaceUri Flag: 0x80 - See discussion of ExpandedNodeId in 5.2.2.10.
ServerIndex Flag: 0x40 - See discussion of ExpandedNodeId in 5.2.2.10.

It is well described in the OPC UA Specification Part 6 - 5.2.2.9.

kakamo
Jr. Member
Jr. Member
Posts: 2
Joined: 24 Oct 2016, 07:52

Re: opc ua encrypting

Post by kakamo »

thanks for your reponse.
I did noticed that all encrypted message dont have any of the possible values you mentioned (for exemple, 0xed), so i suposed that by just using this filed, we can decide if a message is encrypted or not

Post Reply