espressif_idf-extra-components/esp_encrypted_img
MacDue 8486f8bddb esp_encrypted_img: make code const-correct
`pre_enc_decrypt_arg_t.data_in` is not modified so can be const
2022-03-10 16:09:58 +00:00
..
include esp_encrypted_img: make code const-correct 2022-03-10 16:09:58 +00:00
src esp_encrypted_img: make code const-correct 2022-03-10 16:09:58 +00:00
test pre-commit: format code 2022-03-08 11:11:36 +00:00
tools esp_encrypted_img: use 'wb' file mode instead of 'ab' in encrypt tool 2022-03-08 09:33:12 +00:00
CMakeLists.txt Add esp_encrypted_img to component manager 2022-02-15 12:01:47 +05:30
LICENSE Add esp_encrypted_img to component manager 2022-02-15 12:01:47 +05:30
README.md esp_encrypted_img: fix doc comments and readme formatting 2022-03-09 12:58:17 +00:00
idf_component.yml esp_encrypted_img: make code const-correct 2022-03-10 16:09:58 +00:00
image_format.png Add esp_encrypted_img to component manager 2022-02-15 12:01:47 +05:30
project_include.cmake Add esp_encrypted_img to component manager 2022-02-15 12:01:47 +05:30

README.md

ESP Encrypted Image Abstraction Layer

This component provides an API interface to decrypt data defined in "ESP Encrypted Image" format. This format is as specified at Image Format

This component can help in integrating pre encrypted firmware in over-the-air updates. Additionally, this component can also be used for other use-cases which requires addition of encryption layer for custom data.

Image Format

Image Format

typedef struct {
    char magic[4];
    char enc_gcm[384];
    char iv[16];
    char bin_size[4];
    char auth[16];
    char extra_header[88];
} pre_enc_bin_header;

The above struct represents encrypted image header.

Note:

  • RSA-3072 key is provided to the tool externally. You can generate RSA key pair using following command:

    openssl genrsa -out rsa_key/private.pem 3072

  • AES-GCM key and IV are generated by the tool itself.

Tool Info

This component also contains tool (esp_enc_img_gen.py) to generate encrypted images using RSA3072 public key.

To know more about the tool, use command: python esp_enc_img-gen.py --help

API Reference

To learn more about how to use this component, please check API Documentation from header file esp_encrypted_img.h