Browse Source

minor style updates

tristangurtler 3 years ago
parent
commit
e37e03a6e1
4 changed files with 4 additions and 254 deletions
  1. 4 4
      dclxvi-20130329/Makefile
  2. 0 27
      gengetopt/option.c
  3. 0 36
      gengetopt/option.ggo
  4. 0 187
      gengetopt/option.h

+ 4 - 4
dclxvi-20130329/Makefile

@@ -12,10 +12,10 @@ LDFLAGS = -lm
 
 all: $(BIN_PATH) $(OBJ_PATH) as check c
 
-$(OBJ_PATH):
+$(BIN_PATH):
 	mkdir -p $@
 
-$(BIN_PATH):
+$(OBJ_PATH):
 	mkdir -p $@
 
 C_BIN += $(BIN_PATH)/bilintest-c
@@ -143,5 +143,5 @@ $(OBJ_PATH)/%_as.o: $(SRC_PATH)/%.s
 .PHONY: clean
 
 clean:
-	-rm bin/*
-	-rm obj/*
+	-rm $(BIN_PATH)/*
+	-rm $(OBJ_PATH)/*

File diff suppressed because it is too large
+ 0 - 27
gengetopt/option.c


+ 0 - 36
gengetopt/option.ggo

@@ -1,36 +0,0 @@
-# gengetopt < ../gengetopt/option.ggo  --output-dir=../gengetopt --file-name=option --unamed-opts
-
-package "BGNFCF" 
-
-version "(version 2)"
-
-purpose 
-
-"
-
-Ce programme a pour objectif de démontrer la faisabilité d'un traitement cohérent sur des données chiffrées, avec la cryptographie homomorphe. Il s'agit d'une preuve de concept. Les données traitées sont des sous-titres chiffrés avec le schéma homomorphe BGNFCF. Il s'agit d'une variante du schéma de Boneh Goh Nissim (2006) ayant subi la conversion de Freeman (2010) ainsi que la transformation de Catalano et Fiore (2015). Le traitement opéré sur les sous-titres est le changement de casse des caractères. Il s'opère en évaluant un circuit arithmétique de profondeur multiplicative 2.
-
-Description des circuits :
-
-minmaj : passage minuscule majuscule, sans erreur, avec précalcul et postcalcul
-demo : minmaj sur un caractère avec affichage des chiffrés et de l'évalué
-minmaj2 : passage minuscule majuscule, avec erreur
-minmaj3 : passage minuscule majuscule, avec erreur et postcalcul
-size : donne la taille en octets des chiffrés de différents niveaux
-time : donne le temps en millisecondes du précalcul, calcul et postcalcul
-time2 : donne le temps en millisecondes du chiffrement, de l'évaluation et du déchiffrement
-addition et multiplication : teste les différentes opérations possibles et donne le temps pour chacune
-chiffrement : chiffre et déchiffre en mode curve et twist sans évaluation homomorphique
-ip : mise à jour des ips et du compteur selon la valeur du compteur 
-scalar_product : calcul du produit scalaire de vecteur de bits
-
-La version 2 effectue du calcul parallèle avec OpenMP. Le temps de calcul est diminué si l'on dispose de processeurs multi-coeurs.
-
-
-"
-     
-#option "subtitle_source" s "Les sous-titres peuvent être choisis par le développeur ou l'utilisateur" values="dev", "usr" enum default="dev" optional
-
-option "subtitle" s "Pour indiquer les sous-titres en ligne de commande" string typestr="SUBTITLE" optional
-
-option "circuit" c "Pour indiquer le circuit de calcul. minmaj=avec précalcul et postcalcul, minmaj2=avec erreur, minmaj3=avec erreur et postcalcul." values="minmaj", "chiffrement", "additionL1", "additionL2", "additionL3", "additionL4", "multiplicationL1", "multiplicationL1L2", "multiplicationL2", "size", "time", "minmaj2", "minmaj3", "demo", "ip", "scalar_product", "time2" enum default="minmaj" optional

+ 0 - 187
gengetopt/option.h

@@ -1,187 +0,0 @@
-/** @file option.h
- *  @brief The header file for the command line option parser
- *  generated by GNU Gengetopt version 2.22.6
- *  http://www.gnu.org/software/gengetopt.
- *  DO NOT modify this file, since it can be overwritten
- *  @author GNU Gengetopt by Lorenzo Bettini */
-
-#ifndef OPTION_H
-#define OPTION_H
-
-/* If we use autoconf.  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h> /* for FILE */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef CMDLINE_PARSER_PACKAGE
-/** @brief the program name (used for printing errors) */
-#define CMDLINE_PARSER_PACKAGE "BGNFCF"
-#endif
-
-#ifndef CMDLINE_PARSER_PACKAGE_NAME
-/** @brief the complete program name (used for help and version) */
-#define CMDLINE_PARSER_PACKAGE_NAME "BGNFCF"
-#endif
-
-#ifndef CMDLINE_PARSER_VERSION
-/** @brief the program version */
-#define CMDLINE_PARSER_VERSION "(version 2)"
-#endif
-
-enum enum_circuit { circuit__NULL = -1, circuit_arg_minmaj = 0, circuit_arg_chiffrement, circuit_arg_additionL1, circuit_arg_additionL2, circuit_arg_additionL3, circuit_arg_additionL4, circuit_arg_multiplicationL1, circuit_arg_multiplicationL1L2, circuit_arg_multiplicationL2, circuit_arg_size, circuit_arg_time, circuit_arg_minmaj2, circuit_arg_minmaj3, circuit_arg_demo, circuit_arg_ip, circuit_arg_scalar_product, circuit_arg_time2 };
-
-/** @brief Where the command line options are stored */
-struct gengetopt_args_info
-{
-  const char *help_help; /**< @brief Print help and exit help description.  */
-  const char *version_help; /**< @brief Print version and exit help description.  */
-  char * subtitle_arg;	/**< @brief Pour indiquer les sous-titres en ligne de commande.  */
-  char * subtitle_orig;	/**< @brief Pour indiquer les sous-titres en ligne de commande original value given at command line.  */
-  const char *subtitle_help; /**< @brief Pour indiquer les sous-titres en ligne de commande help description.  */
-  enum enum_circuit circuit_arg;	/**< @brief Pour indiquer le circuit de calcul. minmaj=avec précalcul et postcalcul, minmaj2=avec erreur, minmaj3=avec erreur et postcalcul. (default='minmaj').  */
-  char * circuit_orig;	/**< @brief Pour indiquer le circuit de calcul. minmaj=avec précalcul et postcalcul, minmaj2=avec erreur, minmaj3=avec erreur et postcalcul. original value given at command line.  */
-  const char *circuit_help; /**< @brief Pour indiquer le circuit de calcul. minmaj=avec précalcul et postcalcul, minmaj2=avec erreur, minmaj3=avec erreur et postcalcul. help description.  */
-  
-  unsigned int help_given ;	/**< @brief Whether help was given.  */
-  unsigned int version_given ;	/**< @brief Whether version was given.  */
-  unsigned int subtitle_given ;	/**< @brief Whether subtitle was given.  */
-  unsigned int circuit_given ;	/**< @brief Whether circuit was given.  */
-
-  char **inputs ; /**< @brief unamed options (options without names) */
-  unsigned inputs_num ; /**< @brief unamed options number */
-} ;
-
-/** @brief The additional parameters to pass to parser functions */
-struct cmdline_parser_params
-{
-  int override; /**< @brief whether to override possibly already present options (default 0) */
-  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
-  int check_required; /**< @brief whether to check that all required options were provided (default 1) */
-  int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
-  int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
-} ;
-
-/** @brief the purpose string of the program */
-extern const char *gengetopt_args_info_purpose;
-/** @brief the usage string of the program */
-extern const char *gengetopt_args_info_usage;
-/** @brief the description string of the program */
-extern const char *gengetopt_args_info_description;
-/** @brief all the lines making the help output */
-extern const char *gengetopt_args_info_help[];
-
-/**
- * The command line parser
- * @param argc the number of command line options
- * @param argv the command line options
- * @param args_info the structure where option information will be stored
- * @return 0 if everything went fine, NON 0 if an error took place
- */
-int cmdline_parser (int argc, char **argv,
-  struct gengetopt_args_info *args_info);
-
-/**
- * The command line parser (version with additional parameters - deprecated)
- * @param argc the number of command line options
- * @param argv the command line options
- * @param args_info the structure where option information will be stored
- * @param override whether to override possibly already present options
- * @param initialize whether to initialize the option structure my_args_info
- * @param check_required whether to check that all required options were provided
- * @return 0 if everything went fine, NON 0 if an error took place
- * @deprecated use cmdline_parser_ext() instead
- */
-int cmdline_parser2 (int argc, char **argv,
-  struct gengetopt_args_info *args_info,
-  int override, int initialize, int check_required);
-
-/**
- * The command line parser (version with additional parameters)
- * @param argc the number of command line options
- * @param argv the command line options
- * @param args_info the structure where option information will be stored
- * @param params additional parameters for the parser
- * @return 0 if everything went fine, NON 0 if an error took place
- */
-int cmdline_parser_ext (int argc, char **argv,
-  struct gengetopt_args_info *args_info,
-  struct cmdline_parser_params *params);
-
-/**
- * Save the contents of the option struct into an already open FILE stream.
- * @param outfile the stream where to dump options
- * @param args_info the option struct to dump
- * @return 0 if everything went fine, NON 0 if an error took place
- */
-int cmdline_parser_dump(FILE *outfile,
-  struct gengetopt_args_info *args_info);
-
-/**
- * Save the contents of the option struct into a (text) file.
- * This file can be read by the config file parser (if generated by gengetopt)
- * @param filename the file where to save
- * @param args_info the option struct to save
- * @return 0 if everything went fine, NON 0 if an error took place
- */
-int cmdline_parser_file_save(const char *filename,
-  struct gengetopt_args_info *args_info);
-
-/**
- * Print the help
- */
-void cmdline_parser_print_help(void);
-/**
- * Print the version
- */
-void cmdline_parser_print_version(void);
-
-/**
- * Initializes all the fields a cmdline_parser_params structure 
- * to their default values
- * @param params the structure to initialize
- */
-void cmdline_parser_params_init(struct cmdline_parser_params *params);
-
-/**
- * Allocates dynamically a cmdline_parser_params structure and initializes
- * all its fields to their default values
- * @return the created and initialized cmdline_parser_params structure
- */
-struct cmdline_parser_params *cmdline_parser_params_create(void);
-
-/**
- * Initializes the passed gengetopt_args_info structure's fields
- * (also set default values for options that have a default)
- * @param args_info the structure to initialize
- */
-void cmdline_parser_init (struct gengetopt_args_info *args_info);
-/**
- * Deallocates the string fields of the gengetopt_args_info structure
- * (but does not deallocate the structure itself)
- * @param args_info the structure to deallocate
- */
-void cmdline_parser_free (struct gengetopt_args_info *args_info);
-
-/**
- * Checks that all the required options were specified
- * @param args_info the structure to check
- * @param prog_name the name of the program that will be used to print
- *   possible errors
- * @return
- */
-int cmdline_parser_required (struct gengetopt_args_info *args_info,
-  const char *prog_name);
-
-extern const char *cmdline_parser_circuit_values[];  /**< @brief Possible values for circuit. */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* OPTION_H */

Some files were not shown because too many files changed in this diff