Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2020-02-29 09:47:56 +0300
committerSimon Tatham <anakin@pobox.com>2020-03-01 23:09:01 +0300
commitcfa3f8b1929b6f954582d3820b246587878e728d (patch)
tree501e5f7e6cc75c212ebdb34fdce754412cff4d05 /sshkeygen.h
parent18be6aec587c83bf2ddc94536d33bec8ffbfe256 (diff)
PrimeCandidateSource: two extra query functions.
pcs_get_upper_bound lets the holder of a PrimeCandidateSource ask what is the largest value it might ever generate. pcs_get_bits_remaining lets it ask how much extra entropy it's going to generate on top of the requirements that have already been input into it. Both of these will be needed by the upcoming provable-prime work to decide what sizes of subsidiary prime to generate.
Diffstat (limited to 'sshkeygen.h')
-rw-r--r--sshkeygen.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sshkeygen.h b/sshkeygen.h
index 6a9594f2..f8f3159f 100644
--- a/sshkeygen.h
+++ b/sshkeygen.h
@@ -70,6 +70,8 @@ void pcs_inspect(PrimeCandidateSource *pcs, mp_int **limit_out,
/* Query functions for primegen to use */
unsigned pcs_get_bits(PrimeCandidateSource *pcs);
+unsigned pcs_get_bits_remaining(PrimeCandidateSource *pcs);
+mp_int *pcs_get_upper_bound(PrimeCandidateSource *pcs);
mp_int **pcs_get_known_prime_factors(PrimeCandidateSource *pcs, size_t *nout);
/* ----------------------------------------------------------------------