|
Note
|
This draft extension is not yet implemented in any device or reader. The choice of algorithm, key management and generator id conventions may still change. |
|
Note
|
|
Generator identity
<generator> is added under the root <description> element, alongside
<device>. A physical device includes both <device> and <generator
type="GEN_DEVICE">. The generator’s id matches the device’s serial. A
software generator includes only <generator type="GEN_APPLICATION">.
| Property | Description | Type | Required | Example |
|---|---|---|---|---|
|
Kind of generator, specified as an XML attribute (see below) |
code (see below) |
required |
GEN_APPLICATION |
|
Self-chosen identifier of the generator [1] |
text |
required |
50000 / eu.lim.example-app |
| Generator type | Description |
|---|---|
|
Physical measurement device (also described by |
|
Software application |
<device>
<serial>50000</serial>
<version>1.0</version>
<build>20190104</build>
</device>
<generator type="GEN_DEVICE" id="50000"/>
<generator type="GEN_APPLICATION" id="eu.lim.example-app"/>
Signature block
The signature is not a ZIP entry: it is a block appended after the ZIP End of Central Directory (EOCD) record. A reader unaware of this extension parses the file as an ordinary ZIP archive, finds the original EOCD, and simply ignores the trailing bytes - this is standard ZIP library behavior.
The signature is computed over all bytes preceding the signature block, starting at offset 0. This covers the complete ZIP archive.
<?xml version="1.0" encoding="UTF-8"?>
<signature xmlns="http://www.lim.eu/bor-signature">
<algorithm>SIGALG_RSA_PSS_SHA256</algorithm>
<generator type="GEN_APPLICATION" id="eu.lim.example-app"/>
<public_key encoding="pem">-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----</public_key>
<value encoding="base64">...</value>
</signature>
| Property | Description | Type | Required |
|---|---|---|---|
|
Signature algorithm (see below) |
code (see below) |
required |
|
Generator that produced the file, same structure as |
structure |
required |
|
Signer’s public key, PEM-encoded |
text |
required |
|
Signature value, base64-encoded |
text |
required |
| Algorithm | Description |
|---|---|
|
RSA-PSS signature, SHA-256 digest (RFC 8017) - proposed default |
|
RSASSA-PKCS1-v1_5 signature, SHA-256 digest - fallback for embedded crypto libraries without PSS support |
Out of scope
This draft specifies how to sign a .bor file and verify its signature using the embedded public key. Generator approval, key ownership and key revocation are managed internally by LIM and are outside the scope of this specification.
GEN_DEVICE, id matches device/serial; for GEN_APPLICATION, id is a free-form identifier chosen by the generator, reverse-DNS style recommended - not centrally allocated by LIM