allow set prv.key from remote, validate new prv.key

This commit is contained in:
taco 2026-01-25 00:51:48 +11:00
parent 988287bfd7
commit 96ef5e5efe
7 changed files with 73 additions and 20 deletions

View file

@ -76,6 +76,13 @@ public:
*/
void calcSharedSecret(uint8_t* secret, const uint8_t* other_pub_key) const;
/**
* \brief Validates that a given private key can be used for ECDH / shared-secret operations.
* \param prv IN - the private key to validate (must be PRV_KEY_SIZE bytes)
* \returns true, if the private key is valid for login.
*/
static bool validatePrivateKey(const uint8_t prv[64]);
bool readFrom(Stream& s);
bool writeTo(Stream& s) const;
void printTo(Stream& s) const;