Meshtastic device firmware
Go to file
Jonathan Bennett b726792efd Re-implement PKI from #1509 (#4379)
* Re-implement PKI from #1509
co-authored-by: edinnen <ethanjdinnen@protonmail.com>

* Set the key lengnth to actually make PKI work.

* Remove unused variable and initialize keys to null

* move printBytes() to meshUtils

* Don't reset PKI key son reboot unless needed.

* Remove double encryption for PKI messages

* Cleanup encrypt logic

* Add the MESHTASTIC_EXCLUDE_PKI option, and set it for minimal builds. Required for STM32 targets for now.

* Use SHA-256 for PKI key hashing, and add MESHTASTIC_EXCLUDE_PKI_KEYGEN for STM32

* Fix a crash when node is null

* Don't send PKI encrypted packets while licensed

* use chIndex 8 for PKI

* Don't be so clever, that you corrupt incoming packets

* Pass on channel 8 for now

* Typo

* Lock keys once non-zero

* We in fact need 2 scratch buffers, to store the encrypted bytes, unencrypted bytes, and decoded protobuf.

* Lighter approach to retaining known key

* Attach the public key to PKI decrypted packets in device memory

* Turn PKI back off for STM32 :(

* Don't just memcp over a protobuf

* Don't PKI encrypt nodeinfo packets

* Add a bit more memory logging around nodeDB

* Use the proper macro to refer to NODENUM_BROADCAST

* Typo fix

* Don't PKI encrypt ROUTING (naks and acks)

* Adds SecurityConfig protobuf

* Add admin messages over PKI

* Disable PKI for the WIO-e5

* Add MINIMUM_SAFE_FREE_HEAP macro and set to safe 1.5k

* Add missed "has_security"

* Add the admin_channel_enabled option

* STM32 again

* add missed configuration.h at the top of files

* Add EXCLUDE_TZ and RTC

* Enable PKI build on STM32 once again

* Attempt 1 at moving PKI to aes-ccm

* Fix buffers for encrypt/decrypt

* Eliminate unused aes variable

* Add debugging lines

* Set hash to 0 for PKI

* Fix debug lines so they don't print pointers.

* logic fix and more debug

* Rather important typo

* Check for short packets before attempting decrypt

* Don't forget to give cryptoEngine the keys!

* Use the right scratch buffer

* Cleanup

* moar cleanups

* Minor hardening

* Remove some in-progress stuff

* Turn PKI back off on STM32

* Return false

* 2.5 protos

* Sync up protos

* Add initial cryptography test vector tests

* re-add MINIMUM_SAFE_FREE_HEAP

* Housekeeping and comment fixes

* Add explanatory comment about weak dh25519 keys

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-08-13 18:43:19 -05:00
.github Just literally trying stuff at this point 2024-07-29 06:52:14 -05:00
.trunk Update trunk.yaml 2024-07-10 14:39:41 -05:00
.vscode tell vscode, if formatting, use whatever our trunk formatter wants (#4186) 2024-06-27 13:14:16 -05:00
arch Re-implement PKI from #1509 (#4379) 2024-08-13 18:43:19 -05:00
bin Use sys.executable to refer to python. (#4402) 2024-08-06 06:48:05 -05:00
boards Initial Support for Heltec VM-T190 (#4391) 2024-08-06 13:59:33 -05:00
data/static Bundle WebUI (#878) 2021-10-09 17:15:12 +11:00
extra_scripts Fixes for #4395: nrf52 flash filesystem reliability (#4406) 2024-08-13 06:45:39 -05:00
images remove hard to maintain system-info bootloader 2022-10-01 09:50:16 +02:00
monitor Fixes for #4395: nrf52 flash filesystem reliability (#4406) 2024-08-13 06:45:39 -05:00
protobufs@778667d93b Protos 2024-08-13 18:43:17 -05:00
release don't keep uf2 files in source control 2020-08-21 09:37:41 -07:00
src Re-implement PKI from #1509 (#4379) 2024-08-13 18:43:19 -05:00
test/test_crypto Re-implement PKI from #1509 (#4379) 2024-08-13 18:43:19 -05:00
variants More explicit guards for attempting to set RTC (#4452) 2024-08-13 06:56:20 -05:00
.gitattributes trunk roundhouse kick 2023-01-21 21:23:24 +01:00
.gitignore Native Webserver (#3343) 2024-03-06 16:23:04 -06:00
.gitmodules revert protobuf change to develop 2022-11-26 16:03:17 +01:00
.semgrepignore Fix de/compression buffer overflows in TAK packets (#4317) 2024-07-23 06:16:53 -05:00
docker-compose.yml trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Dockerfile Fix that Dockerfile would not run with podman (#4262) 2024-07-13 06:09:51 -05:00
LICENSE move my bt experiment into its own repo (about to remove ttn) 2020-02-01 08:30:53 -08:00
partition-table.csv - new Bootloader for ESP-IDF 4.2 2022-09-26 22:42:58 +02:00
platformio.ini Re-implement PKI from #1509 (#4379) 2024-08-13 18:43:19 -05:00
pyocd.yaml Add semihosting support for nrf52 devices (#4137) 2024-06-24 10:27:37 -05:00
README.md Update README.md 2023-10-09 22:30:02 +10:00
suppressions.txt Cpp-check warnings cleanup (#3014) 2023-12-14 07:35:46 -06:00
userPrefs.h Re-implement PKI from #1509 (#4379) 2024-08-13 18:43:19 -05:00
version.properties [create-pull-request] automated change (#4409) 2024-08-09 06:35:26 -05:00

Meshtastic Firmware

GitHub release downloads CI CLA assistant Fiscal Contributors Vercel

Overview

This repository contains the device firmware for the Meshtastic project.

Stats

Alt