We have to save text0 each time round the outer loop.
authorBen Laurie <ben@openssl.org>
Thu, 12 Feb 2004 19:32:57 +0000 (19:32 +0000)
committerBen Laurie <ben@openssl.org>
Thu, 12 Feb 2004 19:32:57 +0000 (19:32 +0000)
fips/des/fips_desmovs.c

index 79b99915ee8e17e6c44b2dfc61aab93dda02eb55..9871c0b92ae083f3e3148e6fca8221a1065b8970 100644 (file)
@@ -274,8 +274,6 @@ void do_mct(char *amode,
        exit(1);
        }
 
-    memcpy(text0,text,8);
-
     for(i=0 ; i < 400 ; ++i)
        {
        int j;
@@ -302,6 +300,8 @@ void do_mct(char *amode,
        if(imode == CFB1)
            text[0]<<=7;
 
+       memcpy(text0,text,8);
+
        for(j=0 ; j < 10000 ; ++j)
            {
            unsigned char old_text[8];