Crypto++ (aka Cryptopp) 8.6.0 and earlier contains a timing leakage in MakePublicKey(). There is a clear correlation between execution time and private key length, which may cause disclosure of the length information of the private key. This might allow attackers to conduct timing attacks. NOTE: this report is disputed by the vendor and multiple third parties. The execution-time differences are intentional. A user may make a choice of a longer key as a tradeoff between strength and performance. In making this choice, the amount of information leaked to an adversary is of infinitesimal value
I'm using Crypto++ built by the latest version of source code in this repository on Ubuntu 18.04. 

The function is as follows:
```c++
void ECC_PrivatetoPublic(string priv){
    using namespace CryptoPP;
    clock_t start, finish;
    ECDSA<ECP, SHA256>::PrivateKey privateKey;
    ECDSA<ECP, SHA256>::PublicKey publicKey;
    const Integer privStr(priv.c_str());
    const DL_GroupParameters_EC<ECP>& curve = ASN1::secp521r1();
    privateKey.Initialize(curve, privStr);
    privateKey.MakePublicKey(publicKey);
    std::string x = IntToString<>(publicKey.GetPublicElement().x, 10);
    std::string y = IntToString<>(publicKey.GetPublicElement().y, 10);
    printf("%s\n%s\n", x.c_str(), y.c_str());
    return;
}
```
It seems that the execution time of `privateKey.MakePublicKey(publicKey)` is positively correlated with the length of the private key instead of a constant value. I did a simple experiment and heres the result. But I haven't studied the reason yet.

![Wizard data (2)](https://user-images.githubusercontent.com/60092417/139213492-dbdad26d-54e7-479a-a8d7-9f03cea053f1.png)

I suppose this may leak the length information of the input private key and facilitate malicious attacks on key decryption. 

Besides, the execution time becomes abnormally long when the private key reaches hundreds of bytes long, which causes a little inconvenience to me.

Hope you can check this case.
Correlation Between Key Length and Execution Time 
This is a GitHub Issue
repo:cryptopp
owner:weidai11
Title : Correlation Between Key Length and Execution Time 
Issue date:

--- start body ---
I'm using Crypto++ built by the latest version of source code in this repository on Ubuntu 18.04. 

The function is as follows:
```c++
void ECC_PrivatetoPublic(string priv){
    using namespace CryptoPP;
    clock_t start, finish;
    ECDSA<ECP, SHA256>::PrivateKey privateKey;
    ECDSA<ECP, SHA256>::PublicKey publicKey;
    const Integer privStr(priv.c_str());
    const DL_GroupParameters_EC<ECP>& curve = ASN1::secp521r1();
    privateKey.Initialize(curve, privStr);
    privateKey.MakePublicKey(publicKey);
    std::string x = IntToString<>(publicKey.GetPublicElement().x, 10);
    std::string y = IntToString<>(publicKey.GetPublicElement().y, 10);
    printf("%s\n%s\n", x.c_str(), y.c_str());
    return;
}
```
It seems that the execution time of `privateKey.MakePublicKey(publicKey)` is positively correlated with the length of the private key instead of a constant value. I did a simple experiment and heres the result. But I haven't studied the reason yet.

![Wizard data (2)](https://user-images.githubusercontent.com/60092417/139213492-dbdad26d-54e7-479a-a8d7-9f03cea053f1.png)

I suppose this may leak the length information of the input private key and facilitate malicious attacks on key decryption. 

Besides, the execution time becomes abnormally long when the private key reaches hundreds of bytes long, which causes a little inconvenience to me.

Hope you can check this case.
--- end body ---

The issue describes a potential timing attack vulnerability where the execution time of the `MakePublicKey` function varies based on the length of the private key. This could allow an attacker to infer information about the private key based on the time taken for the operation, potentially leading to key recovery or decryption attacks.