We need identifier for the node. In OpenQKDNetwork, the node id is defined in kms.conf in ~/.qkd/kms.conf.
Assume the local node is A, The key files between local node A and remote node B are in the ~/.qkd/qnl/keys/B directory. On Node B, the key files between A and B are in the ~/.qkd/qnl/keys/A directory.
In the key send from cqotoolkit add two fileds, source and destination, you need to change the protocol buffer message definition. The site id is set in siteagent.json file as below,
Make sure the value is same as the setting in .qkd/kms.conf.
Each file has qllBlockSz keys, each line is a key. qllBlockSz configuration is set in ~/.qkd/qnl/config.yaml. The current value is 4096.
Each key file name has a number suffix in it, for example B_0, B_1. The number is equal to key sequence id/qllBlockSz. Assume qllBlockSz is 4096, then B_0 contains the keys from id 0 to 4095, B_1 contains keys from id 4096 to 8191, B_2 contains keys from 8192 to 12287.
Make the change in QLLFileReader to ignore the key sequence id when reading key.
Add a class QLLFileReaderWriter to read and write key. Because reading and writing are in different threads, please serialize the read/write operation with Java mutex.
If other thread wants to read the key and key is not available, find a way to notify the read thread when key is available with java condition variable.
We need identifier for the node. In OpenQKDNetwork, the node id is defined in kms.conf in ~/.qkd/kms.conf.
Assume the local node is A, The key files between local node A and remote node B are in the ~/.qkd/qnl/keys/B directory. On Node B, the key files between A and B are in the ~/.qkd/qnl/keys/A directory.
In the key send from cqotoolkit add two fileds, source and destination, you need to change the protocol buffer message definition. The site id is set in siteagent.json file as below,
{ "name": "A", "id": "9893e345-d3b0-4a98-a6d2-4663190e3db9", "bindAddress":"192.168.2.254", "connectionAddress":"192.168.2.254", "listenPort": 8000, "credentials": {} }
Make sure the value is same as the setting in .qkd/kms.conf.
Each file has qllBlockSz keys, each line is a key. qllBlockSz configuration is set in ~/.qkd/qnl/config.yaml. The current value is 4096.
Each key file name has a number suffix in it, for example B_0, B_1. The number is equal to key sequence id/qllBlockSz. Assume qllBlockSz is 4096, then B_0 contains the keys from id 0 to 4095, B_1 contains keys from id 4096 to 8191, B_2 contains keys from 8192 to 12287.
Make the change in QLLFileReader to ignore the key sequence id when reading key.
Add a class QLLFileReaderWriter to read and write key. Because reading and writing are in different threads, please serialize the read/write operation with Java mutex.
If other thread wants to read the key and key is not available, find a way to notify the read thread when key is available with java condition variable.