Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
Paillier_stats_on_r.py File Reference

Namespaces

namespace  Paillier_stats_on_r
 

Functions

 Paillier_stats_on_r.avg_curve_mod_k_by_r_value (t_pix_enc, vector_r_values, n, size_vec_r, p, q)
 According to r value.
 
 Paillier_stats_on_r.avg_curve_mod_k_by_r_value_inv (t_pix_enc, vector_r_values, n, size_vec_r, p, q)
 This function calculates and plots the average curve of encrypted pixel values modulo k by r value for inverse encryption.
 
 Paillier_stats_on_r.avg_curve_mod_k_by_pixel_value (t_pix_enc, vector_r_values, n, size_vec_r, p, q, inverse)
 According to initial pixel value.
 
 Paillier_stats_on_r.avg_curve_mod_2_by_pixel_value (t_pix_enc, vector_r_values, n, size_vec_r, title, inverse)
 According to initial pixel value with differents modulo.
 
 Paillier_stats_on_r.avg_curve_mod_4_by_pixel_value (t_pix_enc, vector_r_values, n, size_vec_r, title, inverse)
 This function calculates and plots the average curve of encrypted pixel values modulo 4 by initial pixel value.
 
 Paillier_stats_on_r.avg_curve_mod_k_by_pixel_value_in_common (t_pix_enc, t_pix_inv_enc, vector_r_values, n, size_vec_r, p, q)
 According to initial pixel value, with different modulo, with common values where there is no r value for modulo k = 0.
 
 Paillier_stats_on_r.avg_curve_mod_k_by_pixel_value_and_lessthan_m (t_pix_enc, vector_r_values, n, size_vec_r, p, q, m, inverse)
 This function calculates and plots the average curve of encrypted pixel values modulo k by initial pixel value and less than 2^m.
 
 Paillier_stats_on_r.main ()
 The main function that calls other functions to calculate and plot average curves of encrypted pixel values.
 

Variables

 Paillier_stats_on_r.f_pix = open("results_pix_p3q83nbR164.txt", "r")
 Initialisation, get data.
 
int Paillier_stats_on_r.p = 3
 
int Paillier_stats_on_r.q = 83
 
 Paillier_stats_on_r.lines_pix = f_pix.readlines()
 
list Paillier_stats_on_r.t_pix_avg = []
 
list Paillier_stats_on_r.count_pix = []
 
 Paillier_stats_on_r.n = int(lines_pix[0])
 
 Paillier_stats_on_r.size_vec_r = int(lines_pix[1])
 
list Paillier_stats_on_r.vector_r_values = []
 
list Paillier_stats_on_r.t_pix_enc = []
 
int Paillier_stats_on_r.line_index = 2
 
 Paillier_stats_on_r.r_value = np.uint64(lines_pix[line_index].strip())
 
list Paillier_stats_on_r.t_pix_enc_row = []
 
 Paillier_stats_on_r.pix_value = np.uint16(lines_pix[line_index].strip())
 
list Paillier_stats_on_r.t_pix_enc_inv = []
 Curves.
 
list Paillier_stats_on_r.t_pix_enc_inv_row = []
 
 Paillier_stats_on_r.x = np.invert(np.array(t_pix_enc[i][j], dtype=np.uint16))