-
Notifications
You must be signed in to change notification settings - Fork 82
MOSIP-36428: ecc algorithms encryption support #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nagendra0721
wants to merge
13
commits into
mosip:develop
Choose a base branch
from
nagendra0721:dev-eccSupport
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
adc8ac6
MOSIP-36428: ecc encryption support
nagendra0721 9c68c30
MOSIP-36428: ecc support test case correction
nagendra0721 836b324
MOSIP-36428: ecc algorithm support
nagendra0721 9b2c00f
MOSIP-36428: ecc encryption support
nagendra0721 eb4b78d
MOSIP-36428: ecc encryption support
nagendra0721 0e2546c
MOSIP-36428: test case failure fix
nagendra0721 6fb3ab5
MOSIP-36428: code rabit fix
nagendra0721 5ad0c58
MOSIP-36428: test case failure fix
nagendra0721 089a0b6
MOSIP-36428: code rabbit fix
nagendra0721 a7089ff
MOSIP-36428: test case failure fix
nagendra0721 1595ab7
MOSIP-36428: test case failure fix
nagendra0721 90ba185
MOSIP-36428: test case failure fix
nagendra0721 7f9793b
MOSIP-36428:Ecc Encrytpion support
nagendra0721 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
42 changes: 42 additions & 0 deletions
42
...r-service/src/main/java/io/mosip/kernel/cryptomanager/service/EcCryptomanagerService.java
This file contains hidden or 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,42 @@ | ||
| package io.mosip.kernel.cryptomanager.service; | ||
|
|
||
| import java.security.PrivateKey; | ||
| import java.security.PublicKey; | ||
|
|
||
| public interface EcCryptomanagerService { | ||
|
|
||
| /** | ||
| * | ||
| * Encrypts data using an asymmetric EC public key. | ||
| * | ||
| * @param publicKey the public key to use for encryption | ||
| * @param data the data to encrypt | ||
| * @param iv the initialization vector (IV) for encryption | ||
| * @param aad additional authenticated data (AAD) | ||
| * @return the encrypted data | ||
| */ | ||
| public byte[] asymmetricEcEncrypt(PublicKey publicKey, byte[] data, byte[] iv, byte[] aad, String algorithmName); | ||
|
|
||
| /** | ||
| * | ||
| * Encrypts data using an asymmetric EC public key with a specified curve name. | ||
| * | ||
| * @param publicKey the public key to use for encryption | ||
| * @param data the data to encrypt | ||
| * @param curveName the name of the elliptic curve used | ||
| * @return the encrypted data | ||
| */ | ||
| public byte[] asymmetricEcEncrypt(PublicKey publicKey, byte[] data, String curveName); | ||
|
|
||
| /** | ||
| * | ||
| * Decrypts data using an asymmetric EC private key. | ||
| * | ||
| * @param privateKey the private key to use for decryption | ||
| * @param data the data to decrypt | ||
| * @param aad additional authenticated data (AAD) | ||
| * @param curveName the name of the elliptic curve used | ||
| * @return the decrypted data | ||
| */ | ||
| public byte[] asymmetricEcDecrypt(PrivateKey privateKey, byte[] data, byte[] aad, String curveName); | ||
| } |
278 changes: 174 additions & 104 deletions
278
...ce/src/main/java/io/mosip/kernel/cryptomanager/service/impl/CryptomanagerServiceImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
333 changes: 333 additions & 0 deletions
333
.../src/main/java/io/mosip/kernel/cryptomanager/service/impl/EcCryptomanagerServiceImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.