View Issue Details

IDProjectCategoryView StatusLast Update
001055110000-007: ProfilesSpecpublic2025-10-07 15:47
ReporterJim Luth Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version1.05.04 
Summary0010551: Clarification on ECC key derivations lengths regarding salts, bit vs. bytes
Description

The 1.05.04 Part 6 section 6.8.1 (https://reference.opcfoundation.org/Core/Part6/v105/docs/6.8) defines ECC handshake for calculating the symmetric keys. It has the following things (skipping rest):
ServerSalt = L | UTF8(opcua-server) | ServerNonce | ClientNonce
ClientSalt = L | UTF8(opcua-client) | ClientNonce | ServerNonce
and says "L is the length of derived key material needed encoded as a 16-bit little endian integer;"

I cannot find does L length mean in bits or in bytes.

For example for ECC-brainpoolP256r1 on https://profiles.opcfoundation.org/profile/2066 the following is listed:
-> DerivedSignatureKeyLength = 256
-> EncryptionKeyLength=128
-> InitializationVectorLength=128

Those also miss are they bits or bytes. I think they can be inferred to be in bits, (since e.g. AES128-CBC later on the page says key size is 128 bits). However, I would assume most programming languages to use bytes. Also, for RSA case the page mentioning deriving keys for it in https://reference.opcfoundation.org/Core/Part6/v105/docs/6.7.5 does tell in bytes, plus it uses different terms from the Profiles (" SigningKeyLength (from the DerivedSignatureKeyLength); ").

In RSA to my knowledge it doesn't really matter, since everyone still has the same amount of data regardless do they think in bits or bytes, since the "number itself" isn't part of the data. But with ECC it does matter, because the salt would be different if '256' is encoded vs. '32'. Also the ECC tables look a lot similar to the RSA tables, but the ECC tables directly use the terms from the Profiles, thus the ambiguity. Most programming languages use bytes, but Profiles page uses bits (in this case, some other unitless values are in bytes e.g. nonce lengths), which one it is here?

Thus, each place in the spec and Profiles page that lists key sizes should always have bits or bytes as the units, just in case.

P.S.
Noted that RSA Profiles do include units https://profiles.opcfoundation.org/profile/2059. Seems CurveXXX ones do for ECC, but other ECC do not. Note that even when units added to the "other ECC" is done, it still must be clarified does 'L' mean in bits or in bytes.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0010546 assignedRandy Armstrong 10000-006: Mappings Clarification on ECC key derivations lengths regarding salts, bit vs. bytes 

Activities

Jim Luth

2025-10-07 15:46

administrator   ~0023450

L is bytes. Spec needs to be updated.

Issue History

Date Modified Username Field Change
2025-10-07 15:46 Jim Luth New Issue
2025-10-07 15:46 Jim Luth Status new => assigned
2025-10-07 15:46 Jim Luth Assigned To => Randy Armstrong
2025-10-07 15:46 Jim Luth Issue generated from: 0010546
2025-10-07 15:46 Jim Luth Note Added: 0023450
2025-10-07 15:46 Jim Luth Relationship added related to 0010546
2025-10-07 15:47 Jim Luth Project 10000-006: Mappings => 10000-007: Profiles