From 387fc0d3ca91aba945faf323ffa06c126bd557d9 Mon Sep 17 00:00:00 2001 From: cs Date: Fri, 15 Nov 2024 00:46:09 +0400 Subject: [PATCH] Feature/Add: add input generator tools as a common api for other methods --- claasp/cipher_modules/input_generator.py | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 claasp/cipher_modules/input_generator.py diff --git a/claasp/cipher_modules/input_generator.py b/claasp/cipher_modules/input_generator.py new file mode 100644 index 00000000..6fa44bd5 --- /dev/null +++ b/claasp/cipher_modules/input_generator.py @@ -0,0 +1,52 @@ +# **************************************************************************** +# Copyright 2023 Technology Innovation Institute +# +# 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 . +# **************************************************************************** + + +import numpy as np +from types import ModuleType +from subprocess import Popen, PIPE + +from claasp.cipher_modules import code_generator +from claasp.cipher_modules.generic_functions_vectorized_byte import cipher_inputs_to_evaluate_vectorized_inputs, \ + evaluate_vectorized_outputs_to_integers + +def generate_zeros(amount_of_samples): + return + +def generate_ones(amount_of_samples): + return + +def generate_binary(amount_of_samples): + return + +def generate_byte(amount_of_samples): + return + +def generate_int_with_range(size_of_bit, range, amount_of_samples): + return + +def generate_avalanche(input): + return + + +class InputGenerator: + + def __init__(self, cipher): + self.cipher = cipher + + def generate_input(self, type_list, number_of_samples): + return \ No newline at end of file