Create a JWE
Learn how to encrypt sensitive data
On this page· 11 sections
If you are unable to implement JWE encryption in your own systems, you can use Figure's Encryption API to encrypt payloads on your behalf without any cryptographic setup.
1. Setting up for JWE#
Libraries and tools#
To use JWE, you need appropriate libraries for your development environment. We recommend Nimbus JOSE+JWT for Java/Kotlin.
2. Creating a JWE#
The following example shows how to use the Nimbus library to create a JWE token with RSA-OAEP-256 encryption and A256GCM content encryption.
3. Sending encrypted data to Figure's API#
A JWE request requires a specific request body:
{ "encrypted": "<your-jwe-encrypted-request>" }
Example API request#
4. Decrypting a JWE (for reference)#
5. Best practices#
Security considerations#
- Key Management: Store keys securely and rotate them regularly.
- Encryption Algorithms: Use strong, industry-standard algorithms (e.g., RSA-OAEP-256, A256GCM).
- Regular Updates: Keep your libraries and tools up to date to benefit from the latest security patches.
Debugging tips#
- Verify the correctness of your JWE header and payload.
- Ensure the recipient's public key is correctly configured for encryption.
6. Additional resources#
Conclusion#
By following this guide, you will help us maintain the highest standards of security for data exchanged with Figure's API. We appreciate your commitment to protecting sensitive information and look forward to successful and secure integrations. If you need further assistance or specific examples, feel free to ask!