Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Bhuvaneshwer2005/tteh-biometric-security
/ functions
Functions
48 in github.com/Bhuvaneshwer2005/tteh-biometric-security
⨍
Functions
48
◇
Types & classes
2
↓ 4 callers
Method
display_image
Display image on canvas
src/gui.py:331
↓ 4 callers
Function
encrypt
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 callers
Function
load_key
Load TTEH key from file with all decryption data. Args: filepath: Path to key file Returns: Dictionary containi
src/encryption.py:242
↓ 3 callers
Function
_correlation_for_direction
Compute correlation for given pixel pairs.
src/metrics.py:141
↓ 3 callers
Method
create_image_panel
Create an image display panel
src/gui.py:119
↓ 3 callers
Function
generate_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 callers
Function
mpht_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 callers
Function
analyze_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 callers
Function
decrypt
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 callers
Method
generate
Generate `length` keystream values. Args: length: Number of keystream values to generate Return
src/skew_tent.py:75
↓ 2 callers
Function
main
()
src/gui.py:514
↓ 2 callers
Method
next_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 callers
Function
save_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 callers
Function
batch_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 callers
Function
compute_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 callers
Function
compute_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 callers
Function
compute_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 callers
Function
compute_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 callers
Method
create_charts
Create matplotlib charts
src/gui.py:136
↓ 1 callers
Method
create_encrypt_decrypt_tab
Tab 1: Encrypt / Decrypt
src/gui.py:50
↓ 1 callers
Function
create_figure6_entropy
Create Figure 6: Entropy bar chart - Bar chart, 80 images - Horizontal ideal line at 8.0
run_analysis.py:74
↓ 1 callers
Function
create_figure7_npcr
Create Figure 7: NPCR bar chart - Bar chart, 80 images - Horizontal ideal line at 99.6093
run_analysis.py:104
↓ 1 callers
Function
create_figure8_uaci
Create Figure 8: UACI bar chart - Bar chart, 80 images - Horizontal ideal line at 33.4635
run_analysis.py:135
↓ 1 callers
Function
create_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 callers
Function
encrypt_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 callers
Function
generate_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 callers
Function
generate_synthetic_fingerprint
Generate a realistic synthetic fingerprint image. Used when FVC2004 dataset is unavailable. Algorithm: 1. Create ridge pattern
src/encryption.py:301
↓ 1 callers
Method
get_state
Return current map value (for saving state before round). Returns: Current state x_n
src/skew_tent.py:100
↓ 1 callers
Function
main
Main analysis script
run_analysis.py:269
↓ 1 callers
Function
mpht_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 callers
Function
print_summary_table
Print final summary table matching paper results.
run_analysis.py:206
↓ 1 callers
Method
set_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 callers
Method
update_charts
Update matplotlib charts
src/gui.py:383
↓ 1 callers
Method
update_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
Method
decrypt_image
Decrypt the encrypted image
src/gui.py:289
Method
decrypt_thread
()
src/gui.py:299
Function
decrypt_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
Method
encrypt_image
Encrypt the loaded image and save both encrypted image and key
src/gui.py:226
Method
encrypt_thread
()
src/gui.py:232
Function
encrypt_with_key_file
Encrypt image using key from file. Args: img: Original fingerprint image keyfile: Path to key file Returns:
src/encryption.py:269
Method
export_encrypted
Export encrypted image to file
src/gui.py:494
Method
generate_key
Generate and display random key, update GUI fields
src/gui.py:435
Method
load_encrypted_image
Load an encrypted image and its key file
src/gui.py:177
Method
load_image
Load an image file
src/gui.py:157
Method
load_key
Load key from file with decryption data
src/gui.py:471
Method
save_key
Save current key to file
src/gui.py:451