summaryrefslogtreecommitdiff
path: root/xed25519.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-02-07 17:05:23 -0500
committerJeffrey Walton <noloader@gmail.com>2019-02-07 17:05:23 -0500
commitcae5f8e0fd2389f731bc66eb0f10940a95cb250e (patch)
tree6cc44398d2daa27ab5cad3762f5b7a0de590ef77 /xed25519.h
parentde85886ca48c44fef76271659d1047f1de245f58 (diff)
downloadcryptopp-git-cae5f8e0fd2389f731bc66eb0f10940a95cb250e.tar.gz
Add SecretToPublicKey function for x25519
Diffstat (limited to 'xed25519.h')
-rw-r--r--xed25519.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xed25519.h b/xed25519.h
index bf466f85..363d7d7c 100644
--- a/xed25519.h
+++ b/xed25519.h
@@ -111,11 +111,10 @@ public:
x25519(const OID &oid);
/// \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;
+ void ClampKey(byte x[SECRET_KEYLENGTH]) const;
/// \brief Determine if private key is clamped
/// \param x private key
@@ -237,6 +236,10 @@ public:
bool Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const;
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