Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: How to log out private keys it's trying? #48

Open
kisamoto opened this issue Sep 27, 2024 · 1 comment
Open

Q: How to log out private keys it's trying? #48

kisamoto opened this issue Sep 27, 2024 · 1 comment

Comments

@kisamoto
Copy link

I know this is very inefficient but it's to debug the keys that are being tried in my OpenCL setup.

How can I debug the private keys that are being generated? Can I output them to the log file somehow?

Thank you.

@plaber
Copy link

plaber commented Nov 14, 2024

public BigInteger createSecret(int maximumBitLength, Random random) {

just add this code

    public BigInteger createSecret(int maximumBitLength, Random random) {
        BigInteger secret = new BigInteger(maximumBitLength, random);
	//logopogo
	DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss,SSS");
	LocalDateTime now = LocalDateTime.now();
	System.out.println(dtf.format(now) + " sc " + secret.toString(2));
        return secret;
    }

and this

import java.time.format.DateTimeFormatter;
import java.time.LocalDateTime;

to begin of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants