prop224: API for the creation of blinded keys

Add a function for both the client and service side that is building a blinded
key from a keypair (service) and from a public key (client). Those two
functions uses the current time period information to build the key.

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet
2017-02-06 12:26:36 -05:00
committed by Nick Mathewson
parent 44e3255c4d
commit 9052530bdd
3 changed files with 136 additions and 7 deletions
+3 -3
View File
@@ -330,18 +330,18 @@ test_time_period(void *arg)
tt_int_op(retval, ==, 0);
/* Check that the time period number is right */
tn = get_time_period_num(fake_time);
tn = hs_get_time_period_num(fake_time);
tt_u64_op(tn, ==, 16903);
/* Increase current time to 11:59:59 UTC and check that the time period
number is still the same */
fake_time += 3599;
tn = get_time_period_num(fake_time);
tn = hs_get_time_period_num(fake_time);
tt_u64_op(tn, ==, 16903);
/* Now take time to 12:00:00 UTC and check that the time period rotated */
fake_time += 1;
tn = get_time_period_num(fake_time);
tn = hs_get_time_period_num(fake_time);
tt_u64_op(tn, ==, 16904);
/* Now also check our hs_get_next_time_period_num() function */