{"id":21633709,"url":"https://github.com/vittoriopiotti/fermatandrsa-java","last_synced_at":"2025-07-15T04:13:06.583Z","repository":{"id":254327176,"uuid":"845727756","full_name":"vittorioPiotti/FermatAndRSA-Java","owner":"vittorioPiotti","description":"Soluzione software in Java che genera e salva su file i numeri primi con algoritmo di Fermat e algoritmo di crittografia RSA","archived":false,"fork":false,"pushed_at":"2024-12-30T12:38:40.000Z","size":2101,"stargazers_count":52,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T11:38:57.696Z","etag":null,"topics":["fermat","fermat-factorization","flatlaf","java","rsa","rsa-cryptography","rsa-decryption","rsa-encryption","software"],"latest_commit_sha":null,"homepage":"https://drive.google.com/file/d/1IVb3ctowyLbrHMg7zlFN-Zv7If_51uzH/view?usp=sharing","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vittorioPiotti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T20:11:56.000Z","updated_at":"2025-02-19T15:29:22.000Z","dependencies_parsed_at":"2024-10-22T04:40:06.330Z","dependency_job_id":null,"html_url":"https://github.com/vittorioPiotti/FermatAndRSA-Java","commit_stats":null,"previous_names":["vittoriopiotti/fermat-and-rsa","vittoriopiotti/fermat-and-rsa-java","vittoriopiotti/fermatandrsa-java"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioPiotti%2FFermatAndRSA-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioPiotti%2FFermatAndRSA-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioPiotti%2FFermatAndRSA-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioPiotti%2FFermatAndRSA-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vittorioPiotti","download_url":"https://codeload.github.com/vittorioPiotti/FermatAndRSA-Java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248430490,"owners_count":21102018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fermat","fermat-factorization","flatlaf","java","rsa","rsa-cryptography","rsa-decryption","rsa-encryption","software"],"created_at":"2024-11-25T03:13:32.553Z","updated_at":"2025-04-11T15:28:12.986Z","avatar_url":"https://github.com/vittorioPiotti.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fermat-And-RSA\nSoluzione software in Java che genera e salva su file i numeri primi con algoritmo di Fermat e algoritmo di crittografia RSA\n\n\n\u003e [!NOTE]\n\u003e Progetto scolastico 🎓 · Ⅳ\n\n\n\u003e [!Warning]\n\u003e Presenza di BUG nell'UI\n\n---\n\n## Javadoc\n\nLink al javadoc: [(link)](https://vittoriopiotti.altervista.org/FermatAndRsaJava/index.html)\n\n\n## Preview\n\nVideo di Test [(link)](https://drive.google.com/file/d/1IVb3ctowyLbrHMg7zlFN-Zv7If_51uzH/view?usp=sharing)\n\n\n---\n\n\u003cimg src=\"https://github.com/vittorioPiotti/FermatAndRSA-Java/blob/main/images/socialpreview2.png\" /\u003e\n\n\n\n\n## Responsive\n\n|\u003cimg src=\"https://github.com/vittorioPiotti/Fermat-And-RSA/blob/main/images/small2.png\" /\u003e|\u003cimg src=\"https://github.com/vittorioPiotti/Fermat-And-RSA/blob/main/images/large2.png\" /\u003e|          \n|-|-|\n|Small|Large|\n\n\n\n\n## Utilizzo\n\n 1. Seleziona schermata di \"Test Primalità\"\n 2. Genera i numeri primi con algoritmo di Fermat\n 3. Salva su file i numeri primi\n 4. Seleziona schermata di \"Algoritmo RSA\"\n 5. Carica il file con i numeri primi\n 6. Cifra o decifra un messaggio\n\n\n\n\n## Snippet Fermat Algorithm\n\n\n```java\npublic void algoritmoFermat(){\n\tlong start; //tempo inizio calcolo numeri primi\n\tlong end; //tempo fine calcolo numeri primi\n\tboolean checkPrimo; //verifica se un numero è primo\n\t//check = true:     primo\n\t//check = false:    composto\n\tstart = System.currentTimeMillis(); //tempo inizio calcolo numeri primi                     \n\t//ciclo for di i che scorre da min a max\n\tfor (\n\t\tBigInteger i = min; //è il numero di cui si verifica la primalità\n\t\ti.compareTo(max) \u003c= 0;\n\t\ti = i.add(BigInteger.valueOf(1))\n\t) {\n\t\tincrementProgressBar.run();\n\t\tcheckPrimo = true;\n\t\t//ciclo for annidato di j che scorre da 2 al divisore massimo\n\t\tfor (\n\t\t\tBigInteger j = BigInteger.valueOf(2); //è il dvisore del numero per la verifica della primalità\n\t\t\tj.compareTo(BigInteger.valueOf(10)) \u003c= 0; //j compareTo fino al numero\n\t\t\tj = j.add(BigInteger.valueOf(1)))\n\t\t//verifica se j divisore di i ed in caso aggiorna check = false\n\t\t{\n\t\t\tif (Thread.currentThread().isInterrupted()) {\n\t\t\t\tend = System.currentTimeMillis(); //tempo fine calcolo numeri primi\n\t\t\t\ttime = Math.abs(start - end) / 1000.0; //tempo durata calcolo numeri primi\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!j.modPow(i.subtract(BigInteger.valueOf(1)), i).equals(BigInteger.valueOf(1))) checkPrimo = false;\n\t\t}\n\t\tif (checkPrimo){\n\t\t\tresults.add(i.toString());\n\t\t\tappendResult.run();\n\t\t}\n\t}\n\tend = System.currentTimeMillis(); //tempo fine calcolo numeri primi\n\ttime = Math.abs(start - end) / 1000.0; //tempo durata calcolo numeri primi\n}\n\n```\n\n\n## Albero di Path\n\n```bash\n$ tree\n.\n├──lib\n│   └── flatlaf-3.2.5.jar\n└──src\n    └── org\n        └── app\n            ├── applications\n            │   ├── encryption\n            │   │   ├── ReadFile.java\n            │   │   └── TestEncryption.java\n            │   └── primality\n            │       ├── SavePrimality.java\n            │       └── TestPrimality.java\n            ├── windows\n            │   ├── dependencies\n            │   │   ├── components\n            │   │   │   ├── encryption\n            │   │   │   │   ├── dialogs\n            │   │   │   │   │   ├── WinErrorInEncryption.java\n            │   │   │   │   │   └── WinErrorOutEncryption.java\n            │   │   │   │   ├── panels\n            │   │   │   │   │   ├── WinInEncryption.java\n            │   │   │   │   │   ├── WinOutEncryption.java\n            │   │   │   │   │   └── WinSaveEncryption.java\n            │   │   │   │   └── WinEncryption.java\n            │   │   │   ├── primality\n            │   │   │   │   ├── dialogs\n            │   │   │   │   │   ├── WinErrorInPrimality.java\n            │   │   │   │   │   └── WinErrorOutPrimality.java\n            │   │   │   │   ├── panels\n            │   │   │   │   │   ├── WinInPrimality.java\n            │   │   │   │   │   ├── WinOutPrimality.java\n            │   │   │   │   │   └── WinSavePrimality.java\n            │   │   │   │   └── WinPrimality.java\n            │   │   │   └── WinHome.java\n            │   │   └── managers\n            │   │       ├── WinManagerEncryption.java\n            │   │       └── WinManagerPrimality.java\n            │   └── WinManager.java\n            ├── App.java\n            └── Main.java\n\n```\n\n## Licenze\n\n\n### Fermat And RSA\n\n**Copyright** 2024 Vittorio Piotti [(GitHub page)](https://github.com/vittorioPiotti) [(Personal page)](https://vittoriopiotti.altervista.org/)\n\n**Version** [v1.0.0](https://github.com/vittorioPiotti/FermatAndRSA-Java/releases/tag/1.0.0)\n\n**License** [GPL-3.0](https://github.com/vittorioPiotti/Fermat-And-RSA/blob/main/LICENSE.md)\n\n\n---\n\n### FlatLaf\n\n**Copyright** 2024 JFormDesigner GmbH\n\n**Version** [v3.2.5](https://mvnrepository.com/artifact/com.formdev/flatlaf/3.2.5)\n\n**License** [Apache License 2.0](https://github.com/JFormDesigner/FlatLaf/blob/main/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvittoriopiotti%2Ffermatandrsa-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvittoriopiotti%2Ffermatandrsa-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvittoriopiotti%2Ffermatandrsa-java/lists"}