-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
25 lines (21 loc) · 935 Bytes
/
config.py
File metadata and controls
25 lines (21 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Configuration file for Recurrence-Based Time OTP Authentication System
Contains shared constants and parameters used across all components
"""
# Recurrence relation constants
# X_(n+1) = (a * X_n^2 + b * t + c) mod m
a = 13 # Multiplier for squared seed
b = 7 # Multiplier for time component
c = 17 # Additive constant
m = 1000000007 # Large prime modulus for security
seed = 123456789 # Initial seed value
# API Configuration
api_url = "http://localhost:8000" # FastAPI backend URL (change to network IP for network access)
api_key = "SECRET_KEY" # API authentication key
# Time Configuration
time_slice_duration = 45 # Default OTP validity duration in seconds
min_validity = 15 # Minimum OTP validity (seconds)
max_validity = 120 # Maximum OTP validity (seconds)
# OTP Configuration
otp_digits = 6 # Number of digits in final OTP
otp_modulus = 10 ** otp_digits # 1,000,000 for 6-digit OTP