|
cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
|
Request parameters for CryptnoxWallet::sign. More...
#include <CryptnoxWallet.h>
Public Member Functions | |
| CW_SignRequest (CW_SecureSession &sess, uint8_t kType=CW_SIGN_CURR_K1, uint8_t sigType=CW_SIGN_SIG_ECDSA_LOW_S, bool pinless=CW_SIGN_WITH_PIN) | |
| Construct a sign request with sensible defaults. | |
| ~CW_SignRequest () | |
| Securely wipes the PIN buffer. | |
Public Attributes | |
| CW_SecureSession & | session |
| uint8_t | keyType |
| uint8_t | signatureType |
| uint8_t | pin [CW_MAX_PIN_LENGTH] |
| bool | pinLessMode |
| const uint8_t * | hash |
| uint8_t | hashLength |
| const uint8_t * | derivePath |
| uint8_t | derivePathLength |
Request parameters for CryptnoxWallet::sign.
Owns the PIN buffer for the lifetime of the request — the destructor securely wipes it (CW_Utils::secure_wipe), so allocating the request on the stack inside a tight scope is the recommended pattern.
Definition at line 74 of file CryptnoxWallet.h.
|
inlineexplicit |
Construct a sign request with sensible defaults.
| [in] | sess | Open secure session. |
| [in] | kType | Key type. Defaults to CW_SIGN_CURR_K1. |
| [in] | sigType | Signature type. Defaults to CW_SIGN_SIG_ECDSA_LOW_S. |
| [in] | pinless | PIN mode. Defaults to PIN required (CW_SIGN_WITH_PIN). |
Definition at line 92 of file CryptnoxWallet.h.
References CW_SIGN_CURR_K1, CW_SIGN_SIG_ECDSA_LOW_S, CW_SIGN_WITH_PIN, derivePath, derivePathLength, hash, hashLength, keyType, pin, pinLessMode, session, and signatureType.
|
inline |
Securely wipes the PIN buffer.
Definition at line 103 of file CryptnoxWallet.h.
References pin, and CW_Utils::secure_wipe().
| const uint8_t* CW_SignRequest::derivePath |
BIP32 path bytes for DERIVE modes; NULL for CURR / PINLESS modes.
Definition at line 82 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), and setup().
| uint8_t CW_SignRequest::derivePathLength |
Length of derivePath in bytes (must be a multiple of 4).
Definition at line 83 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), and setup().
| const uint8_t* CW_SignRequest::hash |
Pointer to the hash to sign (typically 32 bytes — SHA-256 of the transaction).
Definition at line 80 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), loop(), setup(), and CryptnoxWallet::validateSignRequest().
| uint8_t CW_SignRequest::hashLength |
Length of hash in bytes (must be ≤ CW_HASH_SIZE).
Definition at line 81 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), loop(), setup(), and CryptnoxWallet::validateSignRequest().
| uint8_t CW_SignRequest::keyType |
Key / path type — one of the CW_SIGN_CURR_*, CW_SIGN_DERIVE_*, CW_SIGN_PINLESS_K1 constants.
Definition at line 76 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), CryptnoxWallet::sendSignApdu(), and CryptnoxWallet::validateSignRequest().
| uint8_t CW_SignRequest::pin[CW_MAX_PIN_LENGTH] |
PIN bytes (4–9 ASCII digits). Zero-padded; cleared in the destructor.
Definition at line 78 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), loop(), setup(), CryptnoxWallet::validateSignRequest(), and ~CW_SignRequest().
| bool CW_SignRequest::pinLessMode |
false = PIN path, true = PIN-less path (requires keyType == CW_SIGN_PINLESS_K1).
Definition at line 79 of file CryptnoxWallet.h.
Referenced by CryptnoxWallet::buildSignPayload(), CW_SignRequest(), and CryptnoxWallet::validateSignRequest().
| CW_SecureSession& CW_SignRequest::session |
Reference to an open secure session.
Definition at line 75 of file CryptnoxWallet.h.
Referenced by CW_SignRequest(), CryptnoxWallet::sendSignApdu(), and CryptnoxWallet::validateSignRequest().
| uint8_t CW_SignRequest::signatureType |
Signature format — one of CW_SIGN_SIG_ECDSA_LOW_S, CW_SIGN_SIG_ECDSA_EOSIO, CW_SIGN_SIG_SCHNORR_BIP340.
Definition at line 77 of file CryptnoxWallet.h.
Referenced by CW_SignRequest(), and CryptnoxWallet::sendSignApdu().