|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Namespaces | |
| namespace | openpgp |
Classes | |
| struct | gpg_status_t |
| Snapshot of the current OpenPGP card-application state for UI display. More... | |
| class | GpgModule |
| struct | gpg_recv_key_t |
| One GPG public key received from another badge. More... | |
| struct | gpg_recv_index_entry_t |
| Sort entry used to expose a stable ordered index over NVS keys. More... | |
| class | GpgRecvStore |
| NVS-backed store for cross-sign target keys received via BLE. More... | |
| struct | WizardState |
| struct | DecKeyStorage |
| struct | AesKeyStorage |
Typedefs | |
| using | XsigReceivedCallback = void (*)(const gpg_recv_key_t& key) |
| Callback invoked when a remote badge has finished pushing a key. | |
Enumerations | |
| enum | GpgMenuAction : uintptr_t { GPG_MENU_STATUS = 1 , GPG_MENU_GENERATE , GPG_MENU_EXPORT , GPG_MENU_SEND , GPG_MENU_RECEIVED , GPG_MENU_SETTINGS , GPG_MENU_RESET } |
Functions | |
| bool | ble_gpg_xsig_init () |
| Initialise the GPG cross-sign BLE endpoint. | |
| void | ble_gpg_xsig_set_received_callback (XsigReceivedCallback cb) |
| Install / remove the "key received" notification. | |
| bool | ble_gpg_xsig_send (const uint8_t addr[6], uint8_t addr_type) |
| Push the badge's own public key to a peer. | |
| static void | registerStrings () |
| static void | cmd_gpg_status (const char *args) |
| Serial command printing current GPG key status. | |
| static void | cmd_gpg_generate (const char *args) |
| Serial command generating GPG key with selected curve and user-id. | |
| static void | cmd_gpg_export (const char *args) |
| Serial command exporting GPG public key in PEM format. | |
| static void | cmd_gpg_reset (const char *args) |
| static void | cmd_gpg_recv_list (const char *args) |
| static void | cmd_gpg_recv_info (const char *args) |
| static void | cmd_gpg_recv_delete (const char *args) |
| static void | cmd_gpg_cross_sign (const char *args) |
| static void | cmd_gpg_export_signed (const char *args) |
| static void | cmd_gpg (const char *args) |
| static void | registerCommands () |
| Registers serial commands exposed by GPG module. | |
| static void | fp_to_hex (const uint8_t *fp, size_t len, char *out, size_t out_size) |
| static bool | parse_index (const char *args, uint8_t *out) |
| static void | showStatus () |
| Displays current GPG key status and metadata. | |
| static void | wizardStart () |
| Starts key-generation wizard flow. | |
| static void | showExport () |
| Exports public key to serial output and QR view. | |
| static void | confirmReset () |
| Opens reset confirmation dialog. | |
| static void | showSettings () |
| Shows GPG settings menu. | |
| static void | onSettingsSelect (uint16_t index, void *) |
| Handles settings-menu selection for PW1/PW3 change flow. | |
| static void | showSendKey () |
| static void | showReceivedKeys () |
| static void | onMenuSelect (uint16_t, void *userData) |
| Handles GPG main-menu selections via the entry's userData tag. | |
| static ui::ListItem | makeMenuItem (const char *label, GpgMenuAction action) |
| static void | rebuildMenu () |
| Rebuilds GPG main menu labels and populates userData tags. | |
| static bool | gpg_verify_pw1 (const char *pin) |
| Verifies OpenPGP PW1 using persistent pin-storage backend. | |
| static bool | gpg_verify_pw3 (const char *pin) |
| Verifies OpenPGP PW3 using persistent pin-storage backend. | |
| static bool | gpg_change_pw1 (const char *, const char *newPin) |
| Changes OpenPGP PW1 value. | |
| static bool | gpg_change_pw3 (const char *, const char *newPin) |
| Changes OpenPGP PW3 value. | |
| static uint8_t | gpg_retries_pw1 () |
| Returns remaining retries for OpenPGP PW1. | |
| static uint8_t | gpg_retries_pw3 () |
| Returns remaining retries for OpenPGP PW3. | |
| static bool | gpg_blocked_pw1 () |
| Returns whether OpenPGP PW1 is blocked. | |
| static bool | gpg_blocked_pw3 () |
| Returns whether OpenPGP PW3 is blocked. | |
| static void | onGpgPinComplete (bool) |
| Pin-change completion callback returning to previous view. | |
| static void | onWizardName (const char *text) |
| Saves wizard name and opens email step. | |
| static void | onWizardEmail (const char *text) |
| Saves wizard email and opens curve selection. | |
| static void | onWizardCurve (uint16_t index, void *) |
| Finalizes wizard curve selection and triggers key generation. | |
| static void | onResetConfirm (void *) |
| Confirm callback resetting all GPG key material. | |
| static void | rebuildReceivedList () |
| static void | onReceivedListSelect (uint16_t index, void *) |
| static void | showReceivedDetail () |
| static void | onReceivedActionSelect (uint16_t index, void *) |
| static void | onReceivedSignConfirm (void *) |
| static void | onReceivedDeleteConfirm (void *) |
| bool | calculateFingerprintV4 (uint8_t curve, const uint8_t *pubkey, size_t pubkey_len, uint32_t created_at, uint8_t out_fp[20]) |
| Compute the RFC 4880 V4 OpenPGP fingerprint (SHA-1, 20 bytes). | |
| bool | calculateFingerprintV5 (uint8_t curve, const uint8_t *pubkey, size_t pubkey_len, uint32_t created_at, uint8_t out_fp[32]) |
| Compute the V5 / RFC 9580 OpenPGP fingerprint (SHA-256, 32 bytes). | |
| bool | gpgCrossSignDigest (const uint8_t fp_v4[20], const char *user_id, uint8_t out_hash[32]) |
| Build the digest input for a cross-signature. | |
| bool | gpgCrossSign (const gpg_recv_key_t &target, uint32_t sig_creation_time, uint8_t out_sig[64]) |
| Cross-sign a received key with the badge's own SIG ECC slot. | |
| bool | gpgBuildSignedKeyArmored (const gpg_recv_key_t &key, char *out, size_t out_size, size_t *out_len) |
| Build an ASCII-armored OpenPGP block carrying the cross-signed key. | |
Sender state machine: we discover the peer's RX handle, then write the payload in MTU-sized chunks.
| using cdc::mod_gpg::XsigReceivedCallback = void (*)(const gpg_recv_key_t& key) |
Callback invoked when a remote badge has finished pushing a key.
The key has already been written through GpgRecvStore::addKey() before this callback fires; consumers use it to refresh UI state.
Definition at line 15 of file ble_gpg_xsig.h.
| enum cdc::mod_gpg::GpgMenuAction : uintptr_t |
| Enumerator | |
|---|---|
| GPG_MENU_STATUS | |
| GPG_MENU_GENERATE | |
| GPG_MENU_EXPORT | |
| GPG_MENU_SEND | |
| GPG_MENU_RECEIVED | |
| GPG_MENU_SETTINGS | |
| GPG_MENU_RESET | |
Definition at line 389 of file GpgModule.cpp.
| bool cdc::mod_gpg::ble_gpg_xsig_init | ( | ) |
Initialise the GPG cross-sign BLE endpoint.
Registers the GATT service on the badge so peers can push their public key. Idempotent. Returns true if the service is up.
Definition at line 254 of file ble_gpg_xsig.cpp.
References cdc::hal::GattServiceDef::characteristics, cdc::hal::BleUuid::from128(), cdc::hal::getBluetoothControllerInstance(), LOG_I, LOG_W, cdc::hal::GattProp::NOTIFY, cdc::hal::GattServiceDef::numCharacteristics, cdc::hal::GattCharacteristic::onRead, cdc::hal::GattCharacteristic::onWrite, cdc::hal::GattCharacteristic::permissions, cdc::hal::GattCharacteristic::properties, cdc::hal::GattProp::READ, cdc::hal::GattPerm::READ_ENC, s_initialized, TAG, cdc::hal::GattCharacteristic::uuid, cdc::hal::GattServiceDef::uuid, cdc::hal::GattCharacteristic::valueHandle, cdc::hal::GattProp::WRITE, and cdc::hal::GattPerm::WRITE_ENC.
Referenced by cdc::mod_gpg::GpgModule::start().
| bool cdc::mod_gpg::ble_gpg_xsig_send | ( | const uint8_t | addr[6], |
| uint8_t | addr_type ) |
Push the badge's own public key to a peer.
Establishes a connection to addr, discovers the GPG cross-sign service, writes the key payload to the RX characteristic and disconnects.
The badge's own key is built from gpg_get_status(); if no GPG key is configured the call returns false.
Definition at line 398 of file ble_gpg_xsig.cpp.
References cdc::hal::BleUuid::from128(), and cdc::hal::getBluetoothControllerInstance().
| void cdc::mod_gpg::ble_gpg_xsig_set_received_callback | ( | XsigReceivedCallback | cb | ) |
Install / remove the "key received" notification.
Definition at line 292 of file ble_gpg_xsig.cpp.
Referenced by cdc::mod_gpg::GpgModule::start().
| bool cdc::mod_gpg::calculateFingerprintV4 | ( | uint8_t | curve, |
| const uint8_t * | pubkey, | ||
| size_t | pubkey_len, | ||
| uint32_t | created_at, | ||
| uint8_t | out_fp[20] ) |
Compute the RFC 4880 V4 OpenPGP fingerprint (SHA-1, 20 bytes).
| curve | CDC_CURVE_ED25519 or CDC_CURVE_P256. |
| pubkey | 32-byte Ed25519 point or raw 64-byte P-256 (X || Y, no SEC1 prefix). |
| pubkey_len | Length of pubkey (32 or 64). |
| created_at | Key creation timestamp (Unix epoch seconds). |
| out_fp | 20-byte output buffer. |
Definition at line 75 of file fingerprint.cpp.
References curve.
| bool cdc::mod_gpg::calculateFingerprintV5 | ( | uint8_t | curve, |
| const uint8_t * | pubkey, | ||
| size_t | pubkey_len, | ||
| uint32_t | created_at, | ||
| uint8_t | out_fp[32] ) |
Compute the V5 / RFC 9580 OpenPGP fingerprint (SHA-256, 32 bytes).
Uses the same body layout as V4 (version 0x04, EdDSA/ECDSA algo byte, curve OID, MPI). Differs from V4 in the hash function and in the prefix: 0x9A || 4-byte body length (vs V4's 0x99 || 2-byte length).
Definition at line 103 of file fingerprint.cpp.
References curve.
|
static |
Definition at line 106 of file GpgModule.cpp.
References cdc::serial::dispatchSubCommand(), and kGpgSubs.
Referenced by registerCommands().
|
static |
Definition at line 313 of file GpgModule.cpp.
References cdc::mod_gpg::gpg_recv_key_t::flags, gpgCrossSign(), cdc::mod_gpg::GpgRecvStore::instance(), kGpgRecvFlagVerified, parse_index(), and cdc::serial::Console::printf().
|
static |
Serial command exporting GPG public key in PEM format.
| args | Unused command arguments. |
Definition at line 179 of file GpgModule.cpp.
References gpg_export_pubkey_pem(), and cdc::serial::Console::printf().
|
static |
Definition at line 338 of file GpgModule.cpp.
References gpgBuildSignedKeyArmored(), cdc::mod_gpg::GpgRecvStore::instance(), parse_index(), cdc::serial::Console::printf(), cdc::core::psramAlloc(), and cdc::mod_gpg::gpg_recv_key_t::sig_len.
|
static |
Serial command generating GPG key with selected curve and user-id.
Definition at line 144 of file GpgModule.cpp.
References CDC_CURVE_ED25519, CDC_CURVE_P256, curve, gpg_generate_key(), gpg_set_pending_user_id(), GPG_USER_ID_MAX, and cdc::serial::Console::printf().
|
static |
Definition at line 302 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::instance(), parse_index(), and cdc::serial::Console::printf().
|
static |
Definition at line 263 of file GpgModule.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_recv_key_t::curve, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v5, cdc::mod_gpg::gpg_recv_key_t::flags, fp_to_hex(), cdc::mod_gpg::GpgRecvStore::instance(), kGpgRecvFlagVerified, cdc::mod_gpg::gpg_recv_key_t::my_signature, parse_index(), cdc::serial::Console::printf(), cdc::mod_gpg::gpg_recv_key_t::received_at, cdc::mod_gpg::gpg_recv_key_t::sig_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
|
static |
Definition at line 232 of file GpgModule.cpp.
References cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, fp_to_hex(), cdc::mod_gpg::GpgRecvStore::instance(), cdc::mod_gpg::GpgRecvStore::kMaxKeys, cdc::serial::Console::printf(), cdc::core::psramAlloc(), cdc::mod_gpg::gpg_recv_key_t::sig_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
|
static |
Definition at line 198 of file GpgModule.cpp.
References gpg_reset(), cdc::serial::Console::printf(), RESET_TOKEN_TIMEOUT_US, s_reset_token, and s_reset_token_ts_us.
|
static |
Serial command printing current GPG key status.
| args | Unused command arguments. |
Definition at line 126 of file GpgModule.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::created_at, cdc::mod_gpg::gpg_status_t::curve, gpg_get_status(), cdc::serial::Console::printf(), cdc::mod_gpg::gpg_status_t::sign_count, and cdc::mod_gpg::gpg_status_t::user_id.
|
static |
Opens reset confirmation dialog.
Definition at line 726 of file GpgModule.cpp.
References onResetConfirm(), cdc::ui::showConfirm(), cdc::ui::tr(), and cdc::ui::ConfirmView::WARNING.
Referenced by onMenuSelect().
|
static |
Definition at line 221 of file GpgModule.cpp.
Referenced by cmd_gpg_recv_info(), cmd_gpg_recv_list(), and showReceivedDetail().
|
static |
Returns whether OpenPGP PW1 is blocked.
Definition at line 505 of file GpgModule.cpp.
References pin_storage_openpgp_pw1_blocked().
Referenced by onSettingsSelect().
|
static |
Returns whether OpenPGP PW3 is blocked.
Definition at line 513 of file GpgModule.cpp.
References pin_storage_openpgp_pw3_blocked().
Referenced by onSettingsSelect().
|
static |
Changes OpenPGP PW1 value.
| oldPin | Ignored old PIN parameter from generic callback signature. |
| newPin | New PW1 value. |
Definition at line 471 of file GpgModule.cpp.
References pin_storage_openpgp_change_pw1().
Referenced by onSettingsSelect().
|
static |
Changes OpenPGP PW3 value.
| oldPin | Ignored old PIN parameter from generic callback signature. |
| newPin | New PW3 value. |
Definition at line 481 of file GpgModule.cpp.
References pin_storage_openpgp_change_pw3().
Referenced by onSettingsSelect().
|
static |
Returns remaining retries for OpenPGP PW1.
Definition at line 489 of file GpgModule.cpp.
References pin_storage_openpgp_pw1_retries().
Referenced by onSettingsSelect().
|
static |
Returns remaining retries for OpenPGP PW3.
Definition at line 497 of file GpgModule.cpp.
References pin_storage_openpgp_pw3_retries().
Referenced by onSettingsSelect().
|
static |
Verifies OpenPGP PW1 using persistent pin-storage backend.
| pin | Candidate PW1 value. |
Definition at line 452 of file GpgModule.cpp.
References pin_storage_openpgp_verify_pw1().
Referenced by onSettingsSelect().
|
static |
Verifies OpenPGP PW3 using persistent pin-storage backend.
| pin | Candidate PW3 value. |
Definition at line 461 of file GpgModule.cpp.
References pin_storage_openpgp_verify_pw3().
Referenced by onSettingsSelect().
| bool cdc::mod_gpg::gpgBuildSignedKeyArmored | ( | const gpg_recv_key_t & | key, |
| char * | out, | ||
| size_t | out_size, | ||
| size_t * | out_len ) |
Build an ASCII-armored OpenPGP block carrying the cross-signed key.
Packs the received key as Public Key Packet (Tag 6) + User ID Packet (Tag 13) + Certification Signature Packet (Tag 2) into a single BEGIN/END PGP PUBLIC KEY BLOCK payload. Suitable for gpg --import.
| key | Received key descriptor (must already have my_signature). |
| out | Output character buffer. |
| out_size | Capacity of out. |
| out_len | Bytes written (excluding any terminating null). |
Definition at line 283 of file xsig.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::curve, cdc::mod_gpg::gpg_status_t::fingerprint, gpg_get_status(), cdc::mod_gpg::gpg_recv_key_t::my_signature, OPENPGP_ALGO_ECDSA, OPENPGP_ALGO_EDDSA, cdc::mod_gpg::gpg_recv_key_t::received_at, cdc::mod_gpg::gpg_recv_key_t::sig_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by cmd_gpg_export_signed(), and onReceivedActionSelect().
| bool cdc::mod_gpg::gpgCrossSign | ( | const gpg_recv_key_t & | target, |
| uint32_t | sig_creation_time, | ||
| uint8_t | out_sig[64] ) |
Cross-sign a received key with the badge's own SIG ECC slot.
Builds the RFC 4880 certification hash (sig type 0x10 over the target's Public Key Packet + User ID Packet), signs it with the badge's signature subkey via TROPIC01, and returns R || S as 64 bytes.
The badge's own curve is read from gpg_get_status; sig length is always 64 regardless of curve (Ed25519 and P-256 both produce 32+32-byte concatenated R || S in this implementation).
| target | Received key descriptor. |
| sig_creation_time | Timestamp embedded into the hashed-subpackets. |
| out_sig | 64-byte output (R || S). |
Definition at line 193 of file xsig.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::curve, cdc::hal::getSecureElementInstance(), gpg_get_status(), gpg_storage_sig_slot(), LOG_W, cdc::hal::OK, OPENPGP_ALGO_ECDSA, OPENPGP_ALGO_EDDSA, TAG, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by cmd_gpg_cross_sign(), and onReceivedSignConfirm().
| bool cdc::mod_gpg::gpgCrossSignDigest | ( | const uint8_t | fp_v4[20], |
| const char * | user_id, | ||
| uint8_t | out_hash[32] ) |
Build the digest input for a cross-signature.
Per docs/CROSS_SIGNING.md: data = fp_v4 (20 B) || user_id padded with zeros to 64 B hash = SHA-256(data)
Definition at line 134 of file fingerprint.cpp.
References user_id.
|
inlinestatic |
Definition at line 424 of file GpgModule.cpp.
Referenced by rebuildMenu().
|
static |
Pin-change completion callback returning to previous view.
| changed | Result flag (unused). |
Definition at line 521 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), and cdc::ui::ViewStack::pop().
Referenced by onSettingsSelect().
|
static |
Handles GPG main-menu selections via the entry's userData tag.
Definition at line 411 of file GpgModule.cpp.
References confirmReset(), GPG_MENU_EXPORT, GPG_MENU_GENERATE, GPG_MENU_RECEIVED, GPG_MENU_RESET, GPG_MENU_SEND, GPG_MENU_SETTINGS, GPG_MENU_STATUS, showExport(), showReceivedKeys(), showSendKey(), showSettings(), showStatus(), and wizardStart().
Referenced by cdc::mod_gpg::GpgModule::getMenuItems().
|
static |
Definition at line 846 of file GpgModule.cpp.
References gpgBuildSignedKeyArmored(), cdc::ui::ViewStack::instance(), onReceivedDeleteConfirm(), onReceivedSignConfirm(), cdc::ui::ViewStack::push(), cdc::ui::ConfirmView::QUESTION, s_infoView, s_recvExportBuf, s_recvSelectedKey, cdc::ui::showConfirm(), cdc::ui::showToast(), cdc::ui::tr(), and cdc::ui::ConfirmView::WARNING.
Referenced by showReceivedDetail().
|
static |
Definition at line 893 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::deleteKey(), cdc::mod_gpg::GpgRecvStore::instance(), cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::pop(), rebuildReceivedList(), s_recvSelectedIndex, cdc::ui::showToast(), and cdc::ui::tr().
Referenced by onReceivedActionSelect().
|
static |
Definition at line 790 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::instance(), s_recvSelectedIndex, s_recvSelectedKey, and showReceivedDetail().
Referenced by rebuildReceivedList().
|
static |
Definition at line 874 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::getKey(), gpgCrossSign(), cdc::mod_gpg::GpgRecvStore::instance(), kGpgRecvFlagVerified, rebuildReceivedList(), s_recvSelectedIndex, s_recvSelectedKey, cdc::ui::showToast(), and cdc::ui::tr().
Referenced by onReceivedActionSelect().
|
static |
Confirm callback resetting all GPG key material.
| userData | Optional callback context (unused). |
Definition at line 715 of file GpgModule.cpp.
References gpg_reset(), cdc::ui::showToastError(), cdc::ui::showToastSuccess(), and cdc::ui::tr().
Referenced by confirmReset().
|
static |
Handles settings-menu selection for PW1/PW3 change flow.
| index | Selected settings row. |
| userData | Optional callback context (unused). |
Definition at line 530 of file GpgModule.cpp.
References gpg_blocked_pw1(), gpg_blocked_pw3(), gpg_change_pw1(), gpg_change_pw3(), gpg_retries_pw1(), gpg_retries_pw3(), gpg_verify_pw1(), gpg_verify_pw3(), cdc::ui::ViewStack::instance(), onGpgPinComplete(), cdc::core::PinManager::PIN_MAX, cdc::ui::ViewStack::push(), cdc::core::PinManager::PW1_MIN, cdc::core::PinManager::PW3_MIN, s_pinChangeView, and cdc::ui::tr().
Referenced by showSettings().
|
static |
Finalizes wizard curve selection and triggers key generation.
| index | Selected curve index. |
| userData | Optional callback context (unused). |
Definition at line 634 of file GpgModule.cpp.
References CDC_CURVE_ED25519, CDC_CURVE_P256, gpg_generate_key(), gpg_set_pending_user_id(), GPG_USER_ID_MAX, cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::pop(), s_wizard, cdc::ui::showToastError(), cdc::ui::showToastSuccess(), cdc::ui::tr(), and user_id.
Referenced by onWizardEmail().
|
static |
Saves wizard email and opens curve selection.
| text | Entered email. |
Definition at line 616 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), cdc::ui::ListItem::label, onWizardCurve(), cdc::ui::ViewStack::push(), s_curveView, s_wizard, and cdc::ui::tr().
Referenced by onWizardName().
|
static |
Saves wizard name and opens email step.
| text | Entered name. |
Definition at line 605 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), onWizardEmail(), cdc::ui::ViewStack::push(), s_t9Input, s_wizard, and cdc::ui::tr().
Referenced by wizardStart().
|
static |
Definition at line 254 of file GpgModule.cpp.
Referenced by cmd_gpg_cross_sign(), cmd_gpg_export_signed(), cmd_gpg_recv_delete(), and cmd_gpg_recv_info().
|
static |
Rebuilds GPG main menu labels and populates userData tags.
Definition at line 431 of file GpgModule.cpp.
References GPG_MENU_EXPORT, GPG_MENU_GENERATE, GPG_MENU_RECEIVED, GPG_MENU_RESET, GPG_MENU_SEND, GPG_MENU_SETTINGS, GPG_MENU_STATUS, makeMenuItem(), openpgp_has_any_key(), s_menuItems, s_menuView, and cdc::ui::tr().
Referenced by cdc::mod_gpg::GpgModule::getMenuItems().
|
static |
Definition at line 766 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::instance(), cdc::mod_gpg::GpgRecvStore::kMaxKeys, onReceivedListSelect(), cdc::core::psramAlloc(), s_recvListItems, s_recvListLabels, s_recvListView, cdc::mod_gpg::gpg_recv_key_t::sig_len, cdc::ui::tr(), and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by onReceivedDeleteConfirm(), onReceivedSignConfirm(), and showReceivedKeys().
|
static |
Registers serial commands exposed by GPG module.
Definition at line 113 of file GpgModule.cpp.
References cmd_gpg(), CMD_MODULE, cdc::serial::getCommandRegistry(), kGpgSubs, and s_commandsRegistered.
Referenced by cdc::mod_gpg::GpgModule::init().
|
static |
Definition at line 76 of file GpgModule.cpp.
References cdc::ui::I18n::instance(), kStrings, and cdc::ui::I18n::registerEnglishTable().
Referenced by cdc::mod_gpg::GpgModule::init().
|
static |
Exports public key to serial output and QR view.
Definition at line 680 of file GpgModule.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::curve, gpg_alchemy_fingerprint(), gpg_export_pubkey_pem(), gpg_get_status(), GPG_USER_ID_MAX, cdc::mod_gpg::gpg_status_t::initialized, cdc::ui::ViewStack::instance(), KEY_FINGERPRINT_MAX_LEN, cdc::serial::Console::printf(), cdc::ui::ViewStack::push(), s_qrView, cdc::ui::showToastError(), cdc::ui::tr(), and cdc::mod_gpg::gpg_status_t::user_id.
Referenced by onMenuSelect().
|
static |
Definition at line 798 of file GpgModule.cpp.
References CDC_CURVE_ED25519, fp_to_hex(), cdc::ui::ViewStack::instance(), onReceivedActionSelect(), cdc::ui::ViewStack::push(), s_infoView, s_recvActionItems, s_recvActionView, s_recvDetailText, s_recvSelectedKey, and cdc::ui::tr().
Referenced by onReceivedListSelect().
|
static |
Definition at line 757 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::push(), rebuildReceivedList(), s_recvListView, cdc::ui::showInfo(), and cdc::ui::tr().
Referenced by onMenuSelect().
|
static |
Definition at line 751 of file GpgModule.cpp.
References cdc::ui::showToast().
Referenced by onMenuSelect().
|
static |
Shows GPG settings menu.
Definition at line 552 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), onSettingsSelect(), cdc::ui::ViewStack::push(), s_settingsItems, s_settingsView, and cdc::ui::tr().
Referenced by onMenuSelect().
|
static |
Displays current GPG key status and metadata.
Definition at line 563 of file GpgModule.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::created_at, cdc::mod_gpg::gpg_status_t::curve, cdc::mod_gpg::gpg_status_t::fingerprint, GPG_FINGERPRINT_LEN, gpg_get_status(), cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::push(), s_infoView, cdc::mod_gpg::gpg_status_t::sign_count, cdc::ui::tr(), and cdc::mod_gpg::gpg_status_t::user_id.
Referenced by onMenuSelect().
|
static |
Starts key-generation wizard flow.
Definition at line 594 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), onWizardName(), cdc::ui::ViewStack::push(), s_t9Input, s_wizard, and cdc::ui::tr().
Referenced by onMenuSelect().
|
staticconstexpr |
Definition at line 80 of file GpgModule.cpp.
Referenced by registerCommands().
|
constexpr |
Definition at line 8 of file GpgRecvStore.h.
Referenced by cmd_gpg_cross_sign(), cmd_gpg_recv_info(), and onReceivedSignConfirm().
|
static |
Definition at line 93 of file GpgModule.cpp.
Referenced by cmd_gpg(), and registerCommands().
|
constexpr |
Definition at line 40 of file GpgModule.cpp.
Referenced by registerStrings().
|
staticconstexpr |
Definition at line 196 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 81 of file GpgModule.cpp.
Referenced by registerCommands().
|
static |
Definition at line 371 of file GpgModule.cpp.
Referenced by onWizardEmail().
|
static |
Definition at line 372 of file GpgModule.cpp.
Referenced by onReceivedActionSelect(), showReceivedDetail(), and showStatus().
|
static |
Definition at line 375 of file GpgModule.cpp.
Referenced by rebuildMenu().
|
static |
Definition at line 367 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::getMenuItems(), and rebuildMenu().
|
static |
Definition at line 369 of file GpgModule.cpp.
Referenced by onSettingsSelect().
|
static |
Definition at line 373 of file GpgModule.cpp.
Referenced by showExport().
|
static |
Definition at line 737 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 735 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 741 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 742 of file GpgModule.cpp.
Referenced by onReceivedActionSelect().
|
static |
Definition at line 736 of file GpgModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Definition at line 738 of file GpgModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Received-keys list UI state.
Definition at line 734 of file GpgModule.cpp.
Referenced by rebuildReceivedList(), and showReceivedKeys().
|
static |
Definition at line 739 of file GpgModule.cpp.
Referenced by onReceivedDeleteConfirm(), onReceivedListSelect(), and onReceivedSignConfirm().
|
static |
Definition at line 740 of file GpgModule.cpp.
Referenced by onReceivedActionSelect(), onReceivedListSelect(), onReceivedSignConfirm(), and showReceivedDetail().
|
static |
Serial command resetting GPG key material.
| args | Unused command arguments. |
Definition at line 194 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 195 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 376 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 368 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 370 of file GpgModule.cpp.
Referenced by onWizardName(), and wizardStart().
|
static |
Definition at line 374 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::getMenuItems().
|
static |
Definition at line 387 of file GpgModule.cpp.
Referenced by onWizardCurve(), onWizardEmail(), onWizardName(), and wizardStart().