summaryrefslogtreecommitdiff
path: root/src/key_derivation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/key_derivation.c')
-rw-r--r--src/key_derivation.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/key_derivation.c b/src/key_derivation.c
index 84abdae..af3228d 100644
--- a/src/key_derivation.c
+++ b/src/key_derivation.c
@@ -239,11 +239,10 @@ int key_derivation_aesctr_calc_ctr(key_derivation_t* kd, seq_nr_t* r, satp_prf_l
return 0;
}
- int faked_msb = 0;
- if(!kd->master_salt_.buf_[0]) {
+#ifdef ANYTUN_02_COMPAT
+ if(!kd->master_salt_.buf_[0])
kd->master_salt_.buf_[0] = 1;
- faked_msb = 1;
- }
+#endif
if(kd->master_salt_.length_ != KD_AESCTR_SALT_LENGTH) {
log_printf(ERR, "master salt has the wrong length");
@@ -254,13 +253,6 @@ int key_derivation_aesctr_calc_ctr(key_derivation_t* kd, seq_nr_t* r, satp_prf_l
params->ctr_.params_.label_ ^= label;
params->ctr_.params_.r_ ^= SEQ_NR_T_HTON(*r);
-#ifndef ANYTUN_02_COMPAT
- if(faked_msb) {
- kd->master_salt_.buf_[0] = 0;
- params->ctr_.buf_[0] = 0;
- }
-#endif
-
return 1;
}