Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markxoe/espsign.ts
ESP32 Secure Boot V2 Signing and AES-XTS Encryption in TypeScript (e.g. for OTA-Servers)
https://github.com/markxoe/espsign.ts
esp32 ota typescript
Last synced: about 1 month ago
JSON representation
ESP32 Secure Boot V2 Signing and AES-XTS Encryption in TypeScript (e.g. for OTA-Servers)
- Host: GitHub
- URL: https://github.com/markxoe/espsign.ts
- Owner: markxoe
- License: mit
- Created: 2023-03-31T10:30:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-11T19:39:58.000Z (over 1 year ago)
- Last Synced: 2024-09-29T10:41:02.902Z (about 2 months ago)
- Topics: esp32, ota, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/espsign
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# espsign.ts
Secure Boot V2 signing implemented in typescript.
Sign ESP32 images for Secure Boot V2 RSA (e.g. for secure OTA updates).
Note: The tests use espsecure.py to verify the functionality
Note: espsign currently does not recognize existing signature blocks
## Examples
espsecure command: `espsecure.py sign_data firmware.bin -v 2 -k key1.pem -o out.bin`
```ts
import espsign from "espsign";const output = espsign.composeSignature(fs.readFileSync("firmware.bin"), [
fs.readFileSync("key1.pem").toString(),
]);fs.writeFileSync("out.bin", output);
```espsecure command: `espsecure.py digest_sbv2_public_key -k key1.pem -o out.bin`
```ts
import espsign from "espsign";const output = espsign.getKeyDigest(fs.readFileSync("key1.pem").toString());
fs.writeFileSync("out.bin", Buffer.from(output, "hex"));
```