|
Note
|
This draft extension is not yet implemented in any device or reader. Algorithm choice, 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 fills in both <device> and <generator
type="GEN_DEVICE">, using the same identifier for <generator>’s `id as
<device>’s `serial. A software generator fills in 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 |
eu.lim.pocketlim |
| 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 to the .bor
file immediately after the zip End Of Central Directory (EOCD) record. A
reader unaware of this extension parses the file as an ordinary zip
archive; the EOCD it finds is the original archive’s EOCD, and the
trailing bytes making up the block below are simply ignored by standard
zip libraries.
The signature value is computed over every byte of the .bor file, from
offset 0 up to (excluding) the first byte of this block - i.e. the
complete, valid zip archive exactly as it would read without the block
appended.
<?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 shape 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) - default target |
|
RSASSA-PKCS1-v1_5 signature, SHA-256 digest - fallback for embedded crypto libraries without PSS support |
Out of scope
This draft only specifies how a .bor file is signed and how a signature
can be cryptographically checked against the public key it carries.
Whether a given public key belongs to a legitimate, homologated generator
- the trust/registry mechanism, and any key revocation policy - is an
internal LIM concern and deliberately not documented here.
GEN_DEVICE, should match device/serial; for GEN_APPLICATION, a free-form identifier, reverse-DNS style recommended (e.g. eu.lim.pocketlim) - not centrally allocated