summaryrefslogtreecommitdiff
path: root/xed25519.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-02-07 15:00:00 -0500
committerJeffrey Walton <noloader@gmail.com>2019-02-07 15:00:00 -0500
commit4caa5ee724d33b31e9cb7d57964b461ecec76c5a (patch)
tree8d07873048c1c7eead80b92c70eca77bc8ec4866 /xed25519.h
parentdde43de786bb890b98e6903a075d4a732aa3b9a7 (diff)
downloadcryptopp-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.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/xed25519.h b/xed25519.h
index bb6ff228..bf466f85 100644
--- a/xed25519.h
+++ b/xed25519.h
@@ -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