Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,62 +50,85 @@ def decrypt_data(encrypted_data, key):
|
|
| 50 |
return decrypted_data[:-padding_length]
|
| 51 |
|
| 52 |
# Streamlit UI
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
#
|
| 57 |
-
st.
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
**
|
| 103 |
-
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
return decrypted_data[:-padding_length]
|
| 51 |
|
| 52 |
# Streamlit UI
|
| 53 |
+
|
| 54 |
+
import streamlit as st
|
| 55 |
+
|
| 56 |
+
# --- Hero Section ---
|
| 57 |
+
st.title("🛡 SentinelCryptography")
|
| 58 |
+
st.subheader("A Quantum-Ready Encryption Guardian")
|
| 59 |
+
st.write("""
|
| 60 |
+
Not just another online AES tool. SentinelCryptography is designed as a living sentinel —
|
| 61 |
+
built for today’s digital security, aware of tomorrow’s quantum threats.
|
| 62 |
+
""")
|
| 63 |
+
|
| 64 |
+
# --- Encryption / Decryption Tool Placeholder ---
|
| 65 |
+
st.markdown("---")
|
| 66 |
+
st.header("🔑 Try it Out")
|
| 67 |
+
st.write("Encrypt or decrypt your message with AES-256-CBC and our custom key derivation.")
|
| 68 |
+
# (Insert your encrypt/decrypt input/output code here)
|
| 69 |
+
|
| 70 |
+
# --- Knowledge Section ---
|
| 71 |
+
st.markdown("---")
|
| 72 |
+
st.header("📜 The Legacy of Encryption")
|
| 73 |
+
|
| 74 |
+
st.write("""
|
| 75 |
+
Encryption has evolved across human history:
|
| 76 |
+
- **Ancient Era** — Substitution ciphers like Caesar’s shift cipher.
|
| 77 |
+
- **Mechanical Age** — Enigma machines and rotor-based systems in WWII.
|
| 78 |
+
- **Modern Cryptography** — DES (broken by brute force), then AES chosen as the global standard.
|
| 79 |
+
""")
|
| 80 |
+
|
| 81 |
+
st.write("""
|
| 82 |
+
But while AES became the backbone of secure communication, many **online tools** that claim to
|
| 83 |
+
offer AES encryption are built on outdated or weakened foundations.
|
| 84 |
+
""")
|
| 85 |
+
|
| 86 |
+
# --- Weaknesses of Traditional Engines ---
|
| 87 |
+
st.markdown("---")
|
| 88 |
+
st.header("⚠️ Weaknesses of Traditional Online Engines")
|
| 89 |
+
|
| 90 |
+
st.markdown("""
|
| 91 |
+
- **AES-128 vs AES-256**
|
| 92 |
+
AES-128 is mathematically strong today, but quantum algorithms (Grover’s) could cut its strength in half.
|
| 93 |
+
AES-256 is far more resilient against this pressure.
|
| 94 |
+
|
| 95 |
+
- **SHA-1 HMAC**
|
| 96 |
+
Many tools use HMAC with SHA-1, which has been broken since 2017 (Google’s SHAttered attack).
|
| 97 |
+
Even in HMAC, SHA-1 is considered unsafe for the future.
|
| 98 |
+
|
| 99 |
+
- **CBC Mode Done Wrong**
|
| 100 |
+
CBC requires a fresh random IV for each message. Many online engines ignore this, leaking patterns.
|
| 101 |
+
|
| 102 |
+
- **No Key Derivation**
|
| 103 |
+
User passwords are often treated directly as AES keys, making brute-force far easier.
|
| 104 |
+
Sentinel uses a **custom Key Derivation Function (KDF)** for stronger defense.
|
| 105 |
+
|
| 106 |
+
- **No Quantum Awareness**
|
| 107 |
+
Traditional engines assume the world will remain pre-quantum. Sentinel does not.
|
| 108 |
+
""")
|
| 109 |
+
|
| 110 |
+
# --- Sentinel Difference ---
|
| 111 |
+
st.markdown("---")
|
| 112 |
+
st.header("🌐 The Sentinel Difference")
|
| 113 |
+
|
| 114 |
+
st.markdown("""
|
| 115 |
+
- **AES-256-CBC + Custom KDF** — stronger, adaptive protection.
|
| 116 |
+
- **Quantum-Resilient Design** — prepared for the next era of attacks.
|
| 117 |
+
- **Transparent & Open Source** — no black box, open to community audit.
|
| 118 |
+
- **Educational by Design** — teaching as much as it protects.
|
| 119 |
+
|
| 120 |
+
In short: where others offer a **lock**, Sentinel offers a **living shield**.
|
| 121 |
+
""")
|
| 122 |
+
|
| 123 |
+
# --- Future Roadmap ---
|
| 124 |
+
st.markdown("---")
|
| 125 |
+
st.header("🚀 Roadmap Ahead")
|
| 126 |
+
|
| 127 |
+
st.write("""
|
| 128 |
+
- Mobile and browser extension versions.
|
| 129 |
+
- File encryption and integration with decentralized storage.
|
| 130 |
+
- Visual encryption flow diagrams for education.
|
| 131 |
+
- Hackathons and community feature-building.
|
| 132 |
+
""")
|
| 133 |
+
|
| 134 |
+
st.success("✨ SentinelCryptography — Built not just to encrypt, but to guard, teach, and endure.")
|