-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from crypto.key_manager import KeyManager | ||
from models.model import Model | ||
from clients.client import Client | ||
|
||
def main(): | ||
key_manager = KeyManager(key_size=2048, ciphertext_size=2048) | ||
key_manager.generate_keys() | ||
|
||
model = Model(HomomorphicEncryption(key_manager.get_public_key(), key_manager.get_private_key())) | ||
|
||
client = Client(key_manager, model) | ||
|
||
# Generate some sample data | ||
data = [1, 2, 3, 4, 5] | ||
|
||
# Perform homomorphic encryption-based machine learning | ||
results = client.perform_homomorphic_ml(data) | ||
|
||
print("Results:", results) | ||
|
||
if __name__ == "__main__": | ||
main() |