Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: support Host-Generated Flash Encryption and Release Mode (VSC-1017) #853

Open
chipweinberger opened this issue Dec 9, 2022 · 7 comments
Labels
Feature / Enhancement Request Request for Feature/ Enhancement ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot

Comments

@chipweinberger
Copy link

chipweinberger commented Dec 9, 2022

related: espressif/esptool#809
espressif/esp-idf#10340

Backgound

Docs: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/security/flash-encryption.html#manual-encryption

ESP-IDF has 2 flash encryption modes:

  • release
  • development

Problem

Release mode is not supported by the VSC ESP-IDF Extension, even if we have a Host Generated key.

Currently in Release Mode, VSC Flash Command just completely fails:

A fatal error occurred: Detecting flash size is not supported in secure download mode. Need to manually specify flash size.

@chipweinberger chipweinberger added the Feature / Enhancement Request Request for Feature/ Enhancement label Dec 9, 2022
@github-actions github-actions bot changed the title [Feature Request]: support Host-Generated Flash Encryption [Feature Request]: support Host-Generated Flash Encryption (VSC-1017) Dec 9, 2022
@chipweinberger
Copy link
Author

chipweinberger commented Dec 9, 2022

A fatal error occurred: Detecting flash size is not supported in secure download mode. Need to manually specify flash size.

This is despite my Flash Size being specified in my Menu Config.

Screen Shot 2022-12-08 at 11 16 58 PM

@chipweinberger chipweinberger changed the title [Feature Request]: support Host-Generated Flash Encryption (VSC-1017) [Feature Request]: support Host-Generated Flash Encryption and Release Mode (VSC-1017) Dec 9, 2022
@github-actions
Copy link

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Dec 27, 2022
@github-actions github-actions bot closed this as completed Jan 1, 2023
@brianignacio5 brianignacio5 reopened this May 17, 2023
@chipweinberger
Copy link
Author

@brianignacio5 appreciate you taking a look at this again.

Just to provide more thoughts, I'm thinking:

  • the user would have to specify an aes key file
  • vsc would encrypt the binary using this key and esp-secure.py
  • vsc would upload the encrypted binary

@brianignacio5
Copy link
Collaborator

Sorry this was automatically closed by the bot, This could be a nice feature plan but a bit dangerous for beginner users so need to consider some validations as well.

Thank you for the thoughts, will think of feature action plan for this and decide with IDF team a good course of action. Will tag any work done related to this.

@chipweinberger
Copy link
Author

chipweinberger commented May 17, 2023

No problem. No rush! This is low priority for me now, as I made my own flashing tool to handle this. But it would have been convenient to have VSC support it directly.

@github-actions github-actions bot removed the stale Stale PR or Issue label May 18, 2023
@github-actions
Copy link

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Jun 12, 2023
@brianignacio5 brianignacio5 added ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot and removed stale Stale PR or Issue labels Jun 19, 2023
@brianignacio5 brianignacio5 reopened this Jun 19, 2023
@chipweinberger
Copy link
Author

chipweinberger commented Dec 31, 2023

I'm getting closer to production, and this feature would be very useful.

  • I want to use production devices for ongoing development
  • production devices use a host generated flash encryption key

This means i lose the ability to push the "flash" button in vscode, which is annoying!

Perhaps I can rig up the "run custom command button" myself as a workaround. 😀 Thanks again for adding that.

That said, i think this feature would be very simple to implement? Like 1 day of work maximum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature / Enhancement Request Request for Feature/ Enhancement ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot
Projects
None yet
Development

No branches or pull requests

2 participants