aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/auth.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-09-21 19:03:09 +0200
committerSylvain Munaut <tnt@246tNt.com>2010-09-21 19:03:09 +0200
commit0230b34dc5ea2e9f8ef1ee34b612a7165315bb5b (patch)
treef97da8a6c648418583c37a68cc87baf377628e3c /openbsc/src/auth.c
parentaf8a0104481846858bfe3ada9ddf3a2a42c38818 (diff)
auth: Fix XOR algorithm
Thanks to the person on the ml that pointed this bug. Sorry I don't remember who (it was a while ago and somehow didn't got fixed at that time) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'openbsc/src/auth.c')
-rw-r--r--openbsc/src/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/auth.c b/openbsc/src/auth.c
index f57b668ef..91039016e 100644
--- a/openbsc/src/auth.c
+++ b/openbsc/src/auth.c
@@ -44,7 +44,7 @@ _use_xor(struct gsm_auth_info *ainfo, struct gsm_auth_tuple *atuple)
for (i=0; i<4; i++)
atuple->sres[i] = atuple->rand[i] ^ ainfo->a3a8_ki[i];
- for (i=8; i<12; i++)
+ for (i=4; i<12; i++)
atuple->kc[i-4] = atuple->rand[i] ^ ainfo->a3a8_ki[i];
return 0;