espilon-source/tools/C3PO/proto/c2_pb2.py
Eun0us 8b6c1cd53d ε - ChaCha20-Poly1305 AEAD + HKDF crypto upgrade + C3PO rewrite + docs
Crypto:
- Replace broken ChaCha20 (static nonce) with ChaCha20-Poly1305 AEAD
- HKDF-SHA256 key derivation from per-device factory NVS master keys
- Random 12-byte nonce per message (ESP32 hardware RNG)
- crypto_init/encrypt/decrypt API with mbedtls legacy (ESP-IDF v5.3.2)
- Custom partition table with factory NVS (fctry at 0x10000)

Firmware:
- crypto.c full rewrite, messages.c device_id prefix + AEAD encrypt
- crypto_init() at boot with esp_restart() on failure
- Fix command_t initializations across all modules (sub/help fields)
- Clean CMakeLists dependencies for ESP-IDF v5.3.2

C3PO (C2):
- Rename tools/c2 + tools/c3po -> tools/C3PO
- Per-device CryptoContext with HKDF key derivation
- KeyStore (keys.json) for master key management
- Transport parses device_id:base64(...) wire format

Tools:
- New tools/provisioning/provision.py for factory NVS key generation
- Updated flasher with mbedtls config for v5.3.2

Docs:
- Update all READMEs for new crypto, C3PO paths, provisioning
- Update roadmap, architecture diagrams, security sections
- Update CONTRIBUTING.md project structure
2026-02-10 21:28:45 +01:00

30 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: c2.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import builder as _builder
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x08\x63\x32.proto\x12\x02\x63\x32\"T\n\x07\x43ommand\x12\x11\n\tdevice_id\x18\x01 \x01(\t\x12\x14\n\x0c\x63ommand_name\x18\x02 \x01(\t\x12\x0c\n\x04\x61rgv\x18\x03 \x03(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x83\x01\n\x0c\x41gentMessage\x12\x11\n\tdevice_id\x18\x01 \x01(\t\x12\x1e\n\x04type\x18\x02 \x01(\x0e\x32\x10.c2.AgentMsgType\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x06 \x01(\x08*d\n\x0c\x41gentMsgType\x12\x0e\n\nAGENT_INFO\x10\x00\x12\x0f\n\x0b\x41GENT_ERROR\x10\x01\x12\x0e\n\nAGENT_DATA\x10\x02\x12\r\n\tAGENT_LOG\x10\x03\x12\x14\n\x10\x41GENT_CMD_RESULT\x10\x04\x62\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'c2_pb2', globals())
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_AGENTMSGTYPE._serialized_start=236
_AGENTMSGTYPE._serialized_end=336
_COMMAND._serialized_start=16
_COMMAND._serialized_end=100
_AGENTMESSAGE._serialized_start=103
_AGENTMESSAGE._serialized_end=234
# @@protoc_insertion_point(module_scope)