MCPcopy Create free account

hub / github.com/Bhuvaneshwer2005/tteh-biometric-security / functions

Functions48 in github.com/Bhuvaneshwer2005/tteh-biometric-security

↓ 4 callersMethoddisplay_image
Display image on canvas
src/gui.py:331
↓ 4 callersFunctionencrypt
Full 8-round encryption. - Creates ONE SkewTentMap(x0, mu) instance if tent_map is None. - Saves map state BEFORE each round for use
src/encryption.py:64
↓ 4 callersFunctionload_key
Load TTEH key from file with all decryption data. Args: filepath: Path to key file Returns: Dictionary containi
src/encryption.py:242
↓ 3 callersFunction_correlation_for_direction
Compute correlation for given pixel pairs.
src/metrics.py:141
↓ 3 callersMethodcreate_image_panel
Create an image display panel
src/gui.py:119
↓ 3 callersFunctiongenerate_key
Generate TTEH encryption key with random parameters if not provided. Args: x0: Initial condition for Skew Tent Map (random if No
src/encryption.py:187
↓ 3 callersFunctionmpht_forward
Apply forward MPHT row-by-row to every adjacent pixel pair. Paper equations 11-12 (fingerprint) and 13-14 (substitution): alpha = (a +
src/mpht.py:17
↓ 2 callersFunctionanalyze_image
Full security analysis for one image. 1. Encrypt orig → (cipher, round_states, substitution_data) 2. Create modified image: flip pixel at
src/metrics.py:206
↓ 2 callersFunctiondecrypt
Full 8-round decryption — paper Section III-B. Reverses rounds in order: round 8 first, round 1 last. For each round (in reverse):
src/encryption.py:117
↓ 2 callersMethodgenerate
Generate `length` keystream values. Args: length: Number of keystream values to generate Return
src/skew_tent.py:75
↓ 2 callersFunctionmain
()
src/gui.py:514
↓ 2 callersMethodnext_value
Advance map by one step, return x_{n+1} as float in (0,1). Implements paper equation 16: x_{n+1} = mu * x_n
src/skew_tent.py:57
↓ 2 callersFunctionsave_key
Save TTEH key to file with all decryption data. Args: key: Key dictionary from generate_key() filepath: Path to save key
src/encryption.py:213
↓ 1 callersFunctionbatch_analyze
Process all .bmp and .png images in image_dir. Print progress: "Processing image N/total: filename" Return DataFrame with one row per ima
src/metrics.py:254
↓ 1 callersFunctioncompute_correlation
Paper equation 26: r = cov(o,c) / sqrt(G(o) * G(c)) Where: cov(o,c) = (1/N) * Σ (oᵢ - mean(o)) * (cᵢ - mean(c)) G(o) = (1/N)
src/metrics.py:115
↓ 1 callersFunctioncompute_entropy
Paper equation 25: H(s) = Σ p(s) * log2(1/p(s)) Compute over all 256 gray levels of the encrypted image. Skip gray levels with zero count
src/metrics.py:18
↓ 1 callersFunctioncompute_npcr
Paper equation 24: NPCR = [Σ D(i,j) / (X*Y)] * 100 D(i,j) = 1 if cipher1(i,j) != cipher2(i,j), else D(i,j) = 0 cipher1 = encryption of or
src/metrics.py:50
↓ 1 callersFunctioncompute_uaci
Paper equation 23: UACI = (1/(X*Y)) * Σ [|C1(i,j) - C2(i,j)| / 255] * 100 Same cipher1 and cipher2 as NPCR. Return percentage float.
src/metrics.py:83
↓ 1 callersMethodcreate_charts
Create matplotlib charts
src/gui.py:136
↓ 1 callersMethodcreate_encrypt_decrypt_tab
Tab 1: Encrypt / Decrypt
src/gui.py:50
↓ 1 callersFunctioncreate_figure6_entropy
Create Figure 6: Entropy bar chart - Bar chart, 80 images - Horizontal ideal line at 8.0
run_analysis.py:74
↓ 1 callersFunctioncreate_figure7_npcr
Create Figure 7: NPCR bar chart - Bar chart, 80 images - Horizontal ideal line at 99.6093
run_analysis.py:104
↓ 1 callersFunctioncreate_figure8_uaci
Create Figure 8: UACI bar chart - Bar chart, 80 images - Horizontal ideal line at 33.4635
run_analysis.py:135
↓ 1 callersFunctioncreate_figure9_correlation
Create Figure 9: Correlation horizontal bar chart - Horizontal bar chart matching paper Fig 9 style - Show mean correlation for three dir
run_analysis.py:166
↓ 1 callersFunctionencrypt_round
One encryption round — paper Section III-A, Steps 1-4, Figure 4. Step 1: Apply mpht_forward to img → f_trans (eq. 11-12) Step 2: Ap
src/encryption.py:22
↓ 1 callersFunctiongenerate_synthetic_dataset
Generate synthetic fingerprint dataset if data/samples/ is empty. Args: num_images: Number of synthetic images to generate
run_analysis.py:36
↓ 1 callersFunctiongenerate_synthetic_fingerprint
Generate a realistic synthetic fingerprint image. Used when FVC2004 dataset is unavailable. Algorithm: 1. Create ridge pattern
src/encryption.py:301
↓ 1 callersMethodget_state
Return current map value (for saving state before round). Returns: Current state x_n
src/skew_tent.py:100
↓ 1 callersFunctionmain
Main analysis script
run_analysis.py:269
↓ 1 callersFunctionmpht_inverse
Apply inverse MPHT row-by-row to every adjacent pixel pair. Paper equations 21-22: b = (beta - alpha) mod 2^n a = (2*alpha - beta
src/mpht.py:66
↓ 1 callersFunctionprint_summary_table
Print final summary table matching paper results.
run_analysis.py:206
↓ 1 callersMethodset_state
Restore map to a previous state (for decryption replay). Args: x: State value to restore, must satisfy 0 < x < 1
src/skew_tent.py:109
↓ 1 callersMethodupdate_charts
Update matplotlib charts
src/gui.py:383
↓ 1 callersMethodupdate_metrics_display
Update metrics labels with color coding
src/gui.py:348
Method__init__
(self, root)
src/gui.py:28
Method__init__
Initialize Skew Tent Map with parameters. Args: x0: initial condition, must satisfy 0 < x0 < 1 mu: m
src/skew_tent.py:29
Methoddecrypt_image
Decrypt the encrypted image
src/gui.py:289
Methoddecrypt_thread
()
src/gui.py:299
Functiondecrypt_with_key_file
Decrypt image using key from file. Args: cipher: Encrypted image keyfile: Path to key file round_states: Optio
src/encryption.py:284
Methodencrypt_image
Encrypt the loaded image and save both encrypted image and key
src/gui.py:226
Methodencrypt_thread
()
src/gui.py:232
Functionencrypt_with_key_file
Encrypt image using key from file. Args: img: Original fingerprint image keyfile: Path to key file Returns:
src/encryption.py:269
Methodexport_encrypted
Export encrypted image to file
src/gui.py:494
Methodgenerate_key
Generate and display random key, update GUI fields
src/gui.py:435
Methodload_encrypted_image
Load an encrypted image and its key file
src/gui.py:177
Methodload_image
Load an image file
src/gui.py:157
Methodload_key
Load key from file with decryption data
src/gui.py:471
Methodsave_key
Save current key to file
src/gui.py:451