This project demonstrates key concepts in cryptography and cybersecurity using Python. It provides practical implementations, visualizations, and explanations of fundamental algorithms and processes used in secure communication and data protection.
This Python script demonstrates the following concepts:
- RSA (Rivest, Shamir, Adleman) cryptography
- Basic idea of public key crypto - encryption
- Basic idea of public key crypto - signatures
- Diffie-Hellman Key exchange
- One-way functions
- Modular Math
- Discrete Logarithms
- Finding a key (in the context of RSA)
- Example of RSA
- PKCS (Public Key Cryptography Standards) example
- Signatures – message recovery
- Signatures - Appendix
- HTTP -> HTTPS upgrade (simulating the process)
- Mixed content: http and https (demonstrating the difference)
Concept | Explanation | Importance in Cybersecurity | Domain |
---|---|---|---|
RSA Cryptography | Public-key crypto system for secure data transmission | Enables secure communication over insecure channels | Cryptography |
Public Key Crypto - Encryption | Use of public key for message encryption | Allows secure message sending without prior key exchange | Cryptography |
Public Key Crypto - Signatures | Use of private key for message signing | Provides authentication and non-repudiation | Cryptography |
Diffie-Hellman Key Exchange | Method of securely exchanging cryptographic keys over a public channel | Allows two parties to jointly establish a shared secret over an insecure channel | Key Exchange |
One-way Functions | Functions that are easy to compute but difficult to reverse | Fundamental to many cryptographic protocols, including password hashing | Cryptography |
Modular Math | Arithmetic system with finite set of integers | Forms the basis for many cryptographic algorithms | Mathematics |
Discrete Logarithms | The inverse operation of modular exponentiation | The difficulty of this problem is the basis for several cryptographic systems | Cryptography |
PKCS Padding | Padding schemes used in public-key cryptosystems | Ensures security properties in encryption and signing operations | Cryptography |
HTTP -> HTTPS Upgrade | Process of redirecting HTTP requests to HTTPS | Ensures secure communication by default | Network Security |
Mixed Content | Web pages containing both HTTP and HTTPS resources | Can lead to security vulnerabilities if not handled properly | Web Security |
The script will demonstrate each concept, display visualizations, and provide explanations for each plot.
This code is for educational purposes only. The implementations are simplified and not suitable for production use. For real-world applications, use well-tested and audited cryptographic libraries.
Copyright 2024 Eric Yocam
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.