summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/des/asm')
-rw-r--r--src/lib/libcrypto/des/asm/crypt586.pl8
-rw-r--r--src/lib/libcrypto/des/asm/des-586.pl26
-rw-r--r--src/lib/libcrypto/des/asm/des686.pl20
-rw-r--r--src/lib/libcrypto/des/asm/desboth.pl8
4 files changed, 31 insertions, 31 deletions
diff --git a/src/lib/libcrypto/des/asm/crypt586.pl b/src/lib/libcrypto/des/asm/crypt586.pl
index 197c413ea6..3d41d82f69 100644
--- a/src/lib/libcrypto/des/asm/crypt586.pl
+++ b/src/lib/libcrypto/des/asm/crypt586.pl
@@ -14,7 +14,7 @@ require "x86asm.pl";
14$L="edi"; 14$L="edi";
15$R="esi"; 15$R="esi";
16 16
17&external_label("des_SPtrans"); 17&external_label("DES_SPtrans");
18&fcrypt_body("fcrypt_body"); 18&fcrypt_body("fcrypt_body");
19&asm_finish(); 19&asm_finish();
20 20
@@ -22,7 +22,7 @@ sub fcrypt_body
22 { 22 {
23 local($name,$do_ip)=@_; 23 local($name,$do_ip)=@_;
24 24
25 &function_begin($name,"EXTRN _des_SPtrans:DWORD"); 25 &function_begin($name,"EXTRN _DES_SPtrans:DWORD");
26 26
27 &comment(""); 27 &comment("");
28 &comment("Load the 2 words"); 28 &comment("Load the 2 words");
@@ -39,11 +39,11 @@ sub fcrypt_body
39 { 39 {
40 &comment(""); 40 &comment("");
41 &comment("Round $i"); 41 &comment("Round $i");
42 &D_ENCRYPT($i,$L,$R,$i*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 42 &D_ENCRYPT($i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
43 43
44 &comment(""); 44 &comment("");
45 &comment("Round ".sprintf("%d",$i+1)); 45 &comment("Round ".sprintf("%d",$i+1));
46 &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 46 &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
47 } 47 }
48 &mov("ebx", &swtmp(0)); 48 &mov("ebx", &swtmp(0));
49 &mov("eax", $L); 49 &mov("eax", $L);
diff --git a/src/lib/libcrypto/des/asm/des-586.pl b/src/lib/libcrypto/des/asm/des-586.pl
index c890766bc9..0d08e8a3a9 100644
--- a/src/lib/libcrypto/des/asm/des-586.pl
+++ b/src/lib/libcrypto/des/asm/des-586.pl
@@ -19,21 +19,21 @@ require "desboth.pl";
19$L="edi"; 19$L="edi";
20$R="esi"; 20$R="esi";
21 21
22&external_label("des_SPtrans"); 22&external_label("DES_SPtrans");
23&des_encrypt("des_encrypt1",1); 23&DES_encrypt("DES_encrypt1",1);
24&des_encrypt("des_encrypt2",0); 24&DES_encrypt("DES_encrypt2",0);
25&des_encrypt3("des_encrypt3",1); 25&DES_encrypt3("DES_encrypt3",1);
26&des_encrypt3("des_decrypt3",0); 26&DES_encrypt3("DES_decrypt3",0);
27&cbc("des_ncbc_encrypt","des_encrypt1","des_encrypt1",0,4,5,3,5,-1); 27&cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1);
28&cbc("des_ede3_cbc_encrypt","des_encrypt3","des_decrypt3",0,6,7,3,4,5); 28&cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5);
29 29
30&asm_finish(); 30&asm_finish();
31 31
32sub des_encrypt 32sub DES_encrypt
33 { 33 {
34 local($name,$do_ip)=@_; 34 local($name,$do_ip)=@_;
35 35
36 &function_begin_B($name,"EXTRN _des_SPtrans:DWORD"); 36 &function_begin_B($name,"EXTRN _DES_SPtrans:DWORD");
37 37
38 &push("esi"); 38 &push("esi");
39 &push("edi"); 39 &push("edi");
@@ -80,11 +80,11 @@ sub des_encrypt
80 { 80 {
81 &comment(""); 81 &comment("");
82 &comment("Round $i"); 82 &comment("Round $i");
83 &D_ENCRYPT($i,$L,$R,$i*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 83 &D_ENCRYPT($i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
84 84
85 &comment(""); 85 &comment("");
86 &comment("Round ".sprintf("%d",$i+1)); 86 &comment("Round ".sprintf("%d",$i+1));
87 &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 87 &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
88 } 88 }
89 &jmp(&label("end")); 89 &jmp(&label("end"));
90 90
@@ -94,10 +94,10 @@ sub des_encrypt
94 { 94 {
95 &comment(""); 95 &comment("");
96 &comment("Round $i"); 96 &comment("Round $i");
97 &D_ENCRYPT(15-$i,$L,$R,$i*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 97 &D_ENCRYPT(15-$i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
98 &comment(""); 98 &comment("");
99 &comment("Round ".sprintf("%d",$i-1)); 99 &comment("Round ".sprintf("%d",$i-1));
100 &D_ENCRYPT(15-$i+1,$R,$L,($i-1)*2,$ks,"des_SPtrans","eax","ebx","ecx","edx"); 100 &D_ENCRYPT(15-$i+1,$R,$L,($i-1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
101 } 101 }
102 102
103 &set_label("end"); 103 &set_label("end");
diff --git a/src/lib/libcrypto/des/asm/des686.pl b/src/lib/libcrypto/des/asm/des686.pl
index 84c3e85438..d3ad5d5edd 100644
--- a/src/lib/libcrypto/des/asm/des686.pl
+++ b/src/lib/libcrypto/des/asm/des686.pl
@@ -46,19 +46,19 @@ EOF
46$L="edi"; 46$L="edi";
47$R="esi"; 47$R="esi";
48 48
49&des_encrypt("des_encrypt1",1); 49&DES_encrypt("DES_encrypt1",1);
50&des_encrypt("des_encrypt2",0); 50&DES_encrypt("DES_encrypt2",0);
51 51
52&des_encrypt3("des_encrypt3",1); 52&DES_encrypt3("DES_encrypt3",1);
53&des_encrypt3("des_decrypt3",0); 53&DES_encrypt3("DES_decrypt3",0);
54 54
55&file_end(); 55&file_end();
56 56
57sub des_encrypt 57sub DES_encrypt
58 { 58 {
59 local($name,$do_ip)=@_; 59 local($name,$do_ip)=@_;
60 60
61 &function_begin($name,"EXTRN _des_SPtrans:DWORD"); 61 &function_begin($name,"EXTRN _DES_SPtrans:DWORD");
62 62
63 &comment(""); 63 &comment("");
64 &comment("Load the 2 words"); 64 &comment("Load the 2 words");
@@ -94,11 +94,11 @@ sub des_encrypt
94 { 94 {
95 &comment(""); 95 &comment("");
96 &comment("Round $i"); 96 &comment("Round $i");
97 &D_ENCRYPT($L,$R,$i*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); 97 &D_ENCRYPT($L,$R,$i*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx");
98 98
99 &comment(""); 99 &comment("");
100 &comment("Round ".sprintf("%d",$i+1)); 100 &comment("Round ".sprintf("%d",$i+1));
101 &D_ENCRYPT($R,$L,($i+1)*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); 101 &D_ENCRYPT($R,$L,($i+1)*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx");
102 } 102 }
103 &jmp(&label("end")); 103 &jmp(&label("end"));
104 104
@@ -108,10 +108,10 @@ sub des_encrypt
108 { 108 {
109 &comment(""); 109 &comment("");
110 &comment("Round $i"); 110 &comment("Round $i");
111 &D_ENCRYPT($L,$R,$i*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); 111 &D_ENCRYPT($L,$R,$i*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx");
112 &comment(""); 112 &comment("");
113 &comment("Round ".sprintf("%d",$i-1)); 113 &comment("Round ".sprintf("%d",$i-1));
114 &D_ENCRYPT($R,$L,($i-1)*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); 114 &D_ENCRYPT($R,$L,($i-1)*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx");
115 } 115 }
116 116
117 &set_label("end"); 117 &set_label("end");
diff --git a/src/lib/libcrypto/des/asm/desboth.pl b/src/lib/libcrypto/des/asm/desboth.pl
index d5106414db..eec00886e4 100644
--- a/src/lib/libcrypto/des/asm/desboth.pl
+++ b/src/lib/libcrypto/des/asm/desboth.pl
@@ -3,7 +3,7 @@
3$L="edi"; 3$L="edi";
4$R="esi"; 4$R="esi";
5 5
6sub des_encrypt3 6sub DES_encrypt3
7 { 7 {
8 local($name,$enc)=@_; 8 local($name,$enc)=@_;
9 9
@@ -47,15 +47,15 @@ sub des_encrypt3
47 &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); 47 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
48 &mov(&swtmp(1), "eax"); 48 &mov(&swtmp(1), "eax");
49 &mov(&swtmp(0), "ebx"); 49 &mov(&swtmp(0), "ebx");
50 &call("des_encrypt2"); 50 &call("DES_encrypt2");
51 &mov(&swtmp(2), (DWC(($enc)?"0":"1"))); 51 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
52 &mov(&swtmp(1), "edi"); 52 &mov(&swtmp(1), "edi");
53 &mov(&swtmp(0), "ebx"); 53 &mov(&swtmp(0), "ebx");
54 &call("des_encrypt2"); 54 &call("DES_encrypt2");
55 &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); 55 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
56 &mov(&swtmp(1), "esi"); 56 &mov(&swtmp(1), "esi");
57 &mov(&swtmp(0), "ebx"); 57 &mov(&swtmp(0), "ebx");
58 &call("des_encrypt2"); 58 &call("DES_encrypt2");
59 59
60 &stack_pop(3); 60 &stack_pop(3);
61 &mov($L,&DWP(0,"ebx","",0)); 61 &mov($L,&DWP(0,"ebx","",0));