From 2d8f47392bd8896225a5fd8e2455b21da5c53ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Fri, 21 Feb 2025 09:51:33 +0100 Subject: [PATCH 1/4] chore: :see_no_evil: Add deps in .gitignore (qosst-pp) Add deps directory for IR_for_CVQKD and cryptomite --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9b34f60..aff8c77 100644 --- a/.gitignore +++ b/.gitignore @@ -193,4 +193,5 @@ cython_debug/ config.toml config*.toml -config/* \ No newline at end of file +config/* +deps/ \ No newline at end of file From 8bc77ca308e5e59dd5d593f7812737308e77b0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Fri, 21 Feb 2025 09:52:46 +0100 Subject: [PATCH 2/4] feat: :sparkles: Add qosst-bob-continuous command Add qosst-bob-continuous command, update some dependencies --- pyproject.toml | 6 +- qosst_bob/continuous.py | 136 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 qosst_bob/continuous.py diff --git a/pyproject.toml b/pyproject.toml index d7cafea..d85e8b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,11 +29,12 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<3.14" #qosst-core = "^0.10.0" -qosst-core = { git = "https://github.com/qosst/qosst-core", branch = "dev" } +qosst-core = { git = "https://github.com/qosst/qosst-core", branch = "post-processing" } #qosst-hal = "^0.10.0" qosst-hal = { git = "https://github.com/qosst/qosst-hal", branch = "dev" } #qosst-skr = "^0.10.0" -qosst-skr = { git = "https://github.com/qosst/qosst-skr", branch = "dev" } +qosst-skr = { git = "https://github.com/qosst/qosst-skr", branch = "post-processing" } +qosst-pp = { git = "https://github.com/qosst/qosst-pp", branch = "main" } matplotlib = [ { version = "^3.5.1", python = ">=3.9, <3.11" }, { version = "^3.7.1", python = ">=3.11, <3.14" }, @@ -78,3 +79,4 @@ qosst-bob-optimize = "qosst_bob.optimization.commands:main" qosst-bob-transmittance = "qosst_bob.transmittance:main" qosst-bob-tools = "qosst_bob.tools.commands:main" qosst-bob-offline-dsp = "qosst_bob.dsp.offline_dsp:main" +qosst-bob-continuous = "qosst_bob.continuous:main" diff --git a/qosst_bob/continuous.py b/qosst_bob/continuous.py new file mode 100644 index 0000000..eb5d4c9 --- /dev/null +++ b/qosst_bob/continuous.py @@ -0,0 +1,136 @@ +# qosst-bob - Bob module of the Quantum Open Software for Secure Transmissions. +# Copyright (C) 2021-2025 Yoann PiƩtri + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +""" +Script to continuously run. +""" + +import argparse +import logging +from pathlib import Path +import os + +from qosst_core.logging import create_loggers +from qosst_core.infos import get_script_infos +from qosst_core.participant import Participant + +from qosst_bob import __version__ +from qosst_bob.bob import Bob + +logger = logging.getLogger(__name__) + + +def _create_parser() -> argparse.ArgumentParser: + """ + Create the parser for qosst-bob-continuous. + + Returns: + argparse.ArgumentParser: parser for the qosst-bob-continuous. + """ + default_config_location = Path(os.getcwd()) / "config.toml" + parser = argparse.ArgumentParser(prog="qosst-bob-continuous") + + parser.add_argument("--version", action="version", version=__version__) + parser.add_argument( + "-v", + "--verbose", + action="count", + default=0, + help="Level of verbosity. If none, nothing is printed to the console. -v will print warnings and errors, -vv will add info and -vvv will print all debug logs.", + ) + parser.add_argument( + "-f", + "--file", + default=default_config_location, + help=f"Path of the configuration file. Default : {default_config_location}.", + ) + return parser + + +# pylint: disable=too-many-locals,disable=too-many-statements +def main(): + """ + Entry point of the excess noise script. + """ + print(get_script_infos()) + + parser = _create_parser() + args = parser.parse_args() + + create_loggers(args.verbose, args.file) + + bob = Bob(args.file) + + # Init hardware + bob.open_hardware() + + voa_channel = None + if ( + bob.config.channel.voa is not None + and bob.config.channel.voa.use + and bob.config.channel.voa.applier == Participant.BOB + ): + voa_channel = bob.config.channel.voa.device( + bob.config.channel.voa.location, **bob.config.channel.voa.extra_args + ) + voa_channel.open() + voa_channel.set_value(bob.config.channel.voa.value) + + # Load electronic noise + logger.info("Loading electronic noise") + bob.load_electronic_noise_data() + + # Connect to Alice + bob.connect() + + # Identification + bob.identification() + + try: + while True: + logger.info("Starting new frame") + # Initialization + bob.initialization() + + if not bob.config.bob.switch.switching_time: + logger.info("Manual shot noise acquisition") + bob.get_electronic_shot_noise_data() + + # Quantum Information Exchange + bob.quantum_information_exchange() + + # DSP + bob.dsp() + + # Parameter estimation + bob.parameters_estimation() + + # Error correction + bob.error_correction() + + # Privacy amplification + bob.privacy_amplification() + + # End frame, push key + bob.end_frame() + except KeyboardInterrupt: + print("Interruption received. Closing Bob.") + finally: + bob.close() + + +if __name__ == "__main__": + main() From 85c84a07859ca15b5788a09c0c523f6abab74730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Fri, 21 Feb 2025 09:54:33 +0100 Subject: [PATCH 3/4] feat: :sparkles: Add error correction, privacy amplification, end of frame Add error correction, privacy amplification and end of frame using qosstr-pp mainly. Reorganize some code. --- qosst_bob/bob.py | 137 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 110 insertions(+), 27 deletions(-) diff --git a/qosst_bob/bob.py b/qosst_bob/bob.py index 77af3db..12e5c8c 100644 --- a/qosst_bob/bob.py +++ b/qosst_bob/bob.py @@ -20,7 +20,7 @@ """ import logging import time -from typing import Any, Optional +from typing import Any, Optional, List import uuid import traceback from copy import deepcopy @@ -35,6 +35,8 @@ from qosst_core.control_protocol.sockets import QOSSTClient from qosst_core.notifications import QOSSTNotifier from qosst_core.participant import Participant +from qosst_core.utils import complex_to_real +from qosst_core.schema.detection import SINGLE_POLARISATION_RF_HETERODYNE from qosst_hal.switch import GenericSwitch from qosst_hal.laser import GenericLaser from qosst_hal.adc import GenericADC @@ -44,6 +46,9 @@ ) from qosst_hal.powermeter import GenericPowerMeter +from qosst_pp.reconciliation import reconcile_bob +from qosst_pp.privacy_amplification import privacy_amplification_bob + from qosst_bob.dsp import dsp_bob, special_dsp from qosst_bob.dsp.dsp import find_global_angle from qosst_bob.data import ElectronicNoise, ElectronicShotNoise @@ -93,7 +98,16 @@ class Bob: excess_noise_bob: float #: Excess noise estimated at Bob. vel: float #: Normalised electronic noise. skr: float #: Secret key rate. + secret_key_ratio: float #: Secret key ration in bits/symbol. photon_number: float #: Mean photon number at Alice's side. + signal_to_noise_ratio: float #: Signal to noise ratio of the quantum symbols. + + raw_key_material: Optional[ + np.ndarray + ] #: Raw key material before error reconciliation, after parameter estimation. + + reconciled_key: Optional[List[int]] #: Key after the reconciliation step. + final_key: Optional[List[int]] #: Final key after privacy amplification step. adc: Optional[GenericADC] #: ADC device for Bob. switch: Optional[GenericSwitch] #: Switch device for Bob. @@ -123,9 +137,27 @@ def __init__(self, config_path: str, enable_laser: bool = True): self.is_connected = False self.config = None + self.enable_laser = enable_laser + + self.laser = None + self.switch = None + self.adc = None + self.polarisation_controller = None + self.powermeter = None + + logger.info("Initializing Bob...") + self.electronic_noise = None self.electronic_shot_noise = None + self._reset() + + self.load_configuration() + self._init_socket() + self._init_notifier() + + def _reset(self): + self.electronic_symbols = None self.electronic_shot_symbols = None @@ -138,6 +170,10 @@ def __init__(self, config_path: str, enable_laser: bool = True): self.excess_noise_bob = 0 self.vel = 0 self.skr = 0 + self.secret_key_ratio = 0 + + self.reconciled_key = None + self.final_key = None self.adc_data = None self.signal_data = None @@ -148,20 +184,8 @@ def __init__(self, config_path: str, enable_laser: bool = True): self.quantum_data_phase_noisy = None self.quantum_symbols = None - self.enable_laser = enable_laser - - self.laser = None - self.switch = None - self.adc = None - - logger.info("Initializing Bob...") - self.frame_uuid = None - self.load_configuration() - self._init_socket() - self._init_notifier() - def load_configuration(self) -> None: """ Load or reload the configuration. @@ -555,9 +579,8 @@ def parameters_estimation(self) -> bool: logger.info("Computing secret key rate") try: - self.skr = ( - self.config.frame.quantum.symbol_rate - * self.config.bob.parameters_estimation.skr_calculator.skr( + self.secret_key_ratio = ( + self.config.bob.parameters_estimation.skr_calculator.skr( Va=2 * self.photon_number, T=self.transmittance / self.config.bob.eta, xi=self.excess_noise_bob / self.transmittance, @@ -565,7 +588,8 @@ def parameters_estimation(self) -> bool: Vel=self.vel, beta=0.95, ) - ) + ) # Not final as computed with beta=0.95 + self.skr = self.config.frame.quantum.symbol_rate * self.secret_key_ratio except ValueError: self.skr = -1 @@ -584,7 +608,24 @@ def parameters_estimation(self) -> bool: }, ) + if self.config.bob.schema == SINGLE_POLARISATION_RF_HETERODYNE: + self.signal_to_noise_ratio = ( + self.transmittance + * 2 + * self.photon_number + / (2 + 2 * self.vel + self.excess_noise_bob) + ) + if code == QOSSTCodes.PE_APPROVED: + logger.info( + "Removing symbols used for parameters estimation from raw key material" + ) + mask = np.ones( + len(self.quantum_symbols), dtype=bool + ) # Create an array of True, same length of quantum symbols + mask[self.indices] = False # Set False where to remove + self.raw_key_material = np.copy(self.quantum_symbols[mask]) + logger.info("%i raw key symbols", len(self.raw_key_material)) return True return False @@ -592,25 +633,67 @@ def error_correction(self) -> bool: """ Apply error correction on the data. - Raises: - NotImplementedError: This function is not yet implemented. - Returns: bool: True if the operation was successful, False otherwise. """ - raise NotImplementedError("Error correction has not yet been implemented.") + # Perform reconciliation + # Data should be normalised + shot_variance = np.var(self.electronic_shot_symbols) - np.var( + self.electronic_symbols + ) + + # Also the SNR needs to be given in dB + snr_db = 10 * np.log10(self.signal_to_noise_ratio) + self.reconciled_key = reconcile_bob( + self.socket, + complex_to_real(self.raw_key_material / np.sqrt(shot_variance)), + self.config.post_processing.reconciliation.beta, + snr_db, + self.config.post_processing.reconciliation.dimension, + ) + return self.reconciled_key is not None def privacy_amplification(self) -> bool: """ Apply privacy amplification on the data. - Raises: - NotImplementedError: This function is not yet implemented. - Returns: bool: True if the operation was successful, False otherwise. """ - raise NotImplementedError("Privacy amplification has not yet been implemented.") + if len(self.reconciled_key): + self.final_key = privacy_amplification_bob( + self.socket, + self.reconciled_key, + self.secret_key_ratio, + self.config.post_processing.privacy_amplification.extractor, + ) + return self.final_key is not None + logger.error( + "Reconciled key has length 0. Cannot perform privacy amplification." + ) + return False + + def end_frame(self) -> bool: + """ + Push key to KMS, send end of frame to Alice, and reset attributes. + """ + ret_code = True + if self.final_key: + if self.config.pushkey: + logger.info("Pushing key to KMS") + self.config.pushkey.interface( + self.frame_uuid, self.final_key, **self.config.pushkey.kwargs + ) + else: + logger.warning("No interface defined for KMS. Discarding key.") + code, _ = self.socket.request(QOSSTCodes.FRAME_ENDED) + if code != QOSSTCodes.FRAME_ENDED_ACK: + logger.error("Alice responded FRAME_ENDED with %s", str(code)) + ret_code = False + + logger.info("Resetting values") + self._reset() + return ret_code def _start_acquisition(self): """ @@ -705,8 +788,8 @@ def _do_dsp(self): logger.info("Applying DSP on elec and elec+shot noise data") - params.elec_noise_ratio = config.bob.dsp.elec_noise_ratio - params.elec_shot_noise_ratio = config.bob.dsp.elec_shot_noise_ratio + params.elec_noise_ratio = self.config.bob.dsp.elec_noise_ratio + params.elec_shot_noise_ratio = self.config.bob.dsp.elec_shot_noise_ratio self.electronic_symbols, self.electronic_shot_symbols = special_dsp( self.electronic_noise.data, self.electronic_shot_noise.data, params ) From 36c53592658308335e73de5339f227f9230dd919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Fri, 21 Feb 2025 09:55:36 +0100 Subject: [PATCH 4/4] feat(gui): :sparkles: Rearrange GUI GUI layout is arranged, added lengths tab for key material length information, added end of frame button --- qosst_bob/gui/bobgui.py | 102 ++++++++++++++++++++++++++++++-- qosst_bob/gui/figures.py | 12 ++++ qosst_bob/gui/layout.py | 42 +++++++++---- qosst_bob/gui/layout_content.py | 10 +++- 4 files changed, 148 insertions(+), 18 deletions(-) diff --git a/qosst_bob/gui/bobgui.py b/qosst_bob/gui/bobgui.py index a9b3e26..aa4358b 100644 --- a/qosst_bob/gui/bobgui.py +++ b/qosst_bob/gui/bobgui.py @@ -426,7 +426,7 @@ def main(): QOSSTGUIActions.DSP, QOSSTGUIActions.PARAMETERS_ESTIMATION, QOSSTGUIActions.ERROR_CORRECTION, - QOSSTGUIActions.PRIVACY_AMPLITICATION, + QOSSTGUIActions.PRIVACY_AMPLIFICATION, ], disabled=False, ) @@ -483,7 +483,7 @@ def main(): QOSSTGUIActions.DSP, QOSSTGUIActions.PARAMETERS_ESTIMATION, QOSSTGUIActions.ERROR_CORRECTION, - QOSSTGUIActions.PRIVACY_AMPLITICATION, + QOSSTGUIActions.PRIVACY_AMPLIFICATION, ], disabled=False, ) @@ -514,6 +514,11 @@ def main(): res = bob.dsp() if res: window[QOSSTGUIText.DSP_STATUS].update("DSP status: Done") + if bob.quantum_symbols is not None: + length = len(bob.quantum_symbols) + else: + length = 0 + window[QOSSTGUIText.LENGTH_SYMBOLS].update(length) else: window[QOSSTGUIText.DSP_STATUS].update("DSP status: failed") autoplot(bob, values) @@ -548,6 +553,11 @@ def main(): window[QOSSTGUIText.PE_DISTANCE].update( -10 * np.log10(bob.transmittance / bob.config.bob.eta) / 0.2 ) + if bob.raw_key_material is not None: + length = len(bob.raw_key_material) + else: + length = 0 + window[QOSSTGUIText.LENGTH_RAW_KEY].update(length) else: window[QOSSTGUIText.PARAMETERS_ESTIMATION_STATUS].update( "PE status: Failed" @@ -556,14 +566,91 @@ def main(): sg.popup_ok("Please read configuration first.") elif event == QOSSTGUIActions.ERROR_CORRECTION: if bob: - sg.popup_error("Error correction is not yet implemented.") + res = bob.error_correction() + if res: + window[QOSSTGUIText.ERROR_CORRECTION_STATUS].update( + "EC status: Done" + ) + if bob.reconciled_key is not None: + length = len(bob.reconciled_key) + else: + length = 0 + window[QOSSTGUIText.LENGTH_RECONCILED_KEY].update(length) + else: + window[QOSSTGUIText.ERROR_CORRECTION_STATUS].update( + "EC status: failed" + ) else: sg.popup_ok("Please read configuration first.") - elif event == QOSSTGUIActions.PRIVACY_AMPLITICATION: + elif event == QOSSTGUIActions.PRIVACY_AMPLIFICATION: if bob: - sg.popup_error("Privacy amplification is not yet implemented.") + res = bob.privacy_amplification() + if res: + window[QOSSTGUIText.PRIVACY_AMPLIFICATION_STATUS].update( + "PA status: Done" + ) + if bob.final_key is not None: + length = len(bob.final_key) + else: + length = 0 + window[QOSSTGUIText.LENGTH_FINAL_KEY].update(length) + else: + window[QOSSTGUIText.PRIVACY_AMPLIFICATION_STATUS].update( + "PA status: failed" + ) else: sg.popup_ok("Please read configuration first.") + elif event == QOSSTGUIActions.END_FRAME: + if bob: + res = bob.end_frame() + if res: + # Disable most actions + change_enable_status( + window, + [ + QOSSTGUIActions.QIE, + QOSSTGUIActions.DSP, + QOSSTGUIActions.PARAMETERS_ESTIMATION, + QOSSTGUIActions.ERROR_CORRECTION, + QOSSTGUIActions.PRIVACY_AMPLIFICATION, + ], + disabled=True, + ) + + # Reset texts + window[QOSSTGUIText.FRAME_UUID].update("Frame UUID :") + window[QOSSTGUIText.QIE_STATUS].update("QIE status: Not done") + window[QOSSTGUIText.DSP_STATUS].update("DSP status: Not done") + window[QOSSTGUIText.PARAMETERS_ESTIMATION_STATUS].update( + "PE status: Not done" + ) + window[QOSSTGUIText.ERROR_CORRECTION_STATUS].update( + "EC status: Not done" + ) + window[QOSSTGUIText.PRIVACY_AMPLIFICATION_STATUS].update( + "PA status: Not done" + ) + + # Remove parameter estimation values + window[QOSSTGUIText.PE_ETA].update("") + window[QOSSTGUIText.PE_SHOT].update("") + window[QOSSTGUIText.PE_VEL].update("") + window[QOSSTGUIText.PE_ETA_T].update("") + window[QOSSTGUIText.PE_T].update("") + window[QOSSTGUIText.PE_EXCESS_NOISE_BOB].update("") + window[QOSSTGUIText.PE_EXCESS_NOISE_ALICE].update("") + window[QOSSTGUIText.PE_SKR].update("") + window[QOSSTGUIText.PE_PHOTON_NUMBER].update("") + window[QOSSTGUIText.PE_DISTANCE].update("") + window[QOSSTGUIText.LENGTH_SYMBOLS].update("") + window[QOSSTGUIText.LENGTH_RAW_KEY].update("") + window[QOSSTGUIText.LENGTH_RECONCILED_KEY].update("") + window[QOSSTGUIText.LENGTH_FINAL_KEY].update("") + + # Reset figures + for figure in all_figures: + figure.reset_figure() + elif event == QOSSTGUIActions.ACQUISITION_ELEC_NOISE: if bob: bob.get_electronic_noise_data() @@ -673,6 +760,11 @@ def main(): key_ord = int(event.split(":")[1]) except ValueError: continue + if key_ord in [ + 56, + 38, + ]: # I don't really know why they happens but I need to get rid of them + continue if key_ord == SEQUENCE[sequence_pointer]: sequence_pointer += 1 else: diff --git a/qosst_bob/gui/figures.py b/qosst_bob/gui/figures.py index 8428cf4..a4cc2f4 100644 --- a/qosst_bob/gui/figures.py +++ b/qosst_bob/gui/figures.py @@ -284,6 +284,18 @@ def init_figure(self, window: sg.Window): self.func(None, self.axes) self.canvas = draw_figure(window[self.key].TKCanvas, self.figure) + def reset_figure(self): + """ + Initialize the figure, the axes and make a dummy plot. + + Args: + window (sg.Window): GUI window. + """ + self.figure.clear() + self.axes = self.figure.add_subplot() + self.func(None, self.axes) + self.canvas.draw() + def plot(self, bob: Bob): """ Actualise the plot diff --git a/qosst_bob/gui/layout.py b/qosst_bob/gui/layout.py index fcc4e0e..74c1669 100644 --- a/qosst_bob/gui/layout.py +++ b/qosst_bob/gui/layout.py @@ -60,7 +60,6 @@ "Status: Not connected", size=(40, 1), key=QOSSTGUIText.CONNECTION_STATUS ) ], - [sg.Text("Address for Alice : ", key=QOSSTGUIText.ALICE_ADDRESS)], [sg.Button("Connect", key=QOSSTGUIActions.CONNECT, disabled=True)], [sg.HorizontalSeparator()], [sg.Text("Identification")], @@ -106,14 +105,13 @@ [ sg.Button( "Privacy Amplification", - key=QOSSTGUIActions.PRIVACY_AMPLITICATION, + key=QOSSTGUIActions.PRIVACY_AMPLIFICATION, disabled=True, ) ], [sg.HorizontalSeparator()], [ - sg.Button("Exit", key=QOSSTGUIActions.EXIT), - sg.Button("About", key=QOSSTGUIActions.ABOUT), + sg.Button("End frame", key=QOSSTGUIActions.END_FRAME), ], ] @@ -252,6 +250,22 @@ ) ) +parameter_estimation_tab = [ + [ + sg.Column(parameters_estimation_column_1), + sg.Push(), + sg.VerticalSeparator(), + sg.Column(parameters_estimation_column_2), + ], +] + +key_length_tab = [ + [sg.Text("Recovered symbols"), sg.Text("", key=QOSSTGUIText.LENGTH_SYMBOLS)], + [sg.Text("Raw key"), sg.Text("", key=QOSSTGUIText.LENGTH_RAW_KEY)], + [sg.Text("Reconciled key"), sg.Text("", key=QOSSTGUIText.LENGTH_RECONCILED_KEY)], + [sg.Text("Final key"), sg.Text("", key=QOSSTGUIText.LENGTH_FINAL_KEY)], +] + second_column = [ [ sg.TabGroup( @@ -282,12 +296,15 @@ ) ], [sg.HorizontalSeparator()], - [sg.Text("Parameters estimation")], [ - sg.Column(parameters_estimation_column_1), - sg.Push(), - sg.VerticalSeparator(), - sg.Column(parameters_estimation_column_2), + sg.TabGroup( + [ + [ + sg.Tab("Parameter estimation", parameter_estimation_tab), + sg.Tab("Lengths", key_length_tab), + ] + ] + ) ], ] @@ -389,6 +406,7 @@ ] third_column = [ + [sg.Push(), sg.Text(f"qosst-bob version {__version__}")], [sg.Push(), sg.Image(source=str(LOGO_LOCATION), subsample=6), sg.Push()], [sg.Text("Logs")], [ @@ -417,6 +435,11 @@ ] ) ], + [ + sg.Push(), + sg.Button("Exit", key=QOSSTGUIActions.EXIT), + sg.Button("About", key=QOSSTGUIActions.ABOUT), + ], ] layout_tab_controls = [ @@ -433,5 +456,4 @@ [ layout_tab_controls, ], - [sg.Push(), sg.Text(f"qosst-bob version {__version__}")], ] diff --git a/qosst_bob/gui/layout_content.py b/qosst_bob/gui/layout_content.py index f980857..aa8ff13 100644 --- a/qosst_bob/gui/layout_content.py +++ b/qosst_bob/gui/layout_content.py @@ -28,7 +28,7 @@ THEME = "DarkGrey14" #: The used theme. -SEQUENCE = [38, 38, 40, 40, 37, 39, 37, 39, 98, 97] +SEQUENCE = [111, 111, 116, 116, 113, 114, 113, 114, 98, 97] LICENSE_TEXT = """ qosst-bob - Bob module of the Quantum Open Software for Secure Transmissions. @@ -71,7 +71,8 @@ class QOSSTGUIActions(QOSSTGUIContent): DSP = "-DSP-" PARAMETERS_ESTIMATION = "-PARAMETERS-ESTIMATION-" ERROR_CORRECTION = "-ERROR-CORRECTION-" - PRIVACY_AMPLITICATION = "-PRIVACY-AMPLIFICATION-" + PRIVACY_AMPLIFICATION = "-PRIVACY-AMPLIFICATION-" + END_FRAME = "-END-FRAME-" ACQUISITION_ELEC_NOISE = "-ACQUISITION-ELEC-NOISE-" LOAD_ELEC_NOISE = "-LOAD-ELEC-NOISE-" SAVE_ELEC_NOISE = "-SAVE-ELEC-NOISE-" @@ -98,7 +99,6 @@ class QOSSTGUIText(QOSSTGUIContent): PRIVACY_AMPLIFICATION_STATUS = "-PRIVACY-AMPLITICATION-STATUS-" ELEC_DATA_STATUS = "-ELEC-DATA-STATUS-" SHOT_DATA_STATUS = "-SHOT-DATA-STATUS-" - ALICE_ADDRESS = "-ALICE-ADDRESS-" FRAME_UUID = "-FRAME-UUID-" CONFIGURATION_QI_NUM_SYMBOLS = "-CONFIGURATION-QI-NUM-SYMBOLS-" CONFIGURATION_QI_SHIFT = "-CONFIGURATION-QI-SHIFT-" @@ -129,6 +129,10 @@ class QOSSTGUIText(QOSSTGUIContent): LAST_EXPORT = "-LAST-EXPORT-" LOGGER = "-LOGGER-" EXPORT_DIRECTORY = "-EXPORT-DIRECTORY" + LENGTH_SYMBOLS = "-LENGTH-SYMBOLS-" + LENGTH_RAW_KEY = "-LENGTH-RAW-KEY-" + LENGTH_RECONCILED_KEY = "-LENGTH-RECONCILED-KEY-" + LENGTH_FINAL_KEY = "-LENGTH-FINAL-KEY-" class QOSSTGUIInput(QOSSTGUIContent):