diff options
Diffstat (limited to 'src/lib/anastasis_recovery.c')
-rw-r--r-- | src/lib/anastasis_recovery.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/anastasis_recovery.c b/src/lib/anastasis_recovery.c index c425398..95c131d 100644 --- a/src/lib/anastasis_recovery.c +++ b/src/lib/anastasis_recovery.c | |||
@@ -47,7 +47,7 @@ struct ANASTASIS_Challenge | |||
47 | /** | 47 | /** |
48 | * Salt; used to derive hash from security question answers. | 48 | * Salt; used to derive hash from security question answers. |
49 | */ | 49 | */ |
50 | struct ANASTASIS_CRYPTO_QuestionSaltP salt; | 50 | struct ANASTASIS_CRYPTO_QuestionSaltP question_salt; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Provider salt; used to derive our key material from our identity | 53 | * Provider salt; used to derive our key material from our identity |
@@ -146,7 +146,7 @@ struct DecryptionPolicy | |||
146 | /** | 146 | /** |
147 | * Salt used to decrypt master key. | 147 | * Salt used to decrypt master key. |
148 | */ | 148 | */ |
149 | struct ANASTASIS_CRYPTO_MasterSaltP salt; | 149 | struct ANASTASIS_CRYPTO_MasterSaltP master_salt; |
150 | 150 | ||
151 | }; | 151 | }; |
152 | 152 | ||
@@ -437,7 +437,7 @@ truth_solve_cb (void *cls, | |||
437 | key_shares[l] = recovery->solved_challenges[m]->key_share; | 437 | key_shares[l] = recovery->solved_challenges[m]->key_share; |
438 | ANASTASIS_CRYPTO_policy_key_derive (key_shares, | 438 | ANASTASIS_CRYPTO_policy_key_derive (key_shares, |
439 | rdps->pub_details.challenges_length, | 439 | rdps->pub_details.challenges_length, |
440 | &rdps->salt, | 440 | &rdps->master_salt, |
441 | &policy_key); | 441 | &policy_key); |
442 | GNUNET_assert (NULL != rdps->emk); | 442 | GNUNET_assert (NULL != rdps->emk); |
443 | GNUNET_assert (rdps->emk_size > 0); | 443 | GNUNET_assert (rdps->emk_size > 0); |
@@ -552,7 +552,7 @@ ANASTASIS_challenge_answer ( | |||
552 | c->answer = GNUNET_strdup (answer_str); | 552 | c->answer = GNUNET_strdup (answer_str); |
553 | ANASTASIS_CRYPTO_secure_answer_hash (answer_str, | 553 | ANASTASIS_CRYPTO_secure_answer_hash (answer_str, |
554 | &c->ci.uuid, | 554 | &c->ci.uuid, |
555 | &c->salt, | 555 | &c->question_salt, |
556 | &hashed_answer); | 556 | &hashed_answer); |
557 | return ANASTASIS_challenge_answer3 (c, | 557 | return ANASTASIS_challenge_answer3 (c, |
558 | psp, | 558 | psp, |
@@ -824,8 +824,8 @@ policy_lookup_cb (void *cls, | |||
824 | &instructions), | 824 | &instructions), |
825 | GNUNET_JSON_spec_fixed_auto ("truth_key", | 825 | GNUNET_JSON_spec_fixed_auto ("truth_key", |
826 | &cs->truth_key), | 826 | &cs->truth_key), |
827 | GNUNET_JSON_spec_fixed_auto ("truth_salt", | 827 | GNUNET_JSON_spec_fixed_auto ("question_salt", |
828 | &cs->salt), | 828 | &cs->question_salt), |
829 | GNUNET_JSON_spec_fixed_auto ("provider_salt", | 829 | GNUNET_JSON_spec_fixed_auto ("provider_salt", |
830 | &cs->provider_salt), | 830 | &cs->provider_salt), |
831 | GNUNET_JSON_spec_string ("escrow_type", | 831 | GNUNET_JSON_spec_string ("escrow_type", |
@@ -871,8 +871,8 @@ policy_lookup_cb (void *cls, | |||
871 | GNUNET_JSON_spec_varsize ("master_key", | 871 | GNUNET_JSON_spec_varsize ("master_key", |
872 | &dp->emk, | 872 | &dp->emk, |
873 | &dp->emk_size), | 873 | &dp->emk_size), |
874 | GNUNET_JSON_spec_fixed_auto ("salt", | 874 | GNUNET_JSON_spec_fixed_auto ("master_salt", |
875 | &dp->salt), | 875 | &dp->master_salt), |
876 | GNUNET_JSON_spec_json ("uuids", | 876 | GNUNET_JSON_spec_json ("uuids", |
877 | &uuids), | 877 | &uuids), |
878 | GNUNET_JSON_spec_end () | 878 | GNUNET_JSON_spec_end () |
@@ -1048,8 +1048,8 @@ ANASTASIS_recovery_serialize (const struct ANASTASIS_Recovery *r) | |||
1048 | GNUNET_JSON_pack_data_varsize ("emk", | 1048 | GNUNET_JSON_pack_data_varsize ("emk", |
1049 | dp->emk, | 1049 | dp->emk, |
1050 | dp->emk_size), | 1050 | dp->emk_size), |
1051 | GNUNET_JSON_pack_data_auto ("salt", | 1051 | GNUNET_JSON_pack_data_auto ("master_salt", |
1052 | &dp->salt), | 1052 | &dp->master_salt), |
1053 | GNUNET_JSON_pack_array_steal ("challenges", | 1053 | GNUNET_JSON_pack_array_steal ("challenges", |
1054 | c_arr)); | 1054 | c_arr)); |
1055 | GNUNET_assert (0 == | 1055 | GNUNET_assert (0 == |
@@ -1070,8 +1070,8 @@ ANASTASIS_recovery_serialize (const struct ANASTASIS_Recovery *r) | |||
1070 | ANASTASIS_CRYPTO_uuid2s (&c->ci.uuid)), | 1070 | ANASTASIS_CRYPTO_uuid2s (&c->ci.uuid)), |
1071 | GNUNET_JSON_pack_data_auto ("truth_key", | 1071 | GNUNET_JSON_pack_data_auto ("truth_key", |
1072 | &c->truth_key), | 1072 | &c->truth_key), |
1073 | GNUNET_JSON_pack_data_auto ("salt", | 1073 | GNUNET_JSON_pack_data_auto ("question_salt", |
1074 | &c->salt), | 1074 | &c->question_salt), |
1075 | GNUNET_JSON_pack_data_auto ("provider_salt", | 1075 | GNUNET_JSON_pack_data_auto ("provider_salt", |
1076 | &c->provider_salt), | 1076 | &c->provider_salt), |
1077 | GNUNET_JSON_pack_allow_null ( | 1077 | GNUNET_JSON_pack_allow_null ( |
@@ -1159,8 +1159,8 @@ parse_cs_array (struct ANASTASIS_Recovery *r, | |||
1159 | &instructions), | 1159 | &instructions), |
1160 | GNUNET_JSON_spec_fixed_auto ("truth_key", | 1160 | GNUNET_JSON_spec_fixed_auto ("truth_key", |
1161 | &c->truth_key), | 1161 | &c->truth_key), |
1162 | GNUNET_JSON_spec_fixed_auto ("salt", | 1162 | GNUNET_JSON_spec_fixed_auto ("question_salt", |
1163 | &c->salt), | 1163 | &c->question_salt), |
1164 | GNUNET_JSON_spec_fixed_auto ("provider_salt", | 1164 | GNUNET_JSON_spec_fixed_auto ("provider_salt", |
1165 | &c->provider_salt), | 1165 | &c->provider_salt), |
1166 | GNUNET_JSON_spec_string ("type", | 1166 | GNUNET_JSON_spec_string ("type", |
@@ -1235,8 +1235,8 @@ parse_dps_array (struct ANASTASIS_Recovery *r, | |||
1235 | GNUNET_JSON_spec_varsize ("emk", | 1235 | GNUNET_JSON_spec_varsize ("emk", |
1236 | &dp->emk, | 1236 | &dp->emk, |
1237 | &dp->emk_size), | 1237 | &dp->emk_size), |
1238 | GNUNET_JSON_spec_fixed_auto ("salt", | 1238 | GNUNET_JSON_spec_fixed_auto ("master_salt", |
1239 | &dp->salt), | 1239 | &dp->master_salt), |
1240 | GNUNET_JSON_spec_json ("challenges", | 1240 | GNUNET_JSON_spec_json ("challenges", |
1241 | &challenges), | 1241 | &challenges), |
1242 | GNUNET_JSON_spec_end () | 1242 | GNUNET_JSON_spec_end () |