Supported Security Policies
A SecurityPolicy is a named bundle of algorithms for asymmetric signing,
asymmetric encryption, symmetric encryption, key derivation, and message
signing. OPC UA Part 7 defines the standard SecurityPolicies as Profiles
in the online Profile database at https://profiles.opcfoundation.org. A
server advertises its supported policies through its Endpoints (returned
by GetEndpoints). The client picks one when opening a SecureChannel.
The tables below list every SecurityPolicy of the UACore 1.05 Profile group
and show which crypto backend implements it. Adding a policy to a server is the
same call regardless of backend – UA_ServerConfig_addSecurityPolicy*()
(see ECC Specifics for the full call list).
Status and required policies
Current: the Profile is released and not deprecated.
Deprecated: the Profile database marks the Profile as deprecated. Do not use it for new systems.
The conformance unit Security Policy Required asks every application that
supports security for at least SecurityPolicy [A] (Aes128_Sha256_RsaOaep)
and SecurityPolicy [B] (Basic256Sha256). The conformance unit Security
ECC Policy asks for one of SecurityPolicy [ECC A] or [ECC B]. The Profile
database gives the label [ECC A] to ECC_nistP256_AesGcm and
ECC_brainpoolP256r1_AesGcm, and the label [ECC B] to
ECC_curve25519_ChaChaPoly. Both conformance units also say that obsolete
SecurityPolicies shall not be enabled or usable without administrative
intervention.
Security level
Each UA_SecurityPolicy has a securityLevel that gives an estimate of
the strength of the security policy in relation to other security policies. The
default server configuration populates the security level of the endpoint
descriptions from the security level of the underlying security policy. Clients
usually prefer endpoints with the highest security level.
A security level of 0 is for None and for all deprecated policies.
UA_ServerConfig_addAllSecureEndpoints creates no Endpoints for policies
with level 0. PubSub SecurityPolicies have no security level.
SecureChannel SecurityPolicies
The table lists the SecurityPolicies that open62541 implements. A check mark in
the Default column means that UA_ServerConfig_addAllSecurityPolicies,
UA_ServerConfig_setDefaultWithSecurityPolicies and
UA_ClientConfig_setDefaultEncryption add the policy if the certificate and
the private key match it. The *Secure* variants of these server functions
do not add None.
Policy |
Status |
Level |
OpenSSL |
LibreSSL |
mbedTLS |
Default |
Notes |
|---|---|---|---|---|---|---|---|
|
Current |
0 |
✓ |
✓ |
✓ |
✓ |
No signing, no encryption. Also available without
|
|
Current [A] |
10 |
✓ |
✓ |
✓ |
✓ |
Required by Security Policy Required. |
|
Current [B] |
20 |
✓ |
✓ |
✓ |
✓ |
Required by Security Policy Required. |
|
Current |
30 |
✓ |
✓ |
✓ |
✓ |
Strongest RSA policy. |
|
Current [ECC A] |
10 |
✓ |
✗ |
✗ |
✓ |
AES-128-GCM. Satisfies Security ECC Policy. |
|
Current |
10 |
✓ |
✗ |
✗ |
✓ |
ChaCha20-Poly1305. |
|
Deprecated |
0 |
✓ |
✓ |
✓ |
✗ |
Known attacks. The default functions add it only if the build
defines |
|
Deprecated |
0 |
✓ |
✓ |
✓ |
✗ |
Known attacks. The default functions add it only if the build
defines |
|
Deprecated |
0 |
✓ |
✗ |
✓ |
✗ |
AES-128-CBC with HMAC-SHA256. Replaced by |
|
Deprecated |
0 |
✓ |
✗ |
✓ |
✗ |
AES-256-CBC with HMAC-SHA384. Replaced by |
|
Deprecated |
0 |
✓ |
✗ |
✓ |
✗ |
AES-128-CBC with HMAC-SHA256. Replaced by
|
|
Deprecated |
0 |
✓ |
✗ |
✓ |
✗ |
AES-256-CBC with HMAC-SHA384. Replaced by
|
|
Deprecated |
0 |
✓ |
✗ |
✗ |
✗ |
ChaCha20-Poly1305. The Profile says that no application shall
support it. The current Curve25519 policies are
|
|
Deprecated |
0 |
✓ |
✗ |
✗ |
✗ |
ChaCha20-Poly1305. The Profile says that no application shall
support it. The current Curve448 policies are
|
To use a deprecated policy, add it explicitly with its
UA_ServerConfig_addSecurityPolicy*() function and create its Endpoints
with UA_ServerConfig_addEndpoint or UA_ServerConfig_addAllEndpoints.
The constructors of the deprecated policies log a warning.
Not implemented
open62541 does not implement these SecurityPolicies of the UACore 1.05
Profile group.
Policy |
Status |
Notes |
|---|---|---|
|
Current |
Replaces |
|
Current |
Replaces |
|
Current [ECC A] |
Replaces |
|
Current |
Replaces |
|
Current |
Replaces |
|
Current |
Replaces |
|
Current |
|
|
Current [ECC B] |
|
|
Current |
|
|
Current |
|
|
Current |
RSA certificates with Diffie-Hellman key agreement, AES-GCM. |
|
Current |
RSA certificates with Diffie-Hellman key agreement, ChaCha20-Poly1305. |
|
Deprecated |
|
|
Deprecated |
PubSub SecurityPolicies
Policy |
Status |
OpenSSL |
LibreSSL |
mbedTLS |
TPM2 |
Notes |
|---|---|---|---|---|---|---|
|
Current [A] |
✓ |
✓ |
✓ |
✓ |
Required for UADP message signing (PubSub Publisher UADP Security Signing). |
|
Current |
✓ |
✓ |
✓ |
✓ |
The TPM2 column needs UA_ENABLE_ENCRYPTION_TPM2=ON. The keys then stay
in the TPM and are used through PKCS#11.
Which of these you can actually enable depends on the crypto backend and the certificate you load. ECC-specifics – the
curve support matrix, certificate requirements, and the
UA_ServerConfig_addSecurityPolicy*Ecc*() helpers – are documented in
ECC Specifics.