io.github.andrewquijano:ciphercraft
Contains Packages for ElGamal, Paillier, Goldweiser-Micali and DGK Homomorphic Encryption System. Also implements secure multiplication, division and comparison.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, academia.edu, springer.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.2%) to scientific vocabulary
Keywords
Repository
Contains Packages for ElGamal, Paillier, Goldweiser-Micali and DGK Homomorphic Encryption System. Also implements secure multiplication, division and comparison.
Basic Info
Statistics
- Stars: 54
- Watchers: 5
- Forks: 16
- Open Issues: 0
- Releases: 10
Topics
Metadata Files
README.md
Homomorphic Encryption
Homomorphic Encryption is a Java library that implements the following partially homomorphic encryption systems:
* Paillier
* El-Gamal (Additive or multiplicative)
* Goldwasser-Micali
* DGK
As the partially homomorphic encryption systems only support addition with two ciphertexts, other protocols have been appended to extend its functionality, in particular: * Secure Multiplication * Secure Division * Secure Comparison
Thjis Veugen implemented various of these protocols in Python.
Installation
Please retrieve the JAR file from here. Instead, you can also now import the file via Maven Central.
Alternatively, you can download the repository and create the JAR file to import into another project
by running the following command, you will find a ciphercraft-{version}.jar file in the build/libs/ directory.
bash
./gradlew jar
Minimum required steps
We used ObjectInputValidatingStreams, so if you use Gradle, import the Apache Common IO library into your project as well with the library.
Optional—Track the number of bytes
If you want to track the number of bytes sent by Alice/Bob, we also added instrumentation. To install this, there are more steps: 1. You need to include the InstrumentationAgent.jar file 2. We also need to make the following changes to your build.gradle
To build the jar file from the root of the repository, run these commands and move the jar file into the libs folder:
bash
javac -d output src/main/java/edu/fiu/adwise/homomorphic_encryption/misc/InstrumentationAgent.java
jar cfm InstrumentationAgent.jar src/main/java/edu/fiu/adwise/homomorphic_encryption/misc/MANIFEST.mf -C output .
If you want to enable tracking the number of bytes used when testing, you need the JVM arguments ```gradle test { testLogging { // Make sure output from // standard out or error is shown // in Gradle output. showStandardStreams = true }
// Set JVM arguments to include your agent
jvmArgs = [
'-javaagent:libs/InstrumentationAgent.jar' // Change this to your agent JAR path
]
}
``
You would also need to upgrade your run inbuild.gradle` as follows with JVM argument and passing arguments with -P:
```gradle // Define a task to run your Java application with the agent tasks.register('runWithAgent', JavaExec) { mainClass.set(project.findProperty("chooseRole").toString()) classpath = sourceSets.main.runtimeClasspath
// Set JVM arguments to include your agent
jvmArgs = [
'-javaagent:libs/InstrumentationAgent.jar'
]
// Pass command-line arguments to your application
// gradle run -PchooseRole=PathsBob -Pargs='./data/ownroute3.txt 9000'
if (project.hasProperty('args')) {
args project.args.split(' ')
}
}
// Configure the 'run' task to depend on 'runWithAgent' tasks.run.dependsOn('runWithAgent') ```
Other projects using this library
This library was used in the following research projects, linked here. 1. Secure Indoor Localization 2. Enhanced Privacy Preserving Decision Trees 3. Secure Drone path for collision avoidance
The ciphercraft-{version}.jar file is imported in the libs directory.
Generate Keys
To create the keys, run the following commands:
bash
gradle -g gradle_user_home run -PchooseRole=security.paillier.PaillierKeyPairGenerator
gradle -g gradle_user_home run -PchooseRole=security.dgk.DGKKeyPairGenerator
This will create the key files in the current working directory.
Documentation
The documentation for this repository is maintained via Javadoc. You can create this as follows:
bash
./gradlew generateJavadoc
Alternatively,
you can find the documentation from my website here.
Please check under src/test/java/edu/fiu/adwise/encryption_test for the test cases,
which also has detailed examples on how to use the API for your secure computations.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Authors and acknowledgment
Code author: Andrew Quijano
| Name/Title with Link | Authors | Venue | Description | |------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Server-Side Fingerprint-Based Indoor Localization Using Encrypted Sorting | Andrew Quijano and Kemal Akkaya | IEEE MASS 2019 | This paper is implemented the library in this repository | | Efficient and Secure Comparison for On-Line Auctions | Ivan Damgaard, Martin Geisler, and Mikkel Kroigaard | Australasian conference on information security and privacy. | This paper is the first introduction to DGK. There is a correction to this paper listed here | | Improving the DGK comparison protocol | Thijis Veugen | 2012 IEEE International Workshop on Information Forensics and Security (WIFS) | This paper describes improvements to the DGK comparison protocol. Protocol 4 had a correction shown here | | Encrypted Integer Division | Thijis Veugen | 2010 IEEE International Workshop on Information Forensics and Security | This repository implements Protocol 2 for Encrypted Division | | Correction of a Secure Comparison Protocol for Encrypted Integers in IEEE WIFS 2012 | Baptiste Vinh Mau & Koji Nuida | 2012 IEEE International Workshop on Information Forensics and Security (WIFS) | This paper describes a secure multiplication protocol used in this repository | | A Secure and Optimally Efficient Multi-Authority Election Scheme | Ronald Cramer, Rosario Gennaro, Berry Schoenmakers | | This paper describes how El-Gamal was implemented in this repo | | Public-Key Cryptosystems Based on Composite Degree Residuosity Classes | Pascal Paillier | International conference on the theory and applications of cryptographic techniques | This paper is the original paper describing Paillier, which is how it is currently implemented as it has certain advantages over other variations |
The work to create this repository was initially funded by the US NSF REU Site at FIU under the grant number REU CNS-1461119.
License
Project status
The project is currently fully tested. Currently, the stretch goal is to implement certificates using the Bouncy Castle API for these homomorphic encryption systems.
Owner
- Name: Advanced Wireless and Security Lab
- Login: adwise-fiu
- Kind: organization
- Location: United States of America
- Repositories: 3
- Profile: https://github.com/adwise-fiu
ADWISE laboratory at Florida International University - Department of Electrical and Computer Engineering.
Citation (CITATION.cff)
cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Quijano"
given-names: "Andrew"
orcid: "https://orcid.org/0000-0002-6673-4934"
- family-names: "Akkaya"
given-names: "Kemal"
orcid: "https://orcid.org/0000-0002-7103-4545"
title: "Server-Side Fingerprint-Based Indoor Localization Using Encrypted Sorting"
version: 2.0.0
doi: 10.1109/MASSW.2019.00017
date-released: 2017-12-18
url: "https://github.com/AndrewQuijano/Homomorphic_Encryption"
preferred-citation:
type: conference
authors:
- family-names: "Quijano"
given-names: "Andrew"
orcid: "https://orcid.org/0000-0002-6673-4934"
- family-names: "Akkaya"
given-names: "Kemal"
orcid: "https://orcid.org/0000-0002-7103-4545"
journal: "IEEE 16th International Conference on Mobile Ad Hoc and Sensor Systems Workshops"
month: 11
start: 53 # First page number
end: 57 # Last page number
title: "Server-Side Fingerprint-Based Indoor Localization Using Encrypted Sorting"
issue: 1
volume: 1
year: 2019
GitHub Events
Total
- Create event: 12
- Issues event: 1
- Release event: 8
- Watch event: 7
- Delete event: 4
- Push event: 35
- Pull request event: 9
Last Year
- Create event: 12
- Issues event: 1
- Release event: 8
- Watch event: 7
- Delete event: 4
- Push event: 35
- Pull request event: 9
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
repo1.maven.org: io.github.andrewquijano:ciphercraft
This is a library that implements partially homomorphic encryption algorithms: Paillier, ElGamal, and DGK. This also implements various two-party protocols for secure computation such as multiplication, division and comparison
- Homepage: https://github.com/adwise-fiu/Homomorphic_Encryption
- Documentation: https://appdoc.app/artifact/io.github.andrewquijano/ciphercraft/
- License: MIT License
-
Latest release: 1.0.6
published 7 months ago
Rankings
Dependencies
- actions/checkout v2 composite
- gradle/gradle-build-action v2 composite