GET /v1/rsa-cryptRSA encrypt/decrypt
Security Utils lf-security-utils
Locks or unlocks a message using a matched pair of public and private keys. Performs RSA-OAEP encryption and decryption with SHA-256. Supports key generation, encryption, and decryption operations.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | keygen/encrypt/decrypt |
input | string | No | Plaintext or ciphertext |
key_size | integer | No | Key size in bits |
Response Schema
success (boolean): Operation success
mode (string): Operation performed
public_key (string): Hex public key
private_key (string): Hex private key
ciphertext (string): Encrypted output
plaintext (string): Decrypted output
cURL Example
curl 'https://lf-security-utils.laminarforge.dev/v1/rsa-crypt?mode=keygen&key_size=2048' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-security-utils.laminarforge.dev/v1/rsa-crypt'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'mode': 'keygen', 'key_size': 2048}
response = requests.get(url, headers=headers, params=params)
print(response.json())