diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-02-07 15:00:00 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-02-07 15:00:00 -0500 |
commit | 4caa5ee724d33b31e9cb7d57964b461ecec76c5a (patch) | |
tree | 8d07873048c1c7eead80b92c70eca77bc8ec4866 /xed25519.h | |
parent | dde43de786bb890b98e6903a075d4a732aa3b9a7 (diff) | |
download | cryptopp-git-4caa5ee724d33b31e9cb7d57964b461ecec76c5a.tar.gz |
Add SecretToPublicKey function for ed25519
Also remove IsClamped. Clamping occurs with ed25519, but it happens inside the Donna code. It is not needed elsewhere for ed25519.
Diffstat (limited to 'xed25519.h')
-rw-r--r-- | xed25519.h | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -452,17 +452,6 @@ struct ed25519PrivateKey : public PKCS8PrivateKey void SetPrivateExponent(const Integer &x);
const Integer& GetPrivateExponent() const;
- /// \brief Clamp a private key
- /// \param y public key
- /// \param x private key
- /// \details ClampKeys() clamps a private key and then regenerates the
- /// public key from the private key.
- void ClampKeys(byte y[PUBLIC_KEYLENGTH], byte x[SECRET_KEYLENGTH]) const;
-
- /// \brief Determine if private key is clamped
- /// \param x private key
- bool IsClamped(const byte x[SECRET_KEYLENGTH]) const;
-
/// \brief Test if a key has small order
/// \param y public key
bool IsSmallOrder(const byte y[PUBLIC_KEYLENGTH]) const;
@@ -482,6 +471,10 @@ struct ed25519PrivateKey : public PKCS8PrivateKey }
protected:
+ // Create a public key from a private key
+ void SecretToPublicKey(byte y[PUBLIC_KEYLENGTH], const byte x[SECRET_KEYLENGTH]) const;
+
+protected:
FixedSizeSecBlock<byte, SECRET_KEYLENGTH> m_sk;
FixedSizeSecBlock<byte, PUBLIC_KEYLENGTH> m_pk;
OID m_oid; // preferred OID
|