Prototype of identity-based encryption based on Boneh-Franklin scheme, leveraging gnark-crypto library.
go build
./id-based-encryption
./id-based-encryption -mode tpgk
GET /master-public-key
POST /encrypt
{
"Id": "[email protected]",
"Plaintext": "test"
}
POST /decrypt
{
"UserPrivKey": "04d1...",
"Ciphertext": "7b22..."
}
GET /master-public-key
POST /extract
{
"Id": "[email protected]"
}