https://github.com/nadavs5/tls
Tls v1.2 Client implementation, most tls servers support it
https://github.com/nadavs5/tls
aes-256 aes-gcm curve25519 elyptic hmac-sha384 tls tls12 x509
Last synced: 4 months ago
JSON representation
Tls v1.2 Client implementation, most tls servers support it
- Host: GitHub
- URL: https://github.com/nadavs5/tls
- Owner: NadavS5
- Created: 2025-05-01T18:45:15.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-03T15:05:58.000Z (4 months ago)
- Last Synced: 2025-06-04T00:59:25.466Z (4 months ago)
- Topics: aes-256, aes-gcm, curve25519, elyptic, hmac-sha384, tls, tls12, x509
- Language: Python
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tls 1.2 Client in python
Simple python implementation of tls 1.2 client
## How To Use
```pythonfrom client import tls_connection
#create tls connection object
connection = tls_connection("www.google.com", 443)
connection.connect()
connection.send(b"any byte data you want")
full_message = connection.recv()
```
alternatively you can just run the main file to run simple http request.note that the recv() doesnt has a size param because it recieves a whole tls packet
note that the message can be split across multiple packets## Requirements:
```
pip install -r requirements.txt
```
> [!NOTE]
> Because the certificate chaining is not implemented yet you will need to download the wr2 certificate and it will support part of Google's websites
> [wr2 cert](https://i.pki.goog/wr2.crt)
> If you want to remove the cert verification remove lines 187 - 188 in client.py
## Current Implementation:- This client uses cipher: ECDHE_RSA_AES256_GCM_SHA384
> This cipher is used because most server support it
- and signature algorithm: RSA_PSS_RSAE_SHA256## Why Not Tls 1.3?
because tls 1.3 is a little bit mor longer to implement and most servers still support tls 1.2 with the chosen cipher---
## Development Status:
currently working on full certificate chaining verification
## Note
This is a personal/educational project. You're more than welcome to browse the code, use it as a reference, or contribute!
Feel free to open pull requests.