Skip to content

Add support for key sources using ETSI 014 #36

Open
haroldbruintjes wants to merge 15 commits into
Open-QKD-Network:issue-33from
haroldbruintjes:etsi014-backend
Open

Add support for key sources using ETSI 014 #36
haroldbruintjes wants to merge 15 commits into
Open-QKD-Network:issue-33from
haroldbruintjes:etsi014-backend

Conversation

@haroldbruintjes
Copy link
Copy Markdown

This PR adds basic support for devices implementing the ETSI 014 REST interface as key source in the QNL key router service. In summary:

  • Use OpenAPI spec to generate client API classes, use those to retrieve keys when ETSI has been configured;
  • Modify key routing protocol to send key identifiers as plain strings (the existing backend encodes block index and offset as strings);
  • Rework OTP key handling to fetch keys on demand. For each transmitted key, a new OTP key is used (which is more in line with how OTP keys should be used);
  • Start CQP gRPC client/server only if not using the ETSI backend ('legacy' mode).

A bug was also fixed in the LRSP handling that prevent it from dealing with cycles properly.

The ETSI client simply requests entire key blocks at once. It is possible that a simulator/device does not support keys of that size, in which case the key block size should be reduced in the configuration (possibly to just a single 32 byte key).

Import was unused and from a more modern version of Java than configured.
- Replace the block index in QNL requests and responses with an arbitrary string.
- At the QLL level, encode the block index, offset and length as a string
  (simply by concatenating the values).
- Rework the QLLReader interface to make use of key identifier strings. Keys are
  provided in binary form directly (though the file-based backend encodes the as
  hex still).
- Remove the write function from the QLLReader interface, it the coming architecture
  that is an implementation detail.
Keys are read and written directly as binary data, the backend still stores them hex-encoded.
Each time an OTP key is requested, pull one from the underlying QLL reader and
attach its ID to the request message. On receipt, use the same ID to fetch it
from the other side and decode the message payload.
Removes the KeyListener interface from OTPKey as keys are now retrieved on
demand.
Extend the route configuration parser to support specifying connection
details for a KME that will provide keys via the ETSI API. Notably the
address is now a nested property, next to the (optional) KME details.
Implementation of QLLReader that works via the ETSI API/specification.
It simply requests a new key of fixed size, or uses the ID passed via
the key router to retrieve it on the other end.
Add switch to choose between legacy and ETSI QLL interface
If legacy is specified, enable the site agent and trigger a start hop, and
use the CQP infrastructure. Otherwise, use the ETSI KME configuration.
If legacy mode is not enabled, do not parse the QKD configuration files
(site agent configuration and link configuration), making those files
optional.
LSRP traffic is fairly noisy, so reduce the log level.
If a message was seen before, ignore it completely. This fixes packets
propagating indefinitely in case of certain cycles.
Multiple routes can be configured, and if one fails the others might
still be valid. Allow loading to fail (but log the error) so the
application may continue.
Some ETSI servers have a broken TLS session resumption, so bypass that
by invalidating all sessions after each operations. Use a
networkInterceptor to achieve this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant