|
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 | gpg_self_cert_t |
| One third-party certification received over the badge's own key. More... | |
| struct | gpg_self_cert_index_entry_t |
| Sort entry exposing a stable ordered index over the NVS blobs. More... | |
| class | GpgSelfCertStore |
| NVS-backed store of third-party certifications on the badge's own key. More... | |
| struct | WizardState |
| struct | DecKeyStorage |
| struct | AesKeyStorage |
Enumerations | |
| enum | GpgMenuAction : uintptr_t { GPG_MENU_STATUS = 1 , GPG_MENU_GENERATE , GPG_MENU_EXPORT , GPG_MENU_SEND , GPG_MENU_RECEIVED , GPG_MENU_MYCERTS , GPG_MENU_SETTINGS , GPG_MENU_RESET } |
Functions | |
| size_t | gpgBuildCertPayload (const gpg_recv_key_t &signed_key, uint8_t *out, size_t out_size) |
| Serialise a certification return message for a cross-signed key. | |
| bool | gpgParseCertPayload (const uint8_t *data, size_t len, gpg_self_cert_t *out, uint8_t out_target_fp[20]) |
| Parse a certification return message into a self-cert record. | |
| size_t | gpgBuildOwnKeyPayload (uint8_t *out, size_t out_size) |
| Serialise the badge's own public key into the wire payload. | |
| size_t | gpgBuildRecvKeyPayload (const gpg_recv_key_t &key, uint8_t *out, size_t out_size) |
| Serialise a stored received key into the wire payload (for forwarding). | |
| bool | gpgParseKeyPayload (const uint8_t *data, size_t len, gpg_recv_key_t *out) |
| Parse a wire payload into a key record, computing the V5 fingerprint. | |
| static void | registerStrings () |
| static bool | deliverGpgKey (const uint8_t *data, uint32_t len, const char *, const char *) |
| cdc_msg delivery callback: store a public key pushed by a peer. | |
| static bool | deliverGpgCert (const uint8_t *data, uint32_t len, const char *, const char *) |
| cdc_msg delivery callback: store a third-party certification on our own key, sent back by a peer that cross-signed it. | |
| 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_recv_cross_sign (const char *args) |
| static void | cmd_gpg_recv_export (const char *args) |
| static void | cmd_gpg_mycert_list (const char *args) |
| static void | cmd_gpg_mycert_delete (const char *args) |
| static void | cmd_gpg_recv_import (const char *args) |
| static void | cmd_gpg_mycert_import (const char *args) |
| static void | cmd_gpg_rsa_selftest (const char *args) |
| Serial self-test: runs the software RSA round-trip on the live firmware (no SE / NVS), for automated host-driven verification. | |
| 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 bool | parse_hex (const char *args, uint8_t *out, size_t out_cap, size_t *out_len) |
| Decode an ASCII-hex string into out. Skips ASCII whitespace between bytes. | |
| 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 | showMyCertifications () |
| 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 | formatPinLabel (char *out, size_t outLen, const char *base, bool blocked, uint8_t retries) |
| Formats a PIN settings label with its remaining-retry status. | |
| 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 *) |
| static void | rebuildMyCertList () |
| static void | onMyCertListSelect (uint16_t index, void *) |
| static void | onMyCertDeleteConfirm (void *) |
| size_t | buildEcdhPubkeyBody (const uint8_t *pubkey, uint32_t created_at, uint8_t *out, size_t out_size) |
| Serialise an RFC 6637 ECDH Public Key Packet body (algorithm 18). | |
| bool | calculateFingerprintV4Ecdh (const uint8_t *pubkey, uint32_t created_at, uint8_t out_fp[20]) |
| Compute the V4 fingerprint of an ECDH (DEC) subkey. | |
| 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. | |
| size_t | buildCertSigPacket (const gpg_recv_key_t &key, uint8_t *out, size_t out_size) |
| Build the OpenPGP Signature Packet body certifying key. | |
| bool | gpgBuildReceivedKeyArmored (const gpg_recv_key_t &key, char *out, size_t out_size, size_t *out_len) |
| Build an ASCII-armored OpenPGP block for a received peer key. | |
| bool | gpgBuildPublicKeyArmored (const gpg_recv_key_t &key, char *out, size_t out_size, size_t *out_len) |
| Build an ASCII-armored OpenPGP public-key block (no signature). | |
| bool | gpgBuildOwnSignedKeyArmored (char *out, size_t out_size, size_t *out_len) |
| Build an ASCII-armored OpenPGP block for the badge's own public key, appending every stored third-party certification on it. | |
| bool | gpgBuildOwnSubkeyMaterial (uint8_t dec_pubkey[64], uint32_t *dec_created_at, uint8_t self_sig[64], uint8_t binding_sig[64]) |
| Gather the badge's own encryption-subkey material for transfer. | |
Variables | |
| constexpr size_t | kGpgCertPayloadMin = 20 + 20 + 1 + 2 + 1 |
| Minimum payload size (empty issuer uid, 1-byte signature packet). | |
| constexpr size_t | kGpgCertPayloadMax = 20 + 20 + 1 + 63 + 2 + kGpgSelfCertSigMax |
| Maximum payload size (maximum issuer uid + maximum signature packet). | |
| constexpr size_t | kGpgKeyDecBlock = 4 + 64 + 64 + 64 |
| Fixed-size trailing DEC encryption-subkey block. | |
| constexpr size_t | kGpgKeyPayloadMin = 1 + 1 + 32 + 4 + 20 + 1 + 1 + kGpgKeyDecBlock |
| Minimum payload size (Ed25519 + empty user id + DEC block). | |
| constexpr size_t | kGpgKeyPayloadMax = 1 + 1 + 64 + 4 + 20 + 1 + 63 + kGpgKeyDecBlock |
| Maximum payload size (P-256 + maximum user id + DEC block). | |
| constexpr uint8_t | kGpgRecvFlagVerified = 0x01 |
| constexpr size_t | kGpgSelfCertSigMax = 160 |
| Maximum length of a stored certification signature packet body (Tag 2). | |
| constexpr ui::I18nEntry | kStrings [] |
| static constexpr const char * | kGpgKeyMime = "application/pgp-keys" |
| MIME type for badge-to-badge public-key transfer over cdc_msg. | |
| static constexpr const char * | kGpgCertMime = "application/pgp-signature" |
| MIME type for badge-to-badge certification return messages over cdc_msg. | |
| static constexpr const char * | CMD_MODULE = "gpg" |
| static bool | s_commandsRegistered = false |
| static const cdc::serial::SubCommand | kGpgSubs [] |
| static char | s_reset_token [7] = {} |
| Serial command resetting GPG key material. | |
| static uint64_t | s_reset_token_ts_us = 0 |
| static constexpr uint64_t | RESET_TOKEN_TIMEOUT_US = 30ULL * 1000ULL * 1000ULL |
| static ui::ListView | s_menuView |
| static ui::ListView | s_settingsView |
| static ui::PinChangeView | s_pinChangeView |
| static ui::T9InputView | s_t9Input |
| static ui::ListView | s_curveView |
| static ui::InfoView | s_infoView |
| static ui::QRCodeView | s_qrView |
| static bool | s_viewsInitialized = false |
| static ui::ListItem | s_menuItems [8] = {} |
| static ui::ListItem | s_settingsItems [] |
| static WizardState | s_wizard = {} |
| static char | s_userPinLabel [48] |
| static char | s_adminPinLabel [48] |
| static ui::ListView | s_recvListView |
| Received-keys list UI state. | |
| static ui::ListView | s_recvActionView |
| static ui::ListItem | s_recvListItems [GpgRecvStore::kMaxKeys+1] |
| static ui::ListItem | s_recvActionItems [6] |
| static char | s_recvListLabels [GpgRecvStore::kMaxKeys][72] |
| static uint8_t | s_recvSelectedIndex = 0 |
| static gpg_recv_key_t | s_recvSelectedKey = {} |
| static char | s_recvDetailText [640] |
| static char | s_recvExportBuf [4096] |
| static ui::ListView | s_myCertListView |
| My-certifications (third-party signatures on our own key) UI state. | |
| static ui::ListItem | s_myCertListItems [GpgSelfCertStore::kMaxCerts+1] |
| static char | s_myCertLabels [GpgSelfCertStore::kMaxCerts][72] |
| static uint8_t | s_myCertSelectedIndex = 0 |
| static gpg_self_cert_t | s_myCertSelected = {} |
| static char | s_myCertDetailText [320] |
| 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_MYCERTS | |
| GPG_MENU_SETTINGS | |
| GPG_MENU_RESET | |
Definition at line 594 of file GpgModule.cpp.
| size_t cdc::mod_gpg::buildCertSigPacket | ( | const gpg_recv_key_t & | key, |
| uint8_t * | out, | ||
| size_t | out_size ) |
Build the OpenPGP Signature Packet body certifying key.
Assembles the Tag 2 packet body (version, sig type 0x10, algo, hash algo, hashed + unhashed subpackets, left-16 hash bits and the R || S MPIs) for the cross-signature already stored in key.my_signature. No tag/length header is written. The same bytes are used by the armored export and the badge-to-badge certification return message so both stay identical.
| key | Received key descriptor with a populated my_signature / sig_created_at. |
| out | Output buffer. |
| out_size | Capacity of out. |
Definition at line 683 of file xsig.cpp.
References 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, cdc::mod_gpg::gpg_recv_key_t::sig_created_at, cdc::mod_gpg::gpg_recv_key_t::sig_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by gpgBuildCertPayload(), and gpgBuildOwnSignedKeyArmored().
| size_t cdc::mod_gpg::buildEcdhPubkeyBody | ( | const uint8_t * | pubkey, |
| uint32_t | created_at, | ||
| uint8_t * | out, | ||
| size_t | out_size ) |
Serialise an RFC 6637 ECDH Public Key Packet body (algorithm 18).
Layout: version 0x04, 4-byte creation time, ECDH algorithm id, P-256 curve OID, the MPI-encoded uncompressed point, then the KDF parameter field 03 01 <hash> <sym>. Used for the decryption (DEC) encryption subkey so the exported packet and the stored fingerprint stay byte-identical.
| pubkey | Raw 64-byte P-256 point (X || Y, no SEC1 prefix). |
| created_at | Subkey creation timestamp (Unix epoch seconds). |
| out | Output buffer. |
| out_size | Capacity of out. |
Definition at line 94 of file fingerprint.cpp.
References MPI_FULL_SIZE_P256, MPI_HEADER_SIZE, OPENPGP_ALGO_ECDH, OPENPGP_ECDH_KDF_HASH, OPENPGP_ECDH_KDF_SYM, and P256_PUBKEY_BITS.
Referenced by calculateFingerprintV4Ecdh(), gpgBuildOwnSignedKeyArmored(), and gpgBuildOwnSubkeyMaterial().
| 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 141 of file fingerprint.cpp.
References curve.
Referenced by gpgParseKeyPayload().
| bool cdc::mod_gpg::calculateFingerprintV4Ecdh | ( | const uint8_t * | pubkey, |
| uint32_t | created_at, | ||
| uint8_t | out_fp[20] ) |
Compute the V4 fingerprint of an ECDH (DEC) subkey.
Hashes the RFC 6637 ECDH public-key body (see buildEcdhPubkeyBody) so the result matches what GnuPG derives from the exported encryption subkey.
| pubkey | Raw 64-byte P-256 point (X || Y). |
| created_at | Subkey creation timestamp. |
| out_fp | 20-byte output buffer. |
Definition at line 130 of file fingerprint.cpp.
References buildEcdhPubkeyBody().
Referenced by gpg_generate_key().
| 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 157 of file fingerprint.cpp.
References curve.
Referenced by gpgParseKeyPayload().
|
static |
Definition at line 185 of file GpgModule.cpp.
References cdc::serial::dispatchSubCommand(), and kGpgSubs.
Referenced by registerCommands().
|
static |
Serial command exporting GPG public key in PEM format.
| args | Unused command arguments. |
Definition at line 258 of file GpgModule.cpp.
References gpgBuildOwnSignedKeyArmored(), cdc::serial::Console::printf(), and cdc::core::psramAlloc().
|
static |
Serial command generating GPG key with selected curve and user-id.
Definition at line 223 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 469 of file GpgModule.cpp.
References cdc::mod_gpg::GpgSelfCertStore::instance(), parse_index(), and cdc::serial::Console::printf().
|
static |
Definition at line 523 of file GpgModule.cpp.
References cdc::mod_gpg::gpg_status_t::fingerprint, gpg_get_status(), gpgParseCertPayload(), cdc::mod_gpg::GpgSelfCertStore::instance(), kGpgCertPayloadMax, parse_hex(), and cdc::serial::Console::printf().
|
static |
Definition at line 449 of file GpgModule.cpp.
References fp_to_hex(), cdc::mod_gpg::GpgSelfCertStore::instance(), cdc::mod_gpg::gpg_self_cert_t::issuer_fp_v4, cdc::mod_gpg::gpg_self_cert_t::issuer_uid, cdc::mod_gpg::GpgSelfCertStore::kMaxCerts, cdc::serial::Console::printf(), and cdc::core::psramAlloc().
|
static |
Definition at line 396 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 |
Definition at line 385 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::instance(), parse_index(), and cdc::serial::Console::printf().
|
static |
Definition at line 421 of file GpgModule.cpp.
References gpgBuildReceivedKeyArmored(), cdc::mod_gpg::GpgRecvStore::instance(), parse_index(), cdc::serial::Console::print(), cdc::serial::Console::printf(), and cdc::core::psramAlloc().
|
static |
Definition at line 506 of file GpgModule.cpp.
References gpgParseKeyPayload(), cdc::mod_gpg::GpgRecvStore::instance(), kGpgKeyPayloadMax, parse_hex(), and cdc::serial::Console::printf().
|
static |
Definition at line 346 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 315 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 281 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 self-test: runs the software RSA round-trip on the live firmware (no SE / NVS), for automated host-driven verification.
| args | Optional modulus size (2048 / 3072 / 4096); default 2048. |
Definition at line 555 of file GpgModule.cpp.
References gpg_rsa_selftest(), and cdc::serial::Console::printf().
|
static |
Serial command printing current GPG key status.
| args | Unused command arguments. |
Definition at line 205 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 958 of file GpgModule.cpp.
References onResetConfirm(), cdc::ui::showConfirm(), cdc::ui::tr(), and cdc::ui::ConfirmView::WARNING.
Referenced by onMenuSelect().
|
static |
cdc_msg delivery callback: store a third-party certification on our own key, sent back by a peer that cross-signed it.
| data | Wire payload. |
| len | Payload length. |
Definition at line 126 of file GpgModule.cpp.
References cdc::mod_gpg::gpg_status_t::fingerprint, gpg_get_status(), gpgParseCertPayload(), cdc::mod_gpg::GpgSelfCertStore::instance(), cdc::mod_gpg::gpg_self_cert_t::issuer_uid, LOG_I, LOG_W, and TAG.
Referenced by cdc::mod_gpg::GpgModule::init().
|
static |
cdc_msg delivery callback: store a public key pushed by a peer.
| data | Wire payload. |
| len | Payload length. |
Definition at line 100 of file GpgModule.cpp.
References gpgParseKeyPayload(), cdc::mod_gpg::GpgRecvStore::instance(), LOG_I, LOG_W, TAG, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by cdc::mod_gpg::GpgModule::init().
|
static |
Formats a PIN settings label with its remaining-retry status.
| out | Destination buffer. |
| outLen | Destination buffer size. |
| base | Localized base label (e.g. "User PIN"). |
| blocked | Whether the PIN is currently blocked. |
| retries | Remaining retry count when not blocked. |
Definition at line 769 of file GpgModule.cpp.
References cdc::ui::tr().
Referenced by showSettings().
|
static |
Definition at line 304 of file GpgModule.cpp.
Referenced by cmd_gpg_mycert_list(), cmd_gpg_recv_info(), cmd_gpg_recv_list(), onMyCertListSelect(), and showReceivedDetail().
|
static |
Returns whether OpenPGP PW1 is blocked.
Definition at line 714 of file GpgModule.cpp.
References pin_storage_openpgp_pw1_blocked().
Referenced by onSettingsSelect(), and showSettings().
|
static |
Returns whether OpenPGP PW3 is blocked.
Definition at line 722 of file GpgModule.cpp.
References pin_storage_openpgp_pw3_blocked().
Referenced by onSettingsSelect(), and showSettings().
|
static |
Changes OpenPGP PW1 value.
| oldPin | Ignored old PIN parameter from generic callback signature. |
| newPin | New PW1 value. |
Definition at line 680 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 690 of file GpgModule.cpp.
References pin_storage_openpgp_change_pw3().
Referenced by onSettingsSelect().
|
static |
Returns remaining retries for OpenPGP PW1.
Definition at line 698 of file GpgModule.cpp.
References pin_storage_openpgp_pw1_retries().
Referenced by onSettingsSelect(), and showSettings().
|
static |
Returns remaining retries for OpenPGP PW3.
Definition at line 706 of file GpgModule.cpp.
References pin_storage_openpgp_pw3_retries().
Referenced by onSettingsSelect(), and showSettings().
|
static |
Verifies OpenPGP PW1 using persistent pin-storage backend.
| pin | Candidate PW1 value. |
Definition at line 661 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 670 of file GpgModule.cpp.
References pin_storage_openpgp_verify_pw3().
Referenced by onSettingsSelect().
| size_t cdc::mod_gpg::gpgBuildCertPayload | ( | const gpg_recv_key_t & | signed_key, |
| uint8_t * | out, | ||
| size_t | out_size ) |
Serialise a certification return message for a cross-signed key.
Builds the Tag 2 signature packet from signed_key (which must already hold my_signature) and frames it with the target fingerprint and the badge's own issuer identity.
| signed_key | Received key that was cross-signed by this badge. |
| out | Output buffer. |
| out_size | Capacity of out. |
Definition at line 15 of file GpgCertPayload.cpp.
References buildCertSigPacket(), cdc::mod_gpg::gpg_status_t::fingerprint, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, gpg_get_status(), kGpgSelfCertSigMax, cdc::mod_gpg::gpg_recv_key_t::sig_len, and cdc::mod_gpg::gpg_status_t::user_id.
Referenced by onReceivedActionSelect().
| size_t cdc::mod_gpg::gpgBuildOwnKeyPayload | ( | uint8_t * | out, |
| size_t | out_size ) |
Serialise the badge's own public key into the wire payload.
| out | Output buffer. |
| out_size | Capacity of out. |
Definition at line 37 of file GpgKeyPayload.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::created_at, cdc::mod_gpg::gpg_status_t::curve, curve, cdc::mod_gpg::gpg_status_t::fingerprint, cdc::hal::getSecureElementInstance(), gpg_get_status(), gpg_storage_sig_slot(), gpgBuildOwnSubkeyMaterial(), kGpgKeyDecBlock, cdc::hal::OK, cdc::hal::P256, and cdc::mod_gpg::gpg_status_t::user_id.
Referenced by showSendKey().
| bool cdc::mod_gpg::gpgBuildOwnSignedKeyArmored | ( | char * | out, |
| size_t | out_size, | ||
| size_t * | out_len ) |
Build an ASCII-armored OpenPGP block for the badge's own public key, appending every stored third-party certification on it.
Packs the badge's own Public Key Packet (Tag 6) + User ID Packet (Tag 13) followed by one Certification Signature Packet (Tag 2) per cert held in GpgSelfCertStore. Importing the result merges the accumulated third-party signatures onto the badge's key in a GPG keyring.
| out | Output character buffer. |
| out_size | Capacity of out. |
| out_len | Bytes written (excluding any terminating null). |
Definition at line 716 of file xsig.cpp.
References buildCertSigPacket(), buildEcdhPubkeyBody(), cdc::mod_gpg::gpg_recv_key_t::created_at, cdc::mod_gpg::gpg_recv_key_t::curve, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, gpg_get_dec_pubkey(), gpgCrossSign(), cdc::mod_gpg::GpgSelfCertStore::instance(), KEY_DEC, kGpgSelfCertSigMax, cdc::mod_gpg::gpg_recv_key_t::my_signature, openpgp_get_gen_time(), P256_PUBKEY_SIZE, cdc::core::psramAlloc(), cdc::mod_gpg::gpg_recv_key_t::sig_created_at, cdc::mod_gpg::gpg_recv_key_t::sig_len, cdc::mod_gpg::gpg_self_cert_t::sig_pkt, cdc::mod_gpg::gpg_self_cert_t::sig_pkt_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by cmd_gpg_export(), and showExport().
| bool cdc::mod_gpg::gpgBuildOwnSubkeyMaterial | ( | uint8_t | dec_pubkey[64], |
| uint32_t * | dec_created_at, | ||
| uint8_t | self_sig[64], | ||
| uint8_t | binding_sig[64] ) |
Gather the badge's own encryption-subkey material for transfer.
Derives the DEC (RFC 6637 ECDH P-256) public point, its creation time, the UID self-signature over the primary SIG key and the DEC subkey-binding signature, all signed with the badge's own SIG slot. The receiver cannot forge these, so they travel in the badge-to-badge key payload and let an exchanged key be imported as a full sign + encrypt OpenPGP key.
| dec_pubkey | 64-byte output: raw P-256 point X || Y. |
| dec_created_at | Output: DEC subkey creation timestamp. |
| self_sig | 64-byte output: UID self-certification (R || S). |
| binding_sig | 64-byte output: subkey-binding signature (R || S). |
Definition at line 792 of file xsig.cpp.
References buildEcdhPubkeyBody(), cdc::mod_gpg::gpg_recv_key_t::created_at, gpg_get_dec_pubkey(), gpgCrossSign(), KEY_DEC, openpgp_get_gen_time(), and P256_PUBKEY_SIZE.
Referenced by gpgBuildOwnKeyPayload().
| bool cdc::mod_gpg::gpgBuildPublicKeyArmored | ( | const gpg_recv_key_t & | key, |
| char * | out, | ||
| size_t | out_size, | ||
| size_t * | out_len ) |
Build an ASCII-armored OpenPGP public-key block (no signature).
Packs the received key as Public Key Packet (Tag 6) + User ID Packet (Tag 13) into a single BEGIN/END PGP PUBLIC KEY BLOCK payload, suitable for gpg --import or display as a QR code. Works for unsigned keys.
| key | Received key descriptor. |
| out | Output character buffer. |
| out_size | Capacity of out. |
| out_len | Bytes written (excluding any terminating null). |
Definition at line 709 of file xsig.cpp.
Referenced by onReceivedActionSelect().
| bool cdc::mod_gpg::gpgBuildReceivedKeyArmored | ( | const gpg_recv_key_t & | key, |
| char * | out, | ||
| size_t | out_size, | ||
| size_t * | out_len ) |
Build an ASCII-armored OpenPGP block for a received peer key.
Packs the received key as Public Key Packet (Tag 6) + User ID Packet (Tag 13) + the owner's UID self-signature + the DEC encryption subkey (Tag 14) with the owner's binding signature, so the result imports into GnuPG as a usable sign + encrypt key. Our own cross-certification is added only when the entry has been cross-signed; the export works either way.
| key | Received key descriptor. |
| out | Output character buffer. |
| out_size | Capacity of out. |
| out_len | Bytes written (excluding any terminating null). |
Definition at line 702 of file xsig.cpp.
Referenced by cmd_gpg_recv_export(), and onReceivedActionSelect().
| size_t cdc::mod_gpg::gpgBuildRecvKeyPayload | ( | const gpg_recv_key_t & | key, |
| uint8_t * | out, | ||
| size_t | out_size ) |
Serialise a stored received key into the wire payload (for forwarding).
| key | Received key descriptor. |
| out | Output buffer. |
| out_size | Capacity of out. |
Definition at line 92 of file GpgKeyPayload.cpp.
References cdc::mod_gpg::gpg_recv_key_t::created_at, cdc::mod_gpg::gpg_recv_key_t::created_at_dec, cdc::mod_gpg::gpg_recv_key_t::curve, cdc::mod_gpg::gpg_recv_key_t::dec_binding_sig, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, kGpgKeyDecBlock, cdc::mod_gpg::gpg_recv_key_t::owner_self_sig, cdc::mod_gpg::gpg_recv_key_t::pubkey, cdc::mod_gpg::gpg_recv_key_t::pubkey_dec, cdc::mod_gpg::gpg_recv_key_t::pubkey_len, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by 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 593 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_recv_cross_sign(), gpgBuildOwnSignedKeyArmored(), gpgBuildOwnSubkeyMaterial(), 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 188 of file fingerprint.cpp.
References user_id.
| bool cdc::mod_gpg::gpgParseCertPayload | ( | const uint8_t * | data, |
| size_t | len, | ||
| gpg_self_cert_t * | out, | ||
| uint8_t | out_target_fp[20] ) |
Parse a certification return message into a self-cert record.
| data | Payload bytes. |
| len | Payload length. |
| out | Output self-cert record (zeroed on entry, received_at stamped). |
| out_target_fp | 20-byte buffer receiving the certified-key fingerprint. |
Definition at line 45 of file GpgCertPayload.cpp.
References cdc::mod_gpg::gpg_self_cert_t::issuer_fp_v4, cdc::mod_gpg::gpg_self_cert_t::issuer_uid, kGpgCertPayloadMin, kGpgSelfCertSigMax, cdc::mod_gpg::gpg_self_cert_t::received_at, cdc::mod_gpg::gpg_self_cert_t::sig_pkt, and cdc::mod_gpg::gpg_self_cert_t::sig_pkt_len.
Referenced by cmd_gpg_mycert_import(), and deliverGpgCert().
| bool cdc::mod_gpg::gpgParseKeyPayload | ( | const uint8_t * | data, |
| size_t | len, | ||
| gpg_recv_key_t * | out ) |
Parse a wire payload into a key record, computing the V5 fingerprint.
| data | Payload bytes. |
| len | Payload length. |
| out | Output key record (zeroed on entry). |
Definition at line 123 of file GpgKeyPayload.cpp.
References calculateFingerprintV4(), calculateFingerprintV5(), CDC_CURVE_ED25519, CDC_CURVE_P256, cdc::mod_gpg::gpg_recv_key_t::created_at, cdc::mod_gpg::gpg_recv_key_t::created_at_dec, cdc::mod_gpg::gpg_recv_key_t::curve, curve, cdc::mod_gpg::gpg_recv_key_t::dec_binding_sig, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v4, cdc::mod_gpg::gpg_recv_key_t::fingerprint_v5, kGpgKeyDecBlock, kGpgKeyPayloadMin, cdc::mod_gpg::gpg_recv_key_t::owner_self_sig, cdc::mod_gpg::gpg_recv_key_t::pubkey, cdc::mod_gpg::gpg_recv_key_t::pubkey_dec, cdc::mod_gpg::gpg_recv_key_t::pubkey_len, cdc::mod_gpg::gpg_recv_key_t::received_at, and cdc::mod_gpg::gpg_recv_key_t::user_id.
Referenced by cmd_gpg_recv_import(), and deliverGpgKey().
|
inlinestatic |
Definition at line 632 of file GpgModule.cpp.
Referenced by rebuildMenu().
|
static |
Pin-change completion callback returning to previous view.
| changed | Result flag (unused). |
Definition at line 730 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 618 of file GpgModule.cpp.
References confirmReset(), GPG_MENU_EXPORT, GPG_MENU_GENERATE, GPG_MENU_MYCERTS, GPG_MENU_RECEIVED, GPG_MENU_RESET, GPG_MENU_SEND, GPG_MENU_SETTINGS, GPG_MENU_STATUS, showExport(), showMyCertifications(), showReceivedKeys(), showSendKey(), showSettings(), showStatus(), and wizardStart().
Referenced by cdc::mod_gpg::GpgModule::getMenuItems().
|
static |
Definition at line 1255 of file GpgModule.cpp.
References cdc::mod_gpg::GpgSelfCertStore::deleteCert(), cdc::mod_gpg::GpgSelfCertStore::instance(), cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::pop(), rebuildMyCertList(), s_myCertSelectedIndex, cdc::ui::showToast(), and cdc::ui::tr().
Referenced by onMyCertListSelect().
|
static |
Definition at line 1224 of file GpgModule.cpp.
References fp_to_hex(), cdc::mod_gpg::GpgSelfCertStore::instance(), cdc::ui::ViewStack::instance(), onMyCertDeleteConfirm(), cdc::ui::ViewStack::push(), s_infoView, s_myCertDetailText, s_myCertSelected, s_myCertSelectedIndex, cdc::ui::showConfirm(), cdc::ui::tr(), and cdc::ui::ConfirmView::WARNING.
Referenced by rebuildMyCertList().
|
static |
Definition at line 1088 of file GpgModule.cpp.
References gpgBuildCertPayload(), gpgBuildPublicKeyArmored(), gpgBuildReceivedKeyArmored(), gpgBuildRecvKeyPayload(), cdc::ui::ViewStack::instance(), kGpgCertMime, kGpgCertPayloadMax, kGpgKeyMime, kGpgKeyPayloadMax, onReceivedDeleteConfirm(), onReceivedSignConfirm(), cdc::ui::ViewStack::push(), cdc::ui::ConfirmView::QUESTION, s_infoView, s_qrView, s_recvExportBuf, s_recvSelectedKey, cdc::ui::showConfirm(), cdc::ui::showToast(), cdc::ui::showToastError(), cdc::ui::tr(), and cdc::ui::ConfirmView::WARNING.
Referenced by showReceivedDetail().
|
static |
Definition at line 1170 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 1029 of file GpgModule.cpp.
References cdc::mod_gpg::GpgRecvStore::instance(), s_recvSelectedIndex, s_recvSelectedKey, and showReceivedDetail().
Referenced by rebuildReceivedList().
|
static |
Definition at line 1151 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 947 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 739 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 867 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::popToAnchor(), s_menuView, 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 849 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 838 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 |
Decode an ASCII-hex string into out. Skips ASCII whitespace between bytes.
Definition at line 481 of file GpgModule.cpp.
Referenced by cmd_gpg_mycert_import(), and cmd_gpg_recv_import().
|
static |
Definition at line 337 of file GpgModule.cpp.
Referenced by cmd_gpg_mycert_delete(), cmd_gpg_recv_cross_sign(), cmd_gpg_recv_delete(), cmd_gpg_recv_export(), and cmd_gpg_recv_info().
|
static |
Rebuilds GPG main menu labels and populates userData tags.
Definition at line 639 of file GpgModule.cpp.
References GPG_MENU_EXPORT, GPG_MENU_GENERATE, GPG_MENU_MYCERTS, 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 1193 of file GpgModule.cpp.
References cdc::mod_gpg::GpgSelfCertStore::instance(), cdc::mod_gpg::gpg_self_cert_t::issuer_uid, cdc::mod_gpg::GpgSelfCertStore::kMaxCerts, onMyCertListSelect(), cdc::core::psramAlloc(), s_myCertLabels, s_myCertListItems, s_myCertListView, and cdc::ui::tr().
Referenced by onMyCertDeleteConfirm(), and showMyCertifications().
|
static |
Definition at line 1005 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 192 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 87 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 911 of file GpgModule.cpp.
References CDC_CURVE_ED25519, cdc::mod_gpg::gpg_status_t::curve, gpg_alchemy_fingerprint(), gpg_get_status(), GPG_USER_ID_MAX, gpgBuildOwnSignedKeyArmored(), cdc::mod_gpg::gpg_status_t::initialized, cdc::ui::ViewStack::instance(), KEY_FINGERPRINT_MAX_LEN, cdc::serial::Console::print(), 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 1215 of file GpgModule.cpp.
References cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::push(), rebuildMyCertList(), s_myCertListView, cdc::ui::showInfo(), and cdc::ui::tr().
Referenced by onMenuSelect().
|
static |
Definition at line 1037 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 996 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 983 of file GpgModule.cpp.
References gpgBuildOwnKeyPayload(), kGpgKeyMime, kGpgKeyPayloadMax, cdc::ui::showToastInfo(), and cdc::ui::tr().
Referenced by onMenuSelect().
|
static |
Shows GPG settings menu.
Definition at line 781 of file GpgModule.cpp.
References formatPinLabel(), gpg_blocked_pw1(), gpg_blocked_pw3(), gpg_retries_pw1(), gpg_retries_pw3(), cdc::ui::ViewStack::instance(), onSettingsSelect(), cdc::ui::ViewStack::push(), s_adminPinLabel, s_settingsItems, s_settingsView, s_userPinLabel, and cdc::ui::tr().
Referenced by onMenuSelect().
|
static |
Displays current GPG key status and metadata.
Definition at line 796 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 827 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 149 of file GpgModule.cpp.
Referenced by registerCommands().
|
staticconstexpr |
MIME type for badge-to-badge certification return messages over cdc_msg.
Definition at line 117 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::init(), onReceivedActionSelect(), and cdc::mod_gpg::GpgModule::stop().
|
constexpr |
Maximum payload size (maximum issuer uid + maximum signature packet).
Definition at line 28 of file GpgCertPayload.h.
Referenced by cmd_gpg_mycert_import(), and onReceivedActionSelect().
|
constexpr |
Minimum payload size (empty issuer uid, 1-byte signature packet).
Definition at line 26 of file GpgCertPayload.h.
Referenced by gpgParseCertPayload().
|
constexpr |
Fixed-size trailing DEC encryption-subkey block.
Definition at line 30 of file GpgKeyPayload.h.
Referenced by gpgBuildOwnKeyPayload(), gpgBuildRecvKeyPayload(), and gpgParseKeyPayload().
|
staticconstexpr |
MIME type for badge-to-badge public-key transfer over cdc_msg.
Definition at line 92 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::init(), onReceivedActionSelect(), showSendKey(), and cdc::mod_gpg::GpgModule::stop().
|
constexpr |
Maximum payload size (P-256 + maximum user id + DEC block).
Definition at line 34 of file GpgKeyPayload.h.
Referenced by cmd_gpg_recv_import(), onReceivedActionSelect(), and showSendKey().
|
constexpr |
Minimum payload size (Ed25519 + empty user id + DEC block).
Definition at line 32 of file GpgKeyPayload.h.
Referenced by gpgParseKeyPayload().
|
constexpr |
Definition at line 8 of file GpgRecvStore.h.
Referenced by cmd_gpg_recv_cross_sign(), cmd_gpg_recv_info(), and onReceivedSignConfirm().
|
constexpr |
Maximum length of a stored certification signature packet body (Tag 2).
Definition at line 9 of file GpgSelfCertStore.h.
Referenced by cdc::mod_gpg::GpgSelfCertStore::addCert(), gpgBuildCertPayload(), gpgBuildOwnSignedKeyArmored(), and gpgParseCertPayload().
|
static |
Definition at line 167 of file GpgModule.cpp.
Referenced by cmd_gpg(), and registerCommands().
|
constexpr |
Definition at line 45 of file GpgModule.cpp.
Referenced by registerStrings().
|
staticconstexpr |
Definition at line 279 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 759 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 150 of file GpgModule.cpp.
Referenced by registerCommands().
|
static |
Definition at line 576 of file GpgModule.cpp.
Referenced by onWizardEmail().
|
static |
Definition at line 577 of file GpgModule.cpp.
Referenced by onMyCertListSelect(), onReceivedActionSelect(), showReceivedDetail(), and showStatus().
|
static |
Definition at line 580 of file GpgModule.cpp.
Referenced by rebuildMenu().
|
static |
Definition at line 572 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::getMenuItems(), onWizardCurve(), and rebuildMenu().
|
static |
Definition at line 1187 of file GpgModule.cpp.
Referenced by onMyCertListSelect().
|
static |
Definition at line 1184 of file GpgModule.cpp.
Referenced by rebuildMyCertList().
|
static |
Definition at line 1183 of file GpgModule.cpp.
Referenced by rebuildMyCertList().
|
static |
My-certifications (third-party signatures on our own key) UI state.
Definition at line 1182 of file GpgModule.cpp.
Referenced by rebuildMyCertList(), and showMyCertifications().
|
static |
Definition at line 1186 of file GpgModule.cpp.
Referenced by onMyCertListSelect().
|
static |
Definition at line 1185 of file GpgModule.cpp.
Referenced by onMyCertDeleteConfirm(), and onMyCertListSelect().
|
static |
Definition at line 574 of file GpgModule.cpp.
Referenced by onSettingsSelect().
|
static |
Definition at line 578 of file GpgModule.cpp.
Referenced by onReceivedActionSelect(), and showExport().
|
static |
Definition at line 969 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 967 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 973 of file GpgModule.cpp.
Referenced by showReceivedDetail().
|
static |
Definition at line 974 of file GpgModule.cpp.
Referenced by onReceivedActionSelect().
|
static |
Definition at line 968 of file GpgModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Definition at line 970 of file GpgModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Received-keys list UI state.
Definition at line 966 of file GpgModule.cpp.
Referenced by rebuildReceivedList(), and showReceivedKeys().
|
static |
Definition at line 971 of file GpgModule.cpp.
Referenced by onReceivedDeleteConfirm(), onReceivedListSelect(), and onReceivedSignConfirm().
|
static |
Definition at line 972 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 277 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 278 of file GpgModule.cpp.
Referenced by cmd_gpg_reset().
|
static |
Definition at line 581 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 573 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 575 of file GpgModule.cpp.
Referenced by onWizardName(), and wizardStart().
|
static |
Definition at line 758 of file GpgModule.cpp.
Referenced by showSettings().
|
static |
Definition at line 579 of file GpgModule.cpp.
Referenced by cdc::mod_gpg::GpgModule::getMenuItems().
|
static |
Definition at line 592 of file GpgModule.cpp.
Referenced by onWizardCurve(), onWizardEmail(), onWizardName(), and wizardStart().