X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=arcfour%2Farcfour-asm.S;h=63932abe2d25a87a644e8e1b3e907a9877001c1c;hb=32705e6283b34dd709dc8fafdf5c3e32d6a944a1;hp=1ef8218ce971a608ffaf096959dc40fb63141804;hpb=d32eba56ce10ea6b9eff123b50d9842673b38f2b;p=avr-crypto-lib.git diff --git a/arcfour/arcfour-asm.S b/arcfour/arcfour-asm.S index 1ef8218..63932ab 100644 --- a/arcfour/arcfour-asm.S +++ b/arcfour/arcfour-asm.S @@ -40,8 +40,8 @@ * this function initialises the context * param1: 16-bit pointer to the key * given in r24:r25 - * param2: 8-bit integer indicating keylength in byte - * given in r22 + * param2: 8-bit integer indicating keylength in bits + * given in r22:r23 * param3: 16-bit pointer to a ctx struct * given in r20:r21 */ @@ -52,7 +52,12 @@ arcfour_init: st X+, r1 st X+, r1 /* X points to S */ movw r20, r26 /* store pointer to S in r21:r20 */ - + lsr r23 + ror r22 + lsr r23 + ror r22 + lsr r23 + ror r22 1: st X+, r1 inc r1