A secure platform for healthcare professionals to encrypt and share sensitive medical images with advanced cryptography
A secure web application that enables healthcare laboratories to encrypt sensitive medical images (MRI/X-ray) and share them securely with patients. This project addresses critical data privacy concerns in healthcare while maintaining usability for medical professionals.
The application uses a Flask backend with a React frontend, implementing multiple encryption algorithms for maximum security:
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
import base64
class ImageEncryptionService:
def __init__(self):
self.key = self._generate_key()
def _generate_key(self):
password = b"secure_password"
salt = b"secure_salt"
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32,
salt=salt,
iterations=100000,
)
return base64.urlsafe_b64encode(kdf.derive(password))
def encrypt_image(self, image_data):
f = Fernet(self.key)
return f.encrypt(image_data)
A secure web application that enables healthcare laboratories to encrypt sensitive medical images (MRI/X-ray) and share them securely with patients. This project addresses critical data privacy concerns in healthcare while maintaining usability for medical professionals.
The application uses a Flask backend with a React frontend, implementing multiple encryption algorithms for maximum security:
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
import base64
class ImageEncryptionService:
def __init__(self):
self.key = self._generate_key()
def _generate_key(self):
password = b"secure_password"
salt = b"secure_salt"
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32,
salt=salt,
iterations=100000,
)
return base64.urlsafe_b64encode(kdf.derive(password))
def encrypt_image(self, image_data):
f = Fernet(self.key)
return f.encrypt(image_data)