zerodds-opcua-uacp
OPC-UA stack. OPC UA Connection Protocol (UACP, Part 6 §7.1) and SecureChannel (Part 6 §6.7): the
opc.tcpmessage framing for the client/server stack.
- Source: crates/opcua-uacp
- API docs: docs.rs/zerodds-opcua-uacp
zerodds-opcua-uacp is the wire layer under zerodds-opcua-server. Every
UACP message starts with an 8-byte header (MessageType, ChunkType,
MessageSize). On top of that come the SecureChannel chunks OPN,
MSG and CLO, the common service headers and the OpenSecureChannel service.
SecurityMode None works without the crypto feature; the secured
SecurityPolicies sit on top through SecuritySession. The Part 6 §5 binary codec is
reused from zerodds-opcua-pubsub; UaReader, UaWriter,
DecodeError and EncodeError are re-exported.
connection—MessageHeader,MessageType,ChunkType,HelloMessage,AcknowledgeMessage,ErrorMessage,ReverseHelloMessage.securechannel— chunk framing with the asymmetric security header (OPN) and the symmetric one (MSG/CLO),SequenceHeader,ChannelSecurityToken,RequestHeader/ResponseHeader,OpenSecureChannelRequest/Response,parse_chunk;open_incomingreassembles messages from intermediate (C), final (F) and abort (A) chunks;split_messagessplits a byte stream byMessageSize.crypto(feature) — SecurityPoliciesBasic256Sha256,Aes128_Sha256_RsaOaep,Aes256_Sha256_RsaPss: P-SHA256 key derivation, AES-128/256-CBC with HMAC-SHA256 for symmetric chunks, RSA-OAEP with RSA-PKCS#1-v1.5 or RSA-PSS signatures forOPN, SHA-1 certificate thumbprint. The caller supplies the CSPRNG.
Spec anchors
- OPC UA Part 6 §7.1.2 (UACP; §7.1.2.2 message header, Hello, Acknowledge, Error, ReverseHello), §6.7 (SecureChannel; §6.7.2 chunk security layout, §6.7.3 abort, §6.7.6 key derivation), §5.2 (binary encoding).
- OPC UA Part 4 §5.6.2 (OpenSecureChannel,
ChannelSecurityToken), §7.32 (RequestHeader), §7.33 (ResponseHeader). - OPC UA Part 7 SecurityPolicies
Basic256Sha256,Aes128_Sha256_RsaOaep,Aes256_Sha256_RsaPss. - Coverage: opcua-client-server-1.05.
Consumers
zerodds-opcua-server.zerodds-opcua-bridge(passescryptothrough).
Features
std(default) — enablesallocand thestdfeatures ofzerodds-opcua-pubsubandzerodds-opcua-gateway; addsstd::error::ErrorforCryptoError.alloc— enables theallocfeatures of the same two crates.crypto— pulls inaes,cbc,hmac,sha2,sha1,rsa(RustCrypto); compiles thecryptomodule andSecuritySession. Does not requirestd.
Status
no_stdwithallocunlessstdis enabled.forbid(unsafe_code).- Library only, no binaries.
- 23 test functions in the source (
src/).
zerodds-opcua-uacp
OPC-UA-Stack. OPC UA Connection Protocol (UACP, Part 6 §7.1) und SecureChannel (Part 6 §6.7): die Rahmung der
opc.tcp-Nachrichten für den Client/Server-Stack.
- Quelle: crates/opcua-uacp
- API-Docs: docs.rs/zerodds-opcua-uacp
zerodds-opcua-uacp ist die Übertragungsschicht unter zerodds-opcua-server.
Jede UACP-Nachricht beginnt mit einem 8 Byte langen Kopf (MessageType,
ChunkType, MessageSize). Darauf setzen die Chunks des SecureChannel
OPN, MSG und CLO, die gemeinsamen Dienstköpfe und der Dienst
OpenSecureChannel auf. SecurityMode None funktioniert ohne das Feature
crypto; die gesicherten SecurityPolicies setzen über SecuritySession darauf
auf. Der binäre Codec aus Part 6 §5 wird aus zerodds-opcua-pubsub übernommen;
UaReader, UaWriter, DecodeError und EncodeError
werden reexportiert.
connection—MessageHeader,MessageType,ChunkType,HelloMessage,AcknowledgeMessage,ErrorMessage,ReverseHelloMessage.securechannel— Rahmung der Chunks mit asymmetrischem Sicherheitskopf (OPN) und symmetrischem (MSG/CLO),SequenceHeader,ChannelSecurityToken,RequestHeader/ResponseHeader,OpenSecureChannelRequest/Response,parse_chunk;open_incomingsetzt Nachrichten aus Chunks der Arten Zwischenteil (C), Schluss (F) und Abbruch (A) zusammen;split_messagesteilt einen Bytestrom anhand vonMessageSize.crypto(Feature) — SecurityPoliciesBasic256Sha256,Aes128_Sha256_RsaOaep,Aes256_Sha256_RsaPss: Schlüsselableitung mit P-SHA256, AES-128/256-CBC mit HMAC-SHA256 für symmetrische Chunks, RSA-OAEP mit Signaturen nach RSA-PKCS#1-v1.5 oder RSA-PSS fürOPN, SHA-1-Fingerabdruck des Zertifikats. Den CSPRNG liefert der Aufrufer.
Spec-Anker
- OPC UA Part 6 §7.1.2 (UACP; §7.1.2.2 Nachrichtenkopf, Hello, Acknowledge, Error, ReverseHello), §6.7 (SecureChannel; §6.7.2 Sicherheitsaufbau der Chunks, §6.7.3 Abbruch, §6.7.6 Schlüsselableitung), §5.2 (binäre Kodierung).
- OPC UA Part 4 §5.6.2 (OpenSecureChannel,
ChannelSecurityToken), §7.32 (RequestHeader), §7.33 (ResponseHeader). - OPC UA Part 7 SecurityPolicies
Basic256Sha256,Aes128_Sha256_RsaOaep,Aes256_Sha256_RsaPss. - Abdeckung: opcua-client-server-1.05.
Konsumenten
zerodds-opcua-server.zerodds-opcua-bridge(reichtcryptodurch).
Features
std(Standard) — aktiviertallocund die Featuresstdvonzerodds-opcua-pubsubundzerodds-opcua-gateway; ergänztstd::error::ErrorfürCryptoError.alloc— aktiviert die Featuresallocderselben beiden Crates.crypto— bindetaes,cbc,hmac,sha2,sha1,rsa(RustCrypto) ein; kompiliert das ModulcryptoundSecuritySession. Setztstdnicht voraus.
Status
no_stdmitalloc, solangestdnicht aktiviert ist.forbid(unsafe_code).- Nur Bibliothek, keine Binaries.
- 23 Testfunktionen im Quelltext (
src/).