PSACrypto is an ESPRESSIF ESP32 component that implements the cryptography functionality of the Platform Security Architecture (PSA) API. It provides a standardized and easy-to-use interface for cryptographic operations on ESP32 boards, ensuring secure communication, data integrity, and confidentiality.
PSACrypto is designed specifically for building Decentralized Physical Infrastructure Networks (DePIN) projects. To find more examples of the DePIN project, you can explore DePIN Scan.
- Secure Key Generation: Generate secure cryptographic keys for various algorithms.
- Hash Functions: Compute hash values using cryptographic hash functions.
- Symmetric Encryption: Encrypt and decrypt data using symmetric encryption algorithms.
- Asymmetric Encryption: Perform public key encryption and decryption operations.
- Random Number Generation: Generate random numbers for secure cryptographic operations.
To install the PSACrypto library using the Espressif IDE, follow these steps:
- Open the Espressif IDE.
- Right click on your project.
- Select Install ESP-IDF components from the menu list.
- The Install components window will open, showing a list of available libraries.
- In the search bar, type "PSACrypto" and press Enter.
- Locate the "PSACrypto" library in the search results.
- Click on the library entry to open its details.
- Click the "Install" button to install the library.
- Wait for the installation process to complete.
- After installation, close the Library Manager window.
- The PSACrypto library is now installed and ready to be used.
To install the PSACrypto library manually, follow these steps:
- Download the PSACrypto library from the GitHub repository.
- Extract the downloaded ZIP file.
- Rename the extracted folder to "PSACrypto".
- Move the "PSACrypto" folder to your project's components directory. The default locations are:
- Start or restart the IDE.
- You can now include the library in your project and use its features.
To install the PSACrypto library using PlatformIO, follow these steps:
- Create a new PlatformIO project or open an existing one.
- Open the
platformio.ini
file located in the root of your project. - Add the following line to the
[env:<your_board>]
section:
lib_deps =
PSACrypto
Replace <your_board> with the target board/platform for your project (e.g., esp32, arduino_due, etc.).
- Save the platformio.ini file.
- PlatformIO will automatically install the PSACrypto library and its dependencies when you build/upload your project.
- Open the Espressif IDE.
- Go to File > Import > Espressif > Existing IDF Project to access the example projects.
- Select an example project to open it.
- Modify the project as needed to fit your requirements.
- Build & Upload the project to your ESP board.
- Open the Serial Monitor to view the output.
- Open your PlatformIO project.
- Navigate to the src folder.
- Create a new .cpp file or open an existing one.
- Include the PSACrypto library by adding the following line at the top of your file:
# include <PSACrypto.h>
For detailed information on using the PSACrypto library, including usage examples and API reference, please refer to the Documentation.
The PSACrypto library has been tested and is compatible with the following hardware:
- ESP32
Please note that the library may also work with other Arduino-compatible boards, but it has specifically been tested and verified with the above-mentioned hardware.
It's recommended to check the official documentation of your specific board or consult the manufacturer's specifications to ensure compatibility with the PSACrypto library.
Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md to contribute to this project.
This library is licensed under Apache License 2.0. See the LICENSE file for more information.