diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-02-07 17:05:23 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-02-07 17:05:23 -0500 |
commit | cae5f8e0fd2389f731bc66eb0f10940a95cb250e (patch) | |
tree | 6cc44398d2daa27ab5cad3762f5b7a0de590ef77 /xed25519.h | |
parent | de85886ca48c44fef76271659d1047f1de245f58 (diff) | |
download | cryptopp-git-cae5f8e0fd2389f731bc66eb0f10940a95cb250e.tar.gz |
Add SecretToPublicKey function for x25519
Diffstat (limited to 'xed25519.h')
-rw-r--r-- | xed25519.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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
|