Feature #1166

Provide a framwork for algorithm depended messages

Added by Oliver Maurhart almost 2 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Ideally an algorithm protocol like CASCADE is rather fixed. Alice sends some data, Bob computes and sends some other data back. Finally they converge to a common state and the protocol is done. But there might be errors and other messages to be exchanged by the parties. Most important, some party may - for any reason like errors - drop the current computation and abort the protocol.

Currently there is no support by the framework (the QKD R10 lib) for this. Each module does its own unique particular way in dealing with this.

Job: design and introduce a way to support modules.

  • normal data traffic passing back and forth by the parties
  • plus control traffic, especially the sudden aborting of the protocol and eventually dropping of the current key by a party

Idea: as every module sends qkd::module::message, we can create special kinds of messages for this. Like:

bool process(...) {

    // oh no: we can't go on with this key
    if (x > 1024) {
        qkd::module::abort_message m("x is too large --> dropping key");
        return false;

Inside the new class we can introduce some data particle as a class discriminator when reading the message on the remote side.

Further, each module may derive it's own set of messages and add a "module" field to the message, which may be checked on reading. Or we use a module's id() field for this purpose.

This clearly restricts than communication between the same modules. E.g. a "cascade" module may not speak with a "privacy-amplification" module on the remote side. But this seems ok to me.

Also available in: Atom PDF