-
Notifications
You must be signed in to change notification settings - Fork 302
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
Replace fidelius with a python alternative #1871
Comments
Would love to work on this under gsoc. @khavinshankar |
Hey everyone, Thank you for showing interest in the projects. I would like to inform you that we have scheduled EOD calls on Zoom from Monday to Saturday at 7:30 PM to discuss your work and address any doubts with the core team. Alternatively, feel free to use our #care_general Slack channel. The meeting links will be shared in our #reminder channel in our Slack workspace. Link to join the Slack: Slack Workspace Meanwhile, please explore the care platform and familiarize yourself with its features. Feel free to play around with it and assign any open issues as you see fit. |
Hey @khavinshankar i really wanna contribute in this project 💯 |
Here are some previous research done on this issue by @Ashesh3, Paper: https://www.iacr.org/cryptodb/archive/2006/PKC/3351/3351.pdf RFC: https://datatracker.ietf.org/doc/html/rfc7748#section-4.1 Java: C#: Seems like the Java library uses the Weierstrass form, rather than the Montgomery curve mentioned originally in the paper, whereas their c# library uses Montgomery curve by default. ( Source: bcgit/bc-java#399 ) We need a manual curve if we want to use Weierstrass form in their c# library: https://github.com/bcgit/bc-csharp/blob/master/crypto/test/src/crypto/test/ECTest.cs#L748-L753 since it uses Montgomery curve (a=486662) by default. If we can get Montgomery form of the Curve25519 working by using a custom EC curve we can replicate the fidelius enc/dec. This library could help: https://github.com/alexmgr/tinyec#working-on-custom-curves I was unable to find the above in a python library, most use openssl's built in implementation which do not match the parameters we need. The link sent above ( https://github.com/cslashm/ECPy/blob/master/src/ecpy/curve_defs.py#L472 ) for Curve25519 MONTGOMERY has a mismatching 'b' value with the Java Curve25519, hence won't work in our case, unless we can edit it and use it as a custom curve. For anyone who takes this in future, basically this is what you need implemented in Python: |
To encrypt and decrypt using existing fedelius service, Try these following steps:
{
"receiverPublicKey": "receiverKeyPairResponse.publicKey",
"receiverNonce": "receiverKeyPairResponse.nonce",
"senderPrivateKey": "senderKeyPairResponse.privateKey",
"senderPublicKey": "senderKeyPairResponse.publicKey",
"senderNonce": "senderKeyPairResponse.nonce",
"plainTextData": "hello world"
}
{
"receiverPrivateKey": "receiverKeyPairResponse.privateKey",
"receiverNonce": "receiverKeyPairResponse.nonce",
"senderPublicKey": "decryptResponse.keyToShare",
"senderNonce": "senderKeyPairResponse.nonce",
"encryptedData": "decryptResponse.encryptedData"
} |
Project Detail
CARE is a centralized capacity management and patient management system, central to the 10BedICU Project, integrating patients, doctors, hospitals, labs, specialized treatment centers, hospital administrators, and shifting control cells. Hospitals update crucial information about their assets, providing district administration with a comprehensive view of the healthcare system via smart dashboards. CARE digitizes patient records, streamlines workflows for pandemic management, and is deployed in remote areas, enabling TeleICU services for underserved citizens. It revolutionizes healthcare management, enhancing efficiency, accessibility, and patient outcomes.
Features To Be Implemented
fidelius
service in Python.Basically, we need the following 3 features to be implemented in python 3.
Fidelius is used in 2 places, decrypting the incoming data from ABDM and encrypting the outgoing data.
You can use any existing standard python packages to facilitate this.
Context
We are currently using a service called
fidelius
as a docker container for encrypting and decrypting data. It's used while sending and receiving data through ABDM (Ayushman Bharat Digital Mission or ABDM is a government initiative similar to UPI for exchanging medical records between entities.).ABDM expects the data to be encrypted and decrypted in a certain way. You can read more about the ABDM specifications here: https://sandbox.abdm.gov.in/abdm-docs/EncryptionAndDecryptionData
Supportive Materials
These material (threads) discuss the issues with python implementation:
Learning Path
Link to documentation for Product Set-Up
Acceptance Criteria
Milestone
The text was updated successfully, but these errors were encountered: