diff options
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/ecdh/Makefile | 17 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_rdrand.c | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/mdc2/mdc2dgst.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/Makefile | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/perlasm/x86masm.pl | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/asm/rc5-586.pl | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5_ecb.c | 80 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5_enc.c | 215 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5_skey.c | 113 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5cfb64.c | 122 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5ofb64.c | 111 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5speed.c | 277 | ||||
-rw-r--r-- | src/lib/libcrypto/srp/srp_grps.h | 816 | ||||
-rw-r--r-- | src/lib/libcrypto/srp/srp_lib.c | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/srp/srp_vfy.c | 5 |
15 files changed, 1355 insertions, 431 deletions
diff --git a/src/lib/libcrypto/ecdh/Makefile b/src/lib/libcrypto/ecdh/Makefile index 65d8904ee8..ba05fea05c 100644 --- a/src/lib/libcrypto/ecdh/Makefile +++ b/src/lib/libcrypto/ecdh/Makefile | |||
@@ -84,17 +84,12 @@ ech_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | |||
84 | ech_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 84 | ech_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
85 | ech_err.o: ech_err.c | 85 | ech_err.o: ech_err.c |
86 | ech_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 86 | ech_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
87 | ech_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 87 | ech_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
88 | ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | 88 | ech_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h |
89 | ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | 89 | ech_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
90 | ech_key.o: ../../include/openssl/engine.h ../../include/openssl/evp.h | 90 | ech_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
91 | ech_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | 91 | ech_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
92 | ech_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 92 | ech_key.o: ech_key.c ech_locl.h |
93 | ech_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
94 | ech_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
95 | ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
96 | ech_key.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
97 | ech_key.o: ../../include/openssl/x509_vfy.h ech_key.c ech_locl.h | ||
98 | ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 93 | ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
99 | ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 94 | ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
100 | ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | 95 | ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
diff --git a/src/lib/libcrypto/engine/eng_rdrand.c b/src/lib/libcrypto/engine/eng_rdrand.c index a9ba5ae6f9..4e9e91d54b 100644 --- a/src/lib/libcrypto/engine/eng_rdrand.c +++ b/src/lib/libcrypto/engine/eng_rdrand.c | |||
@@ -104,6 +104,7 @@ static int bind_helper(ENGINE *e) | |||
104 | { | 104 | { |
105 | if (!ENGINE_set_id(e, engine_e_rdrand_id) || | 105 | if (!ENGINE_set_id(e, engine_e_rdrand_id) || |
106 | !ENGINE_set_name(e, engine_e_rdrand_name) || | 106 | !ENGINE_set_name(e, engine_e_rdrand_name) || |
107 | !ENGINE_set_flags(e, ENGINE_FLAGS_NO_REGISTER_ALL) || | ||
107 | !ENGINE_set_init_function(e, rdrand_init) || | 108 | !ENGINE_set_init_function(e, rdrand_init) || |
108 | !ENGINE_set_RAND(e, &rdrand_meth) ) | 109 | !ENGINE_set_RAND(e, &rdrand_meth) ) |
109 | return 0; | 110 | return 0; |
diff --git a/src/lib/libcrypto/mdc2/mdc2dgst.c b/src/lib/libcrypto/mdc2/mdc2dgst.c index b74bb1a759..d66ed6a1c6 100644 --- a/src/lib/libcrypto/mdc2/mdc2dgst.c +++ b/src/lib/libcrypto/mdc2/mdc2dgst.c | |||
@@ -59,9 +59,9 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <openssl/crypto.h> | ||
62 | #include <openssl/des.h> | 63 | #include <openssl/des.h> |
63 | #include <openssl/mdc2.h> | 64 | #include <openssl/mdc2.h> |
64 | #include <openssl/crypto.h> | ||
65 | 65 | ||
66 | #undef c2l | 66 | #undef c2l |
67 | #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ | 67 | #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ |
diff --git a/src/lib/libcrypto/modes/Makefile b/src/lib/libcrypto/modes/Makefile index c825b12f25..3d8bafd571 100644 --- a/src/lib/libcrypto/modes/Makefile +++ b/src/lib/libcrypto/modes/Makefile | |||
@@ -53,7 +53,10 @@ ghash-x86_64.s: asm/ghash-x86_64.pl | |||
53 | ghash-sparcv9.s: asm/ghash-sparcv9.pl | 53 | ghash-sparcv9.s: asm/ghash-sparcv9.pl |
54 | $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS) | 54 | $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS) |
55 | ghash-alpha.s: asm/ghash-alpha.pl | 55 | ghash-alpha.s: asm/ghash-alpha.pl |
56 | $(PERL) $< | $(CC) -E - | tee $@ > /dev/null | 56 | (preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \ |
57 | $(PERL) asm/ghash-alpha.pl > $$preproc && \ | ||
58 | $(CC) -E $$preproc > $@ && rm $$preproc) | ||
59 | |||
57 | ghash-parisc.s: asm/ghash-parisc.pl | 60 | ghash-parisc.s: asm/ghash-parisc.pl |
58 | $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ | 61 | $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ |
59 | 62 | ||
diff --git a/src/lib/libcrypto/perlasm/x86masm.pl b/src/lib/libcrypto/perlasm/x86masm.pl index 96b1b73e1a..f937d07c87 100644 --- a/src/lib/libcrypto/perlasm/x86masm.pl +++ b/src/lib/libcrypto/perlasm/x86masm.pl | |||
@@ -33,6 +33,7 @@ sub ::generic | |||
33 | sub ::call { &::emit("call",(&::islabel($_[0]) or "$nmdecor$_[0]")); } | 33 | sub ::call { &::emit("call",(&::islabel($_[0]) or "$nmdecor$_[0]")); } |
34 | sub ::call_ptr { &::emit("call",@_); } | 34 | sub ::call_ptr { &::emit("call",@_); } |
35 | sub ::jmp_ptr { &::emit("jmp",@_); } | 35 | sub ::jmp_ptr { &::emit("jmp",@_); } |
36 | sub ::lock { &::data_byte(0xf0); } | ||
36 | 37 | ||
37 | sub get_mem | 38 | sub get_mem |
38 | { my($size,$addr,$reg1,$reg2,$idx)=@_; | 39 | { my($size,$addr,$reg1,$reg2,$idx)=@_; |
diff --git a/src/lib/libcrypto/rc5/asm/rc5-586.pl b/src/lib/libcrypto/rc5/asm/rc5-586.pl index edff1d1e64..61ac6effc6 100644 --- a/src/lib/libcrypto/rc5/asm/rc5-586.pl +++ b/src/lib/libcrypto/rc5/asm/rc5-586.pl | |||
@@ -1,6 +1,7 @@ | |||
1 | #!/usr/local/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | push(@INC,"perlasm","../../perlasm"); | 3 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; |
4 | push(@INC,"${dir}","${dir}../../perlasm"); | ||
4 | require "x86asm.pl"; | 5 | require "x86asm.pl"; |
5 | require "cbc.pl"; | 6 | require "cbc.pl"; |
6 | 7 | ||
diff --git a/src/lib/libcrypto/rc5/rc5_ecb.c b/src/lib/libcrypto/rc5/rc5_ecb.c new file mode 100644 index 0000000000..e72b535507 --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5_ecb.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* crypto/rc5/rc5_ecb.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <openssl/rc5.h> | ||
60 | #include "rc5_locl.h" | ||
61 | #include <openssl/opensslv.h> | ||
62 | |||
63 | const char RC5_version[]="RC5" OPENSSL_VERSION_PTEXT; | ||
64 | |||
65 | void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, | ||
66 | RC5_32_KEY *ks, int encrypt) | ||
67 | { | ||
68 | unsigned long l,d[2]; | ||
69 | |||
70 | c2l(in,l); d[0]=l; | ||
71 | c2l(in,l); d[1]=l; | ||
72 | if (encrypt) | ||
73 | RC5_32_encrypt(d,ks); | ||
74 | else | ||
75 | RC5_32_decrypt(d,ks); | ||
76 | l=d[0]; l2c(l,out); | ||
77 | l=d[1]; l2c(l,out); | ||
78 | l=d[0]=d[1]=0; | ||
79 | } | ||
80 | |||
diff --git a/src/lib/libcrypto/rc5/rc5_enc.c b/src/lib/libcrypto/rc5/rc5_enc.c new file mode 100644 index 0000000000..f327d32a76 --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5_enc.c | |||
@@ -0,0 +1,215 @@ | |||
1 | /* crypto/rc5/rc5_enc.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include <openssl/rc5.h> | ||
61 | #include "rc5_locl.h" | ||
62 | |||
63 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, | ||
64 | long length, RC5_32_KEY *ks, unsigned char *iv, | ||
65 | int encrypt) | ||
66 | { | ||
67 | register unsigned long tin0,tin1; | ||
68 | register unsigned long tout0,tout1,xor0,xor1; | ||
69 | register long l=length; | ||
70 | unsigned long tin[2]; | ||
71 | |||
72 | if (encrypt) | ||
73 | { | ||
74 | c2l(iv,tout0); | ||
75 | c2l(iv,tout1); | ||
76 | iv-=8; | ||
77 | for (l-=8; l>=0; l-=8) | ||
78 | { | ||
79 | c2l(in,tin0); | ||
80 | c2l(in,tin1); | ||
81 | tin0^=tout0; | ||
82 | tin1^=tout1; | ||
83 | tin[0]=tin0; | ||
84 | tin[1]=tin1; | ||
85 | RC5_32_encrypt(tin,ks); | ||
86 | tout0=tin[0]; l2c(tout0,out); | ||
87 | tout1=tin[1]; l2c(tout1,out); | ||
88 | } | ||
89 | if (l != -8) | ||
90 | { | ||
91 | c2ln(in,tin0,tin1,l+8); | ||
92 | tin0^=tout0; | ||
93 | tin1^=tout1; | ||
94 | tin[0]=tin0; | ||
95 | tin[1]=tin1; | ||
96 | RC5_32_encrypt(tin,ks); | ||
97 | tout0=tin[0]; l2c(tout0,out); | ||
98 | tout1=tin[1]; l2c(tout1,out); | ||
99 | } | ||
100 | l2c(tout0,iv); | ||
101 | l2c(tout1,iv); | ||
102 | } | ||
103 | else | ||
104 | { | ||
105 | c2l(iv,xor0); | ||
106 | c2l(iv,xor1); | ||
107 | iv-=8; | ||
108 | for (l-=8; l>=0; l-=8) | ||
109 | { | ||
110 | c2l(in,tin0); tin[0]=tin0; | ||
111 | c2l(in,tin1); tin[1]=tin1; | ||
112 | RC5_32_decrypt(tin,ks); | ||
113 | tout0=tin[0]^xor0; | ||
114 | tout1=tin[1]^xor1; | ||
115 | l2c(tout0,out); | ||
116 | l2c(tout1,out); | ||
117 | xor0=tin0; | ||
118 | xor1=tin1; | ||
119 | } | ||
120 | if (l != -8) | ||
121 | { | ||
122 | c2l(in,tin0); tin[0]=tin0; | ||
123 | c2l(in,tin1); tin[1]=tin1; | ||
124 | RC5_32_decrypt(tin,ks); | ||
125 | tout0=tin[0]^xor0; | ||
126 | tout1=tin[1]^xor1; | ||
127 | l2cn(tout0,tout1,out,l+8); | ||
128 | xor0=tin0; | ||
129 | xor1=tin1; | ||
130 | } | ||
131 | l2c(xor0,iv); | ||
132 | l2c(xor1,iv); | ||
133 | } | ||
134 | tin0=tin1=tout0=tout1=xor0=xor1=0; | ||
135 | tin[0]=tin[1]=0; | ||
136 | } | ||
137 | |||
138 | void RC5_32_encrypt(unsigned long *d, RC5_32_KEY *key) | ||
139 | { | ||
140 | RC5_32_INT a,b,*s; | ||
141 | |||
142 | s=key->data; | ||
143 | |||
144 | a=d[0]+s[0]; | ||
145 | b=d[1]+s[1]; | ||
146 | E_RC5_32(a,b,s, 2); | ||
147 | E_RC5_32(a,b,s, 4); | ||
148 | E_RC5_32(a,b,s, 6); | ||
149 | E_RC5_32(a,b,s, 8); | ||
150 | E_RC5_32(a,b,s,10); | ||
151 | E_RC5_32(a,b,s,12); | ||
152 | E_RC5_32(a,b,s,14); | ||
153 | E_RC5_32(a,b,s,16); | ||
154 | if (key->rounds == 12) | ||
155 | { | ||
156 | E_RC5_32(a,b,s,18); | ||
157 | E_RC5_32(a,b,s,20); | ||
158 | E_RC5_32(a,b,s,22); | ||
159 | E_RC5_32(a,b,s,24); | ||
160 | } | ||
161 | else if (key->rounds == 16) | ||
162 | { | ||
163 | /* Do a full expansion to avoid a jump */ | ||
164 | E_RC5_32(a,b,s,18); | ||
165 | E_RC5_32(a,b,s,20); | ||
166 | E_RC5_32(a,b,s,22); | ||
167 | E_RC5_32(a,b,s,24); | ||
168 | E_RC5_32(a,b,s,26); | ||
169 | E_RC5_32(a,b,s,28); | ||
170 | E_RC5_32(a,b,s,30); | ||
171 | E_RC5_32(a,b,s,32); | ||
172 | } | ||
173 | d[0]=a; | ||
174 | d[1]=b; | ||
175 | } | ||
176 | |||
177 | void RC5_32_decrypt(unsigned long *d, RC5_32_KEY *key) | ||
178 | { | ||
179 | RC5_32_INT a,b,*s; | ||
180 | |||
181 | s=key->data; | ||
182 | |||
183 | a=d[0]; | ||
184 | b=d[1]; | ||
185 | if (key->rounds == 16) | ||
186 | { | ||
187 | D_RC5_32(a,b,s,32); | ||
188 | D_RC5_32(a,b,s,30); | ||
189 | D_RC5_32(a,b,s,28); | ||
190 | D_RC5_32(a,b,s,26); | ||
191 | /* Do a full expansion to avoid a jump */ | ||
192 | D_RC5_32(a,b,s,24); | ||
193 | D_RC5_32(a,b,s,22); | ||
194 | D_RC5_32(a,b,s,20); | ||
195 | D_RC5_32(a,b,s,18); | ||
196 | } | ||
197 | else if (key->rounds == 12) | ||
198 | { | ||
199 | D_RC5_32(a,b,s,24); | ||
200 | D_RC5_32(a,b,s,22); | ||
201 | D_RC5_32(a,b,s,20); | ||
202 | D_RC5_32(a,b,s,18); | ||
203 | } | ||
204 | D_RC5_32(a,b,s,16); | ||
205 | D_RC5_32(a,b,s,14); | ||
206 | D_RC5_32(a,b,s,12); | ||
207 | D_RC5_32(a,b,s,10); | ||
208 | D_RC5_32(a,b,s, 8); | ||
209 | D_RC5_32(a,b,s, 6); | ||
210 | D_RC5_32(a,b,s, 4); | ||
211 | D_RC5_32(a,b,s, 2); | ||
212 | d[0]=a-s[0]; | ||
213 | d[1]=b-s[1]; | ||
214 | } | ||
215 | |||
diff --git a/src/lib/libcrypto/rc5/rc5_skey.c b/src/lib/libcrypto/rc5/rc5_skey.c new file mode 100644 index 0000000000..a2e00a41c5 --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5_skey.c | |||
@@ -0,0 +1,113 @@ | |||
1 | /* crypto/rc5/rc5_skey.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <openssl/rc5.h> | ||
60 | #include "rc5_locl.h" | ||
61 | |||
62 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, | ||
63 | int rounds) | ||
64 | { | ||
65 | RC5_32_INT L[64],l,ll,A,B,*S,k; | ||
66 | int i,j,m,c,t,ii,jj; | ||
67 | |||
68 | if ( (rounds != RC5_16_ROUNDS) && | ||
69 | (rounds != RC5_12_ROUNDS) && | ||
70 | (rounds != RC5_8_ROUNDS)) | ||
71 | rounds=RC5_16_ROUNDS; | ||
72 | |||
73 | key->rounds=rounds; | ||
74 | S= &(key->data[0]); | ||
75 | j=0; | ||
76 | for (i=0; i<=(len-8); i+=8) | ||
77 | { | ||
78 | c2l(data,l); | ||
79 | L[j++]=l; | ||
80 | c2l(data,l); | ||
81 | L[j++]=l; | ||
82 | } | ||
83 | ii=len-i; | ||
84 | if (ii) | ||
85 | { | ||
86 | k=len&0x07; | ||
87 | c2ln(data,l,ll,k); | ||
88 | L[j+0]=l; | ||
89 | L[j+1]=ll; | ||
90 | } | ||
91 | |||
92 | c=(len+3)/4; | ||
93 | t=(rounds+1)*2; | ||
94 | S[0]=RC5_32_P; | ||
95 | for (i=1; i<t; i++) | ||
96 | S[i]=(S[i-1]+RC5_32_Q)&RC5_32_MASK; | ||
97 | |||
98 | j=(t>c)?t:c; | ||
99 | j*=3; | ||
100 | ii=jj=0; | ||
101 | A=B=0; | ||
102 | for (i=0; i<j; i++) | ||
103 | { | ||
104 | k=(S[ii]+A+B)&RC5_32_MASK; | ||
105 | A=S[ii]=ROTATE_l32(k,3); | ||
106 | m=(int)(A+B); | ||
107 | k=(L[jj]+A+B)&RC5_32_MASK; | ||
108 | B=L[jj]=ROTATE_l32(k,m); | ||
109 | if (++ii >= t) ii=0; | ||
110 | if (++jj >= c) jj=0; | ||
111 | } | ||
112 | } | ||
113 | |||
diff --git a/src/lib/libcrypto/rc5/rc5cfb64.c b/src/lib/libcrypto/rc5/rc5cfb64.c new file mode 100644 index 0000000000..3a8b60bc7a --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5cfb64.c | |||
@@ -0,0 +1,122 @@ | |||
1 | /* crypto/rc5/rc5cfb64.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <openssl/rc5.h> | ||
60 | #include "rc5_locl.h" | ||
61 | |||
62 | /* The input and output encrypted as though 64bit cfb mode is being | ||
63 | * used. The extra state information to record how much of the | ||
64 | * 64bit block we have used is contained in *num; | ||
65 | */ | ||
66 | |||
67 | void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
68 | long length, RC5_32_KEY *schedule, | ||
69 | unsigned char *ivec, int *num, int encrypt) | ||
70 | { | ||
71 | register unsigned long v0,v1,t; | ||
72 | register int n= *num; | ||
73 | register long l=length; | ||
74 | unsigned long ti[2]; | ||
75 | unsigned char *iv,c,cc; | ||
76 | |||
77 | iv=(unsigned char *)ivec; | ||
78 | if (encrypt) | ||
79 | { | ||
80 | while (l--) | ||
81 | { | ||
82 | if (n == 0) | ||
83 | { | ||
84 | c2l(iv,v0); ti[0]=v0; | ||
85 | c2l(iv,v1); ti[1]=v1; | ||
86 | RC5_32_encrypt((unsigned long *)ti,schedule); | ||
87 | iv=(unsigned char *)ivec; | ||
88 | t=ti[0]; l2c(t,iv); | ||
89 | t=ti[1]; l2c(t,iv); | ||
90 | iv=(unsigned char *)ivec; | ||
91 | } | ||
92 | c= *(in++)^iv[n]; | ||
93 | *(out++)=c; | ||
94 | iv[n]=c; | ||
95 | n=(n+1)&0x07; | ||
96 | } | ||
97 | } | ||
98 | else | ||
99 | { | ||
100 | while (l--) | ||
101 | { | ||
102 | if (n == 0) | ||
103 | { | ||
104 | c2l(iv,v0); ti[0]=v0; | ||
105 | c2l(iv,v1); ti[1]=v1; | ||
106 | RC5_32_encrypt((unsigned long *)ti,schedule); | ||
107 | iv=(unsigned char *)ivec; | ||
108 | t=ti[0]; l2c(t,iv); | ||
109 | t=ti[1]; l2c(t,iv); | ||
110 | iv=(unsigned char *)ivec; | ||
111 | } | ||
112 | cc= *(in++); | ||
113 | c=iv[n]; | ||
114 | iv[n]=cc; | ||
115 | *(out++)=c^cc; | ||
116 | n=(n+1)&0x07; | ||
117 | } | ||
118 | } | ||
119 | v0=v1=ti[0]=ti[1]=t=c=cc=0; | ||
120 | *num=n; | ||
121 | } | ||
122 | |||
diff --git a/src/lib/libcrypto/rc5/rc5ofb64.c b/src/lib/libcrypto/rc5/rc5ofb64.c new file mode 100644 index 0000000000..d412215f3c --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5ofb64.c | |||
@@ -0,0 +1,111 @@ | |||
1 | /* crypto/rc5/rc5ofb64.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <openssl/rc5.h> | ||
60 | #include "rc5_locl.h" | ||
61 | |||
62 | /* The input and output encrypted as though 64bit ofb mode is being | ||
63 | * used. The extra state information to record how much of the | ||
64 | * 64bit block we have used is contained in *num; | ||
65 | */ | ||
66 | void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
67 | long length, RC5_32_KEY *schedule, | ||
68 | unsigned char *ivec, int *num) | ||
69 | { | ||
70 | register unsigned long v0,v1,t; | ||
71 | register int n= *num; | ||
72 | register long l=length; | ||
73 | unsigned char d[8]; | ||
74 | register char *dp; | ||
75 | unsigned long ti[2]; | ||
76 | unsigned char *iv; | ||
77 | int save=0; | ||
78 | |||
79 | iv=(unsigned char *)ivec; | ||
80 | c2l(iv,v0); | ||
81 | c2l(iv,v1); | ||
82 | ti[0]=v0; | ||
83 | ti[1]=v1; | ||
84 | dp=(char *)d; | ||
85 | l2c(v0,dp); | ||
86 | l2c(v1,dp); | ||
87 | while (l--) | ||
88 | { | ||
89 | if (n == 0) | ||
90 | { | ||
91 | RC5_32_encrypt((unsigned long *)ti,schedule); | ||
92 | dp=(char *)d; | ||
93 | t=ti[0]; l2c(t,dp); | ||
94 | t=ti[1]; l2c(t,dp); | ||
95 | save++; | ||
96 | } | ||
97 | *(out++)= *(in++)^d[n]; | ||
98 | n=(n+1)&0x07; | ||
99 | } | ||
100 | if (save) | ||
101 | { | ||
102 | v0=ti[0]; | ||
103 | v1=ti[1]; | ||
104 | iv=(unsigned char *)ivec; | ||
105 | l2c(v0,iv); | ||
106 | l2c(v1,iv); | ||
107 | } | ||
108 | t=v0=v1=ti[0]=ti[1]=0; | ||
109 | *num=n; | ||
110 | } | ||
111 | |||
diff --git a/src/lib/libcrypto/rc5/rc5speed.c b/src/lib/libcrypto/rc5/rc5speed.c new file mode 100644 index 0000000000..8e363be535 --- /dev/null +++ b/src/lib/libcrypto/rc5/rc5speed.c | |||
@@ -0,0 +1,277 @@ | |||
1 | /* crypto/rc5/rc5speed.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | ||
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | ||
61 | |||
62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) | ||
63 | #define TIMES | ||
64 | #endif | ||
65 | |||
66 | #include <stdio.h> | ||
67 | |||
68 | #include <openssl/e_os2.h> | ||
69 | #include OPENSSL_UNISTD_IO | ||
70 | OPENSSL_DECLARE_EXIT | ||
71 | |||
72 | #ifndef OPENSSL_SYS_NETWARE | ||
73 | #include <signal.h> | ||
74 | #endif | ||
75 | |||
76 | #ifndef _IRIX | ||
77 | #include <time.h> | ||
78 | #endif | ||
79 | #ifdef TIMES | ||
80 | #include <sys/types.h> | ||
81 | #include <sys/times.h> | ||
82 | #endif | ||
83 | |||
84 | /* Depending on the VMS version, the tms structure is perhaps defined. | ||
85 | The __TMS macro will show if it was. If it wasn't defined, we should | ||
86 | undefine TIMES, since that tells the rest of the program how things | ||
87 | should be handled. -- Richard Levitte */ | ||
88 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) | ||
89 | #undef TIMES | ||
90 | #endif | ||
91 | |||
92 | #ifndef TIMES | ||
93 | #include <sys/timeb.h> | ||
94 | #endif | ||
95 | |||
96 | #if defined(sun) || defined(__ultrix) | ||
97 | #define _POSIX_SOURCE | ||
98 | #include <limits.h> | ||
99 | #include <sys/param.h> | ||
100 | #endif | ||
101 | |||
102 | #include <openssl/rc5.h> | ||
103 | |||
104 | /* The following if from times(3) man page. It may need to be changed */ | ||
105 | #ifndef HZ | ||
106 | #ifndef CLK_TCK | ||
107 | #define HZ 100.0 | ||
108 | #else /* CLK_TCK */ | ||
109 | #define HZ ((double)CLK_TCK) | ||
110 | #endif | ||
111 | #endif | ||
112 | |||
113 | #define BUFSIZE ((long)1024) | ||
114 | long run=0; | ||
115 | |||
116 | double Time_F(int s); | ||
117 | #ifdef SIGALRM | ||
118 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | ||
119 | #define SIGRETTYPE void | ||
120 | #else | ||
121 | #define SIGRETTYPE int | ||
122 | #endif | ||
123 | |||
124 | SIGRETTYPE sig_done(int sig); | ||
125 | SIGRETTYPE sig_done(int sig) | ||
126 | { | ||
127 | signal(SIGALRM,sig_done); | ||
128 | run=0; | ||
129 | #ifdef LINT | ||
130 | sig=sig; | ||
131 | #endif | ||
132 | } | ||
133 | #endif | ||
134 | |||
135 | #define START 0 | ||
136 | #define STOP 1 | ||
137 | |||
138 | double Time_F(int s) | ||
139 | { | ||
140 | double ret; | ||
141 | #ifdef TIMES | ||
142 | static struct tms tstart,tend; | ||
143 | |||
144 | if (s == START) | ||
145 | { | ||
146 | times(&tstart); | ||
147 | return(0); | ||
148 | } | ||
149 | else | ||
150 | { | ||
151 | times(&tend); | ||
152 | ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ; | ||
153 | return((ret == 0.0)?1e-6:ret); | ||
154 | } | ||
155 | #else /* !times() */ | ||
156 | static struct timeb tstart,tend; | ||
157 | long i; | ||
158 | |||
159 | if (s == START) | ||
160 | { | ||
161 | ftime(&tstart); | ||
162 | return(0); | ||
163 | } | ||
164 | else | ||
165 | { | ||
166 | ftime(&tend); | ||
167 | i=(long)tend.millitm-(long)tstart.millitm; | ||
168 | ret=((double)(tend.time-tstart.time))+((double)i)/1e3; | ||
169 | return((ret == 0.0)?1e-6:ret); | ||
170 | } | ||
171 | #endif | ||
172 | } | ||
173 | |||
174 | int main(int argc, char **argv) | ||
175 | { | ||
176 | long count; | ||
177 | static unsigned char buf[BUFSIZE]; | ||
178 | static unsigned char key[] ={ | ||
179 | 0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0, | ||
180 | 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, | ||
181 | }; | ||
182 | RC5_32_KEY sch; | ||
183 | double a,b,c,d; | ||
184 | #ifndef SIGALRM | ||
185 | long ca,cb,cc; | ||
186 | #endif | ||
187 | |||
188 | #ifndef TIMES | ||
189 | printf("To get the most accurate results, try to run this\n"); | ||
190 | printf("program when this computer is idle.\n"); | ||
191 | #endif | ||
192 | |||
193 | #ifndef SIGALRM | ||
194 | printf("First we calculate the approximate speed ...\n"); | ||
195 | RC5_32_set_key(&sch,16,key,12); | ||
196 | count=10; | ||
197 | do { | ||
198 | long i; | ||
199 | unsigned long data[2]; | ||
200 | |||
201 | count*=2; | ||
202 | Time_F(START); | ||
203 | for (i=count; i; i--) | ||
204 | RC5_32_encrypt(data,&sch); | ||
205 | d=Time_F(STOP); | ||
206 | } while (d < 3.0); | ||
207 | ca=count/512; | ||
208 | cb=count; | ||
209 | cc=count*8/BUFSIZE+1; | ||
210 | printf("Doing RC5_32_set_key %ld times\n",ca); | ||
211 | #define COND(d) (count != (d)) | ||
212 | #define COUNT(d) (d) | ||
213 | #else | ||
214 | #define COND(c) (run) | ||
215 | #define COUNT(d) (count) | ||
216 | signal(SIGALRM,sig_done); | ||
217 | printf("Doing RC5_32_set_key for 10 seconds\n"); | ||
218 | alarm(10); | ||
219 | #endif | ||
220 | |||
221 | Time_F(START); | ||
222 | for (count=0,run=1; COND(ca); count+=4) | ||
223 | { | ||
224 | RC5_32_set_key(&sch,16,key,12); | ||
225 | RC5_32_set_key(&sch,16,key,12); | ||
226 | RC5_32_set_key(&sch,16,key,12); | ||
227 | RC5_32_set_key(&sch,16,key,12); | ||
228 | } | ||
229 | d=Time_F(STOP); | ||
230 | printf("%ld RC5_32_set_key's in %.2f seconds\n",count,d); | ||
231 | a=((double)COUNT(ca))/d; | ||
232 | |||
233 | #ifdef SIGALRM | ||
234 | printf("Doing RC5_32_encrypt's for 10 seconds\n"); | ||
235 | alarm(10); | ||
236 | #else | ||
237 | printf("Doing RC5_32_encrypt %ld times\n",cb); | ||
238 | #endif | ||
239 | Time_F(START); | ||
240 | for (count=0,run=1; COND(cb); count+=4) | ||
241 | { | ||
242 | unsigned long data[2]; | ||
243 | |||
244 | RC5_32_encrypt(data,&sch); | ||
245 | RC5_32_encrypt(data,&sch); | ||
246 | RC5_32_encrypt(data,&sch); | ||
247 | RC5_32_encrypt(data,&sch); | ||
248 | } | ||
249 | d=Time_F(STOP); | ||
250 | printf("%ld RC5_32_encrypt's in %.2f second\n",count,d); | ||
251 | b=((double)COUNT(cb)*8)/d; | ||
252 | |||
253 | #ifdef SIGALRM | ||
254 | printf("Doing RC5_32_cbc_encrypt on %ld byte blocks for 10 seconds\n", | ||
255 | BUFSIZE); | ||
256 | alarm(10); | ||
257 | #else | ||
258 | printf("Doing RC5_32_cbc_encrypt %ld times on %ld byte blocks\n",cc, | ||
259 | BUFSIZE); | ||
260 | #endif | ||
261 | Time_F(START); | ||
262 | for (count=0,run=1; COND(cc); count++) | ||
263 | RC5_32_cbc_encrypt(buf,buf,BUFSIZE,&sch, | ||
264 | &(key[0]),RC5_ENCRYPT); | ||
265 | d=Time_F(STOP); | ||
266 | printf("%ld RC5_32_cbc_encrypt's of %ld byte blocks in %.2f second\n", | ||
267 | count,BUFSIZE,d); | ||
268 | c=((double)COUNT(cc)*BUFSIZE)/d; | ||
269 | |||
270 | printf("RC5_32/12/16 set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a); | ||
271 | printf("RC5_32/12/16 raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); | ||
272 | printf("RC5_32/12/16 cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); | ||
273 | exit(0); | ||
274 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) | ||
275 | return(0); | ||
276 | #endif | ||
277 | } | ||
diff --git a/src/lib/libcrypto/srp/srp_grps.h b/src/lib/libcrypto/srp/srp_grps.h index d77c9fff4b..8e3c35e3f5 100644 --- a/src/lib/libcrypto/srp/srp_grps.h +++ b/src/lib/libcrypto/srp/srp_grps.h | |||
@@ -1,22 +1,22 @@ | |||
1 | /* start of generated data */ | 1 | /* start of generated data */ |
2 | 2 | ||
3 | static BN_ULONG bn_group_1024_value[] = { | 3 | static BN_ULONG bn_group_1024_value[] = { |
4 | bn_pack4(9FC6,1D2F,C0EB,06E3), | 4 | bn_pack4(0x9FC6,0x1D2F,0xC0EB,0x06E3), |
5 | bn_pack4(FD51,38FE,8376,435B), | 5 | bn_pack4(0xFD51,0x38FE,0x8376,0x435B), |
6 | bn_pack4(2FD4,CBF4,976E,AA9A), | 6 | bn_pack4(0x2FD4,0xCBF4,0x976E,0xAA9A), |
7 | bn_pack4(68ED,BC3C,0572,6CC0), | 7 | bn_pack4(0x68ED,0xBC3C,0x0572,0x6CC0), |
8 | bn_pack4(C529,F566,660E,57EC), | 8 | bn_pack4(0xC529,0xF566,0x660E,0x57EC), |
9 | bn_pack4(8255,9B29,7BCF,1885), | 9 | bn_pack4(0x8255,0x9B29,0x7BCF,0x1885), |
10 | bn_pack4(CE8E,F4AD,69B1,5D49), | 10 | bn_pack4(0xCE8E,0xF4AD,0x69B1,0x5D49), |
11 | bn_pack4(5DC7,D7B4,6154,D6B6), | 11 | bn_pack4(0x5DC7,0xD7B4,0x6154,0xD6B6), |
12 | bn_pack4(8E49,5C1D,6089,DAD1), | 12 | bn_pack4(0x8E49,0x5C1D,0x6089,0xDAD1), |
13 | bn_pack4(E0D5,D8E2,50B9,8BE4), | 13 | bn_pack4(0xE0D5,0xD8E2,0x50B9,0x8BE4), |
14 | bn_pack4(383B,4813,D692,C6E0), | 14 | bn_pack4(0x383B,0x4813,0xD692,0xC6E0), |
15 | bn_pack4(D674,DF74,96EA,81D3), | 15 | bn_pack4(0xD674,0xDF74,0x96EA,0x81D3), |
16 | bn_pack4(9EA2,314C,9C25,6576), | 16 | bn_pack4(0x9EA2,0x314C,0x9C25,0x6576), |
17 | bn_pack4(6072,6187,75FF,3C0B), | 17 | bn_pack4(0x6072,0x6187,0x75FF,0x3C0B), |
18 | bn_pack4(9C33,F80A,FA8F,C5E8), | 18 | bn_pack4(0x9C33,0xF80A,0xFA8F,0xC5E8), |
19 | bn_pack4(EEAF,0AB9,ADB3,8DD6) | 19 | bn_pack4(0xEEAF,0x0AB9,0xADB3,0x8DD6) |
20 | }; | 20 | }; |
21 | static BIGNUM bn_group_1024 = { | 21 | static BIGNUM bn_group_1024 = { |
22 | bn_group_1024_value, | 22 | bn_group_1024_value, |
@@ -27,30 +27,30 @@ static BIGNUM bn_group_1024 = { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | static BN_ULONG bn_group_1536_value[] = { | 29 | static BN_ULONG bn_group_1536_value[] = { |
30 | bn_pack4(CF76,E3FE,D135,F9BB), | 30 | bn_pack4(0xCF76,0xE3FE,0xD135,0xF9BB), |
31 | bn_pack4(1518,0F93,499A,234D), | 31 | bn_pack4(0x1518,0x0F93,0x499A,0x234D), |
32 | bn_pack4(8CE7,A28C,2442,C6F3), | 32 | bn_pack4(0x8CE7,0xA28C,0x2442,0xC6F3), |
33 | bn_pack4(5A02,1FFF,5E91,479E), | 33 | bn_pack4(0x5A02,0x1FFF,0x5E91,0x479E), |
34 | bn_pack4(7F8A,2FE9,B8B5,292E), | 34 | bn_pack4(0x7F8A,0x2FE9,0xB8B5,0x292E), |
35 | bn_pack4(837C,264A,E3A9,BEB8), | 35 | bn_pack4(0x837C,0x264A,0xE3A9,0xBEB8), |
36 | bn_pack4(E442,734A,F7CC,B7AE), | 36 | bn_pack4(0xE442,0x734A,0xF7CC,0xB7AE), |
37 | bn_pack4(6577,2E43,7D6C,7F8C), | 37 | bn_pack4(0x6577,0x2E43,0x7D6C,0x7F8C), |
38 | bn_pack4(DB2F,D53D,24B7,C486), | 38 | bn_pack4(0xDB2F,0xD53D,0x24B7,0xC486), |
39 | bn_pack4(6EDF,0195,3934,9627), | 39 | bn_pack4(0x6EDF,0x0195,0x3934,0x9627), |
40 | bn_pack4(158B,FD3E,2B9C,8CF5), | 40 | bn_pack4(0x158B,0xFD3E,0x2B9C,0x8CF5), |
41 | bn_pack4(764E,3F4B,53DD,9DA1), | 41 | bn_pack4(0x764E,0x3F4B,0x53DD,0x9DA1), |
42 | bn_pack4(4754,8381,DBC5,B1FC), | 42 | bn_pack4(0x4754,0x8381,0xDBC5,0xB1FC), |
43 | bn_pack4(9B60,9E0B,E3BA,B63D), | 43 | bn_pack4(0x9B60,0x9E0B,0xE3BA,0xB63D), |
44 | bn_pack4(8134,B1C8,B979,8914), | 44 | bn_pack4(0x8134,0xB1C8,0xB979,0x8914), |
45 | bn_pack4(DF02,8A7C,EC67,F0D0), | 45 | bn_pack4(0xDF02,0x8A7C,0xEC67,0xF0D0), |
46 | bn_pack4(80B6,55BB,9A22,E8DC), | 46 | bn_pack4(0x80B6,0x55BB,0x9A22,0xE8DC), |
47 | bn_pack4(1558,903B,A0D0,F843), | 47 | bn_pack4(0x1558,0x903B,0xA0D0,0xF843), |
48 | bn_pack4(51C6,A94B,E460,7A29), | 48 | bn_pack4(0x51C6,0xA94B,0xE460,0x7A29), |
49 | bn_pack4(5F4F,5F55,6E27,CBDE), | 49 | bn_pack4(0x5F4F,0x5F55,0x6E27,0xCBDE), |
50 | bn_pack4(BEEE,A961,4B19,CC4D), | 50 | bn_pack4(0xBEEE,0xA961,0x4B19,0xCC4D), |
51 | bn_pack4(DBA5,1DF4,99AC,4C80), | 51 | bn_pack4(0xDBA5,0x1DF4,0x99AC,0x4C80), |
52 | bn_pack4(B1F1,2A86,17A4,7BBB), | 52 | bn_pack4(0xB1F1,0x2A86,0x17A4,0x7BBB), |
53 | bn_pack4(9DEF,3CAF,B939,277A) | 53 | bn_pack4(0x9DEF,0x3CAF,0xB939,0x277A) |
54 | }; | 54 | }; |
55 | static BIGNUM bn_group_1536 = { | 55 | static BIGNUM bn_group_1536 = { |
56 | bn_group_1536_value, | 56 | bn_group_1536_value, |
@@ -61,38 +61,38 @@ static BIGNUM bn_group_1536 = { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | static BN_ULONG bn_group_2048_value[] = { | 63 | static BN_ULONG bn_group_2048_value[] = { |
64 | bn_pack4(0FA7,111F,9E4A,FF73), | 64 | bn_pack4(0x0FA7,0x111F,0x9E4A,0xFF73), |
65 | bn_pack4(9B65,E372,FCD6,8EF2), | 65 | bn_pack4(0x9B65,0xE372,0xFCD6,0x8EF2), |
66 | bn_pack4(35DE,236D,525F,5475), | 66 | bn_pack4(0x35DE,0x236D,0x525F,0x5475), |
67 | bn_pack4(94B5,C803,D89F,7AE4), | 67 | bn_pack4(0x94B5,0xC803,0xD89F,0x7AE4), |
68 | bn_pack4(71AE,35F8,E9DB,FBB6), | 68 | bn_pack4(0x71AE,0x35F8,0xE9DB,0xFBB6), |
69 | bn_pack4(2A56,98F3,A8D0,C382), | 69 | bn_pack4(0x2A56,0x98F3,0xA8D0,0xC382), |
70 | bn_pack4(9CCC,041C,7BC3,08D8), | 70 | bn_pack4(0x9CCC,0x041C,0x7BC3,0x08D8), |
71 | bn_pack4(AF87,4E73,03CE,5329), | 71 | bn_pack4(0xAF87,0x4E73,0x03CE,0x5329), |
72 | bn_pack4(6160,2790,04E5,7AE6), | 72 | bn_pack4(0x6160,0x2790,0x04E5,0x7AE6), |
73 | bn_pack4(032C,FBDB,F52F,B378), | 73 | bn_pack4(0x032C,0xFBDB,0xF52F,0xB378), |
74 | bn_pack4(5EA7,7A27,75D2,ECFA), | 74 | bn_pack4(0x5EA7,0x7A27,0x75D2,0xECFA), |
75 | bn_pack4(5445,23B5,24B0,D57D), | 75 | bn_pack4(0x5445,0x23B5,0x24B0,0xD57D), |
76 | bn_pack4(5B9D,32E6,88F8,7748), | 76 | bn_pack4(0x5B9D,0x32E6,0x88F8,0x7748), |
77 | bn_pack4(F1D2,B907,8717,461A), | 77 | bn_pack4(0xF1D2,0xB907,0x8717,0x461A), |
78 | bn_pack4(76BD,207A,436C,6481), | 78 | bn_pack4(0x76BD,0x207A,0x436C,0x6481), |
79 | bn_pack4(CA97,B43A,23FB,8016), | 79 | bn_pack4(0xCA97,0xB43A,0x23FB,0x8016), |
80 | bn_pack4(1D28,1E44,6B14,773B), | 80 | bn_pack4(0x1D28,0x1E44,0x6B14,0x773B), |
81 | bn_pack4(7359,D041,D5C3,3EA7), | 81 | bn_pack4(0x7359,0xD041,0xD5C3,0x3EA7), |
82 | bn_pack4(A80D,740A,DBF4,FF74), | 82 | bn_pack4(0xA80D,0x740A,0xDBF4,0xFF74), |
83 | bn_pack4(55F9,7993,EC97,5EEA), | 83 | bn_pack4(0x55F9,0x7993,0xEC97,0x5EEA), |
84 | bn_pack4(2918,A996,2F0B,93B8), | 84 | bn_pack4(0x2918,0xA996,0x2F0B,0x93B8), |
85 | bn_pack4(661A,05FB,D5FA,AAE8), | 85 | bn_pack4(0x661A,0x05FB,0xD5FA,0xAAE8), |
86 | bn_pack4(CF60,9517,9A16,3AB3), | 86 | bn_pack4(0xCF60,0x9517,0x9A16,0x3AB3), |
87 | bn_pack4(E808,3969,EDB7,67B0), | 87 | bn_pack4(0xE808,0x3969,0xEDB7,0x67B0), |
88 | bn_pack4(CD7F,48A9,DA04,FD50), | 88 | bn_pack4(0xCD7F,0x48A9,0xDA04,0xFD50), |
89 | bn_pack4(D523,12AB,4B03,310D), | 89 | bn_pack4(0xD523,0x12AB,0x4B03,0x310D), |
90 | bn_pack4(8193,E075,7767,A13D), | 90 | bn_pack4(0x8193,0xE075,0x7767,0xA13D), |
91 | bn_pack4(A373,29CB,B4A0,99ED), | 91 | bn_pack4(0xA373,0x29CB,0xB4A0,0x99ED), |
92 | bn_pack4(FC31,9294,3DB5,6050), | 92 | bn_pack4(0xFC31,0x9294,0x3DB5,0x6050), |
93 | bn_pack4(AF72,B665,1987,EE07), | 93 | bn_pack4(0xAF72,0xB665,0x1987,0xEE07), |
94 | bn_pack4(F166,DE5E,1389,582F), | 94 | bn_pack4(0xF166,0xDE5E,0x1389,0x582F), |
95 | bn_pack4(AC6B,DB41,324A,9A9B) | 95 | bn_pack4(0xAC6B,0xDB41,0x324A,0x9A9B) |
96 | }; | 96 | }; |
97 | static BIGNUM bn_group_2048 = { | 97 | static BIGNUM bn_group_2048 = { |
98 | bn_group_2048_value, | 98 | bn_group_2048_value, |
@@ -103,54 +103,54 @@ static BIGNUM bn_group_2048 = { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | static BN_ULONG bn_group_3072_value[] = { | 105 | static BN_ULONG bn_group_3072_value[] = { |
106 | bn_pack4(FFFF,FFFF,FFFF,FFFF), | 106 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF), |
107 | bn_pack4(4B82,D120,A93A,D2CA), | 107 | bn_pack4(0x4B82,0xD120,0xA93A,0xD2CA), |
108 | bn_pack4(43DB,5BFC,E0FD,108E), | 108 | bn_pack4(0x43DB,0x5BFC,0xE0FD,0x108E), |
109 | bn_pack4(08E2,4FA0,74E5,AB31), | 109 | bn_pack4(0x08E2,0x4FA0,0x74E5,0xAB31), |
110 | bn_pack4(7709,88C0,BAD9,46E2), | 110 | bn_pack4(0x7709,0x88C0,0xBAD9,0x46E2), |
111 | bn_pack4(BBE1,1757,7A61,5D6C), | 111 | bn_pack4(0xBBE1,0x1757,0x7A61,0x5D6C), |
112 | bn_pack4(521F,2B18,177B,200C), | 112 | bn_pack4(0x521F,0x2B18,0x177B,0x200C), |
113 | bn_pack4(D876,0273,3EC8,6A64), | 113 | bn_pack4(0xD876,0x0273,0x3EC8,0x6A64), |
114 | bn_pack4(F12F,FA06,D98A,0864), | 114 | bn_pack4(0xF12F,0xFA06,0xD98A,0x0864), |
115 | bn_pack4(CEE3,D226,1AD2,EE6B), | 115 | bn_pack4(0xCEE3,0xD226,0x1AD2,0xEE6B), |
116 | bn_pack4(1E8C,94E0,4A25,619D), | 116 | bn_pack4(0x1E8C,0x94E0,0x4A25,0x619D), |
117 | bn_pack4(ABF5,AE8C,DB09,33D7), | 117 | bn_pack4(0xABF5,0xAE8C,0xDB09,0x33D7), |
118 | bn_pack4(B397,0F85,A6E1,E4C7), | 118 | bn_pack4(0xB397,0x0F85,0xA6E1,0xE4C7), |
119 | bn_pack4(8AEA,7157,5D06,0C7D), | 119 | bn_pack4(0x8AEA,0x7157,0x5D06,0x0C7D), |
120 | bn_pack4(ECFB,8504,58DB,EF0A), | 120 | bn_pack4(0xECFB,0x8504,0x58DB,0xEF0A), |
121 | bn_pack4(A855,21AB,DF1C,BA64), | 121 | bn_pack4(0xA855,0x21AB,0xDF1C,0xBA64), |
122 | bn_pack4(AD33,170D,0450,7A33), | 122 | bn_pack4(0xAD33,0x170D,0x0450,0x7A33), |
123 | bn_pack4(1572,8E5A,8AAA,C42D), | 123 | bn_pack4(0x1572,0x8E5A,0x8AAA,0xC42D), |
124 | bn_pack4(15D2,2618,98FA,0510), | 124 | bn_pack4(0x15D2,0x2618,0x98FA,0x0510), |
125 | bn_pack4(3995,497C,EA95,6AE5), | 125 | bn_pack4(0x3995,0x497C,0xEA95,0x6AE5), |
126 | bn_pack4(DE2B,CBF6,9558,1718), | 126 | bn_pack4(0xDE2B,0xCBF6,0x9558,0x1718), |
127 | bn_pack4(B5C5,5DF0,6F4C,52C9), | 127 | bn_pack4(0xB5C5,0x5DF0,0x6F4C,0x52C9), |
128 | bn_pack4(9B27,83A2,EC07,A28F), | 128 | bn_pack4(0x9B27,0x83A2,0xEC07,0xA28F), |
129 | bn_pack4(E39E,772C,180E,8603), | 129 | bn_pack4(0xE39E,0x772C,0x180E,0x8603), |
130 | bn_pack4(3290,5E46,2E36,CE3B), | 130 | bn_pack4(0x3290,0x5E46,0x2E36,0xCE3B), |
131 | bn_pack4(F174,6C08,CA18,217C), | 131 | bn_pack4(0xF174,0x6C08,0xCA18,0x217C), |
132 | bn_pack4(670C,354E,4ABC,9804), | 132 | bn_pack4(0x670C,0x354E,0x4ABC,0x9804), |
133 | bn_pack4(9ED5,2907,7096,966D), | 133 | bn_pack4(0x9ED5,0x2907,0x7096,0x966D), |
134 | bn_pack4(1C62,F356,2085,52BB), | 134 | bn_pack4(0x1C62,0xF356,0x2085,0x52BB), |
135 | bn_pack4(8365,5D23,DCA3,AD96), | 135 | bn_pack4(0x8365,0x5D23,0xDCA3,0xAD96), |
136 | bn_pack4(6916,3FA8,FD24,CF5F), | 136 | bn_pack4(0x6916,0x3FA8,0xFD24,0xCF5F), |
137 | bn_pack4(98DA,4836,1C55,D39A), | 137 | bn_pack4(0x98DA,0x4836,0x1C55,0xD39A), |
138 | bn_pack4(C200,7CB8,A163,BF05), | 138 | bn_pack4(0xC200,0x7CB8,0xA163,0xBF05), |
139 | bn_pack4(4928,6651,ECE4,5B3D), | 139 | bn_pack4(0x4928,0x6651,0xECE4,0x5B3D), |
140 | bn_pack4(AE9F,2411,7C4B,1FE6), | 140 | bn_pack4(0xAE9F,0x2411,0x7C4B,0x1FE6), |
141 | bn_pack4(EE38,6BFB,5A89,9FA5), | 141 | bn_pack4(0xEE38,0x6BFB,0x5A89,0x9FA5), |
142 | bn_pack4(0BFF,5CB6,F406,B7ED), | 142 | bn_pack4(0x0BFF,0x5CB6,0xF406,0xB7ED), |
143 | bn_pack4(F44C,42E9,A637,ED6B), | 143 | bn_pack4(0xF44C,0x42E9,0xA637,0xED6B), |
144 | bn_pack4(E485,B576,625E,7EC6), | 144 | bn_pack4(0xE485,0xB576,0x625E,0x7EC6), |
145 | bn_pack4(4FE1,356D,6D51,C245), | 145 | bn_pack4(0x4FE1,0x356D,0x6D51,0xC245), |
146 | bn_pack4(302B,0A6D,F25F,1437), | 146 | bn_pack4(0x302B,0x0A6D,0xF25F,0x1437), |
147 | bn_pack4(EF95,19B3,CD3A,431B), | 147 | bn_pack4(0xEF95,0x19B3,0xCD3A,0x431B), |
148 | bn_pack4(514A,0879,8E34,04DD), | 148 | bn_pack4(0x514A,0x0879,0x8E34,0x04DD), |
149 | bn_pack4(020B,BEA6,3B13,9B22), | 149 | bn_pack4(0x020B,0xBEA6,0x3B13,0x9B22), |
150 | bn_pack4(2902,4E08,8A67,CC74), | 150 | bn_pack4(0x2902,0x4E08,0x8A67,0xCC74), |
151 | bn_pack4(C4C6,628B,80DC,1CD1), | 151 | bn_pack4(0xC4C6,0x628B,0x80DC,0x1CD1), |
152 | bn_pack4(C90F,DAA2,2168,C234), | 152 | bn_pack4(0xC90F,0xDAA2,0x2168,0xC234), |
153 | bn_pack4(FFFF,FFFF,FFFF,FFFF) | 153 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF) |
154 | }; | 154 | }; |
155 | static BIGNUM bn_group_3072 = { | 155 | static BIGNUM bn_group_3072 = { |
156 | bn_group_3072_value, | 156 | bn_group_3072_value, |
@@ -161,70 +161,70 @@ static BIGNUM bn_group_3072 = { | |||
161 | }; | 161 | }; |
162 | 162 | ||
163 | static BN_ULONG bn_group_4096_value[] = { | 163 | static BN_ULONG bn_group_4096_value[] = { |
164 | bn_pack4(FFFF,FFFF,FFFF,FFFF), | 164 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF), |
165 | bn_pack4(4DF4,35C9,3406,3199), | 165 | bn_pack4(0x4DF4,0x35C9,0x3406,0x3199), |
166 | bn_pack4(86FF,B7DC,90A6,C08F), | 166 | bn_pack4(0x86FF,0xB7DC,0x90A6,0xC08F), |
167 | bn_pack4(93B4,EA98,8D8F,DDC1), | 167 | bn_pack4(0x93B4,0xEA98,0x8D8F,0xDDC1), |
168 | bn_pack4(D006,9127,D5B0,5AA9), | 168 | bn_pack4(0xD006,0x9127,0xD5B0,0x5AA9), |
169 | bn_pack4(B81B,DD76,2170,481C), | 169 | bn_pack4(0xB81B,0xDD76,0x2170,0x481C), |
170 | bn_pack4(1F61,2970,CEE2,D7AF), | 170 | bn_pack4(0x1F61,0x2970,0xCEE2,0xD7AF), |
171 | bn_pack4(233B,A186,515B,E7ED), | 171 | bn_pack4(0x233B,0xA186,0x515B,0xE7ED), |
172 | bn_pack4(99B2,964F,A090,C3A2), | 172 | bn_pack4(0x99B2,0x964F,0xA090,0xC3A2), |
173 | bn_pack4(287C,5947,4E6B,C05D), | 173 | bn_pack4(0x287C,0x5947,0x4E6B,0xC05D), |
174 | bn_pack4(2E8E,FC14,1FBE,CAA6), | 174 | bn_pack4(0x2E8E,0xFC14,0x1FBE,0xCAA6), |
175 | bn_pack4(DBBB,C2DB,04DE,8EF9), | 175 | bn_pack4(0xDBBB,0xC2DB,0x04DE,0x8EF9), |
176 | bn_pack4(2583,E9CA,2AD4,4CE8), | 176 | bn_pack4(0x2583,0xE9CA,0x2AD4,0x4CE8), |
177 | bn_pack4(1A94,6834,B615,0BDA), | 177 | bn_pack4(0x1A94,0x6834,0xB615,0x0BDA), |
178 | bn_pack4(99C3,2718,6AF4,E23C), | 178 | bn_pack4(0x99C3,0x2718,0x6AF4,0xE23C), |
179 | bn_pack4(8871,9A10,BDBA,5B26), | 179 | bn_pack4(0x8871,0x9A10,0xBDBA,0x5B26), |
180 | bn_pack4(1A72,3C12,A787,E6D7), | 180 | bn_pack4(0x1A72,0x3C12,0xA787,0xE6D7), |
181 | bn_pack4(4B82,D120,A921,0801), | 181 | bn_pack4(0x4B82,0xD120,0xA921,0x0801), |
182 | bn_pack4(43DB,5BFC,E0FD,108E), | 182 | bn_pack4(0x43DB,0x5BFC,0xE0FD,0x108E), |
183 | bn_pack4(08E2,4FA0,74E5,AB31), | 183 | bn_pack4(0x08E2,0x4FA0,0x74E5,0xAB31), |
184 | bn_pack4(7709,88C0,BAD9,46E2), | 184 | bn_pack4(0x7709,0x88C0,0xBAD9,0x46E2), |
185 | bn_pack4(BBE1,1757,7A61,5D6C), | 185 | bn_pack4(0xBBE1,0x1757,0x7A61,0x5D6C), |
186 | bn_pack4(521F,2B18,177B,200C), | 186 | bn_pack4(0x521F,0x2B18,0x177B,0x200C), |
187 | bn_pack4(D876,0273,3EC8,6A64), | 187 | bn_pack4(0xD876,0x0273,0x3EC8,0x6A64), |
188 | bn_pack4(F12F,FA06,D98A,0864), | 188 | bn_pack4(0xF12F,0xFA06,0xD98A,0x0864), |
189 | bn_pack4(CEE3,D226,1AD2,EE6B), | 189 | bn_pack4(0xCEE3,0xD226,0x1AD2,0xEE6B), |
190 | bn_pack4(1E8C,94E0,4A25,619D), | 190 | bn_pack4(0x1E8C,0x94E0,0x4A25,0x619D), |
191 | bn_pack4(ABF5,AE8C,DB09,33D7), | 191 | bn_pack4(0xABF5,0xAE8C,0xDB09,0x33D7), |
192 | bn_pack4(B397,0F85,A6E1,E4C7), | 192 | bn_pack4(0xB397,0x0F85,0xA6E1,0xE4C7), |
193 | bn_pack4(8AEA,7157,5D06,0C7D), | 193 | bn_pack4(0x8AEA,0x7157,0x5D06,0x0C7D), |
194 | bn_pack4(ECFB,8504,58DB,EF0A), | 194 | bn_pack4(0xECFB,0x8504,0x58DB,0xEF0A), |
195 | bn_pack4(A855,21AB,DF1C,BA64), | 195 | bn_pack4(0xA855,0x21AB,0xDF1C,0xBA64), |
196 | bn_pack4(AD33,170D,0450,7A33), | 196 | bn_pack4(0xAD33,0x170D,0x0450,0x7A33), |
197 | bn_pack4(1572,8E5A,8AAA,C42D), | 197 | bn_pack4(0x1572,0x8E5A,0x8AAA,0xC42D), |
198 | bn_pack4(15D2,2618,98FA,0510), | 198 | bn_pack4(0x15D2,0x2618,0x98FA,0x0510), |
199 | bn_pack4(3995,497C,EA95,6AE5), | 199 | bn_pack4(0x3995,0x497C,0xEA95,0x6AE5), |
200 | bn_pack4(DE2B,CBF6,9558,1718), | 200 | bn_pack4(0xDE2B,0xCBF6,0x9558,0x1718), |
201 | bn_pack4(B5C5,5DF0,6F4C,52C9), | 201 | bn_pack4(0xB5C5,0x5DF0,0x6F4C,0x52C9), |
202 | bn_pack4(9B27,83A2,EC07,A28F), | 202 | bn_pack4(0x9B27,0x83A2,0xEC07,0xA28F), |
203 | bn_pack4(E39E,772C,180E,8603), | 203 | bn_pack4(0xE39E,0x772C,0x180E,0x8603), |
204 | bn_pack4(3290,5E46,2E36,CE3B), | 204 | bn_pack4(0x3290,0x5E46,0x2E36,0xCE3B), |
205 | bn_pack4(F174,6C08,CA18,217C), | 205 | bn_pack4(0xF174,0x6C08,0xCA18,0x217C), |
206 | bn_pack4(670C,354E,4ABC,9804), | 206 | bn_pack4(0x670C,0x354E,0x4ABC,0x9804), |
207 | bn_pack4(9ED5,2907,7096,966D), | 207 | bn_pack4(0x9ED5,0x2907,0x7096,0x966D), |
208 | bn_pack4(1C62,F356,2085,52BB), | 208 | bn_pack4(0x1C62,0xF356,0x2085,0x52BB), |
209 | bn_pack4(8365,5D23,DCA3,AD96), | 209 | bn_pack4(0x8365,0x5D23,0xDCA3,0xAD96), |
210 | bn_pack4(6916,3FA8,FD24,CF5F), | 210 | bn_pack4(0x6916,0x3FA8,0xFD24,0xCF5F), |
211 | bn_pack4(98DA,4836,1C55,D39A), | 211 | bn_pack4(0x98DA,0x4836,0x1C55,0xD39A), |
212 | bn_pack4(C200,7CB8,A163,BF05), | 212 | bn_pack4(0xC200,0x7CB8,0xA163,0xBF05), |
213 | bn_pack4(4928,6651,ECE4,5B3D), | 213 | bn_pack4(0x4928,0x6651,0xECE4,0x5B3D), |
214 | bn_pack4(AE9F,2411,7C4B,1FE6), | 214 | bn_pack4(0xAE9F,0x2411,0x7C4B,0x1FE6), |
215 | bn_pack4(EE38,6BFB,5A89,9FA5), | 215 | bn_pack4(0xEE38,0x6BFB,0x5A89,0x9FA5), |
216 | bn_pack4(0BFF,5CB6,F406,B7ED), | 216 | bn_pack4(0x0BFF,0x5CB6,0xF406,0xB7ED), |
217 | bn_pack4(F44C,42E9,A637,ED6B), | 217 | bn_pack4(0xF44C,0x42E9,0xA637,0xED6B), |
218 | bn_pack4(E485,B576,625E,7EC6), | 218 | bn_pack4(0xE485,0xB576,0x625E,0x7EC6), |
219 | bn_pack4(4FE1,356D,6D51,C245), | 219 | bn_pack4(0x4FE1,0x356D,0x6D51,0xC245), |
220 | bn_pack4(302B,0A6D,F25F,1437), | 220 | bn_pack4(0x302B,0x0A6D,0xF25F,0x1437), |
221 | bn_pack4(EF95,19B3,CD3A,431B), | 221 | bn_pack4(0xEF95,0x19B3,0xCD3A,0x431B), |
222 | bn_pack4(514A,0879,8E34,04DD), | 222 | bn_pack4(0x514A,0x0879,0x8E34,0x04DD), |
223 | bn_pack4(020B,BEA6,3B13,9B22), | 223 | bn_pack4(0x020B,0xBEA6,0x3B13,0x9B22), |
224 | bn_pack4(2902,4E08,8A67,CC74), | 224 | bn_pack4(0x2902,0x4E08,0x8A67,0xCC74), |
225 | bn_pack4(C4C6,628B,80DC,1CD1), | 225 | bn_pack4(0xC4C6,0x628B,0x80DC,0x1CD1), |
226 | bn_pack4(C90F,DAA2,2168,C234), | 226 | bn_pack4(0xC90F,0xDAA2,0x2168,0xC234), |
227 | bn_pack4(FFFF,FFFF,FFFF,FFFF) | 227 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF) |
228 | }; | 228 | }; |
229 | static BIGNUM bn_group_4096 = { | 229 | static BIGNUM bn_group_4096 = { |
230 | bn_group_4096_value, | 230 | bn_group_4096_value, |
@@ -235,102 +235,102 @@ static BIGNUM bn_group_4096 = { | |||
235 | }; | 235 | }; |
236 | 236 | ||
237 | static BN_ULONG bn_group_6144_value[] = { | 237 | static BN_ULONG bn_group_6144_value[] = { |
238 | bn_pack4(FFFF,FFFF,FFFF,FFFF), | 238 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF), |
239 | bn_pack4(E694,F91E,6DCC,4024), | 239 | bn_pack4(0xE694,0xF91E,0x6DCC,0x4024), |
240 | bn_pack4(12BF,2D5B,0B74,74D6), | 240 | bn_pack4(0x12BF,0x2D5B,0x0B74,0x74D6), |
241 | bn_pack4(043E,8F66,3F48,60EE), | 241 | bn_pack4(0x043E,0x8F66,0x3F48,0x60EE), |
242 | bn_pack4(387F,E8D7,6E3C,0468), | 242 | bn_pack4(0x387F,0xE8D7,0x6E3C,0x0468), |
243 | bn_pack4(DA56,C9EC,2EF2,9632), | 243 | bn_pack4(0xDA56,0xC9EC,0x2EF2,0x9632), |
244 | bn_pack4(EB19,CCB1,A313,D55C), | 244 | bn_pack4(0xEB19,0xCCB1,0xA313,0xD55C), |
245 | bn_pack4(F550,AA3D,8A1F,BFF0), | 245 | bn_pack4(0xF550,0xAA3D,0x8A1F,0xBFF0), |
246 | bn_pack4(06A1,D58B,B7C5,DA76), | 246 | bn_pack4(0x06A1,0xD58B,0xB7C5,0xDA76), |
247 | bn_pack4(A797,15EE,F29B,E328), | 247 | bn_pack4(0xA797,0x15EE,0xF29B,0xE328), |
248 | bn_pack4(14CC,5ED2,0F80,37E0), | 248 | bn_pack4(0x14CC,0x5ED2,0x0F80,0x37E0), |
249 | bn_pack4(CC8F,6D7E,BF48,E1D8), | 249 | bn_pack4(0xCC8F,0x6D7E,0xBF48,0xE1D8), |
250 | bn_pack4(4BD4,07B2,2B41,54AA), | 250 | bn_pack4(0x4BD4,0x07B2,0x2B41,0x54AA), |
251 | bn_pack4(0F1D,45B7,FF58,5AC5), | 251 | bn_pack4(0x0F1D,0x45B7,0xFF58,0x5AC5), |
252 | bn_pack4(23A9,7A7E,36CC,88BE), | 252 | bn_pack4(0x23A9,0x7A7E,0x36CC,0x88BE), |
253 | bn_pack4(59E7,C97F,BEC7,E8F3), | 253 | bn_pack4(0x59E7,0xC97F,0xBEC7,0xE8F3), |
254 | bn_pack4(B5A8,4031,900B,1C9E), | 254 | bn_pack4(0xB5A8,0x4031,0x900B,0x1C9E), |
255 | bn_pack4(D55E,702F,4698,0C82), | 255 | bn_pack4(0xD55E,0x702F,0x4698,0x0C82), |
256 | bn_pack4(F482,D7CE,6E74,FEF6), | 256 | bn_pack4(0xF482,0xD7CE,0x6E74,0xFEF6), |
257 | bn_pack4(F032,EA15,D172,1D03), | 257 | bn_pack4(0xF032,0xEA15,0xD172,0x1D03), |
258 | bn_pack4(5983,CA01,C64B,92EC), | 258 | bn_pack4(0x5983,0xCA01,0xC64B,0x92EC), |
259 | bn_pack4(6FB8,F401,378C,D2BF), | 259 | bn_pack4(0x6FB8,0xF401,0x378C,0xD2BF), |
260 | bn_pack4(3320,5151,2BD7,AF42), | 260 | bn_pack4(0x3320,0x5151,0x2BD7,0xAF42), |
261 | bn_pack4(DB7F,1447,E6CC,254B), | 261 | bn_pack4(0xDB7F,0x1447,0xE6CC,0x254B), |
262 | bn_pack4(44CE,6CBA,CED4,BB1B), | 262 | bn_pack4(0x44CE,0x6CBA,0xCED4,0xBB1B), |
263 | bn_pack4(DA3E,DBEB,CF9B,14ED), | 263 | bn_pack4(0xDA3E,0xDBEB,0xCF9B,0x14ED), |
264 | bn_pack4(1797,27B0,865A,8918), | 264 | bn_pack4(0x1797,0x27B0,0x865A,0x8918), |
265 | bn_pack4(B06A,53ED,9027,D831), | 265 | bn_pack4(0xB06A,0x53ED,0x9027,0xD831), |
266 | bn_pack4(E5DB,382F,4130,01AE), | 266 | bn_pack4(0xE5DB,0x382F,0x4130,0x01AE), |
267 | bn_pack4(F8FF,9406,AD9E,530E), | 267 | bn_pack4(0xF8FF,0x9406,0xAD9E,0x530E), |
268 | bn_pack4(C975,1E76,3DBA,37BD), | 268 | bn_pack4(0xC975,0x1E76,0x3DBA,0x37BD), |
269 | bn_pack4(C1D4,DCB2,6026,46DE), | 269 | bn_pack4(0xC1D4,0xDCB2,0x6026,0x46DE), |
270 | bn_pack4(36C3,FAB4,D27C,7026), | 270 | bn_pack4(0x36C3,0xFAB4,0xD27C,0x7026), |
271 | bn_pack4(4DF4,35C9,3402,8492), | 271 | bn_pack4(0x4DF4,0x35C9,0x3402,0x8492), |
272 | bn_pack4(86FF,B7DC,90A6,C08F), | 272 | bn_pack4(0x86FF,0xB7DC,0x90A6,0xC08F), |
273 | bn_pack4(93B4,EA98,8D8F,DDC1), | 273 | bn_pack4(0x93B4,0xEA98,0x8D8F,0xDDC1), |
274 | bn_pack4(D006,9127,D5B0,5AA9), | 274 | bn_pack4(0xD006,0x9127,0xD5B0,0x5AA9), |
275 | bn_pack4(B81B,DD76,2170,481C), | 275 | bn_pack4(0xB81B,0xDD76,0x2170,0x481C), |
276 | bn_pack4(1F61,2970,CEE2,D7AF), | 276 | bn_pack4(0x1F61,0x2970,0xCEE2,0xD7AF), |
277 | bn_pack4(233B,A186,515B,E7ED), | 277 | bn_pack4(0x233B,0xA186,0x515B,0xE7ED), |
278 | bn_pack4(99B2,964F,A090,C3A2), | 278 | bn_pack4(0x99B2,0x964F,0xA090,0xC3A2), |
279 | bn_pack4(287C,5947,4E6B,C05D), | 279 | bn_pack4(0x287C,0x5947,0x4E6B,0xC05D), |
280 | bn_pack4(2E8E,FC14,1FBE,CAA6), | 280 | bn_pack4(0x2E8E,0xFC14,0x1FBE,0xCAA6), |
281 | bn_pack4(DBBB,C2DB,04DE,8EF9), | 281 | bn_pack4(0xDBBB,0xC2DB,0x04DE,0x8EF9), |
282 | bn_pack4(2583,E9CA,2AD4,4CE8), | 282 | bn_pack4(0x2583,0xE9CA,0x2AD4,0x4CE8), |
283 | bn_pack4(1A94,6834,B615,0BDA), | 283 | bn_pack4(0x1A94,0x6834,0xB615,0x0BDA), |
284 | bn_pack4(99C3,2718,6AF4,E23C), | 284 | bn_pack4(0x99C3,0x2718,0x6AF4,0xE23C), |
285 | bn_pack4(8871,9A10,BDBA,5B26), | 285 | bn_pack4(0x8871,0x9A10,0xBDBA,0x5B26), |
286 | bn_pack4(1A72,3C12,A787,E6D7), | 286 | bn_pack4(0x1A72,0x3C12,0xA787,0xE6D7), |
287 | bn_pack4(4B82,D120,A921,0801), | 287 | bn_pack4(0x4B82,0xD120,0xA921,0x0801), |
288 | bn_pack4(43DB,5BFC,E0FD,108E), | 288 | bn_pack4(0x43DB,0x5BFC,0xE0FD,0x108E), |
289 | bn_pack4(08E2,4FA0,74E5,AB31), | 289 | bn_pack4(0x08E2,0x4FA0,0x74E5,0xAB31), |
290 | bn_pack4(7709,88C0,BAD9,46E2), | 290 | bn_pack4(0x7709,0x88C0,0xBAD9,0x46E2), |
291 | bn_pack4(BBE1,1757,7A61,5D6C), | 291 | bn_pack4(0xBBE1,0x1757,0x7A61,0x5D6C), |
292 | bn_pack4(521F,2B18,177B,200C), | 292 | bn_pack4(0x521F,0x2B18,0x177B,0x200C), |
293 | bn_pack4(D876,0273,3EC8,6A64), | 293 | bn_pack4(0xD876,0x0273,0x3EC8,0x6A64), |
294 | bn_pack4(F12F,FA06,D98A,0864), | 294 | bn_pack4(0xF12F,0xFA06,0xD98A,0x0864), |
295 | bn_pack4(CEE3,D226,1AD2,EE6B), | 295 | bn_pack4(0xCEE3,0xD226,0x1AD2,0xEE6B), |
296 | bn_pack4(1E8C,94E0,4A25,619D), | 296 | bn_pack4(0x1E8C,0x94E0,0x4A25,0x619D), |
297 | bn_pack4(ABF5,AE8C,DB09,33D7), | 297 | bn_pack4(0xABF5,0xAE8C,0xDB09,0x33D7), |
298 | bn_pack4(B397,0F85,A6E1,E4C7), | 298 | bn_pack4(0xB397,0x0F85,0xA6E1,0xE4C7), |
299 | bn_pack4(8AEA,7157,5D06,0C7D), | 299 | bn_pack4(0x8AEA,0x7157,0x5D06,0x0C7D), |
300 | bn_pack4(ECFB,8504,58DB,EF0A), | 300 | bn_pack4(0xECFB,0x8504,0x58DB,0xEF0A), |
301 | bn_pack4(A855,21AB,DF1C,BA64), | 301 | bn_pack4(0xA855,0x21AB,0xDF1C,0xBA64), |
302 | bn_pack4(AD33,170D,0450,7A33), | 302 | bn_pack4(0xAD33,0x170D,0x0450,0x7A33), |
303 | bn_pack4(1572,8E5A,8AAA,C42D), | 303 | bn_pack4(0x1572,0x8E5A,0x8AAA,0xC42D), |
304 | bn_pack4(15D2,2618,98FA,0510), | 304 | bn_pack4(0x15D2,0x2618,0x98FA,0x0510), |
305 | bn_pack4(3995,497C,EA95,6AE5), | 305 | bn_pack4(0x3995,0x497C,0xEA95,0x6AE5), |
306 | bn_pack4(DE2B,CBF6,9558,1718), | 306 | bn_pack4(0xDE2B,0xCBF6,0x9558,0x1718), |
307 | bn_pack4(B5C5,5DF0,6F4C,52C9), | 307 | bn_pack4(0xB5C5,0x5DF0,0x6F4C,0x52C9), |
308 | bn_pack4(9B27,83A2,EC07,A28F), | 308 | bn_pack4(0x9B27,0x83A2,0xEC07,0xA28F), |
309 | bn_pack4(E39E,772C,180E,8603), | 309 | bn_pack4(0xE39E,0x772C,0x180E,0x8603), |
310 | bn_pack4(3290,5E46,2E36,CE3B), | 310 | bn_pack4(0x3290,0x5E46,0x2E36,0xCE3B), |
311 | bn_pack4(F174,6C08,CA18,217C), | 311 | bn_pack4(0xF174,0x6C08,0xCA18,0x217C), |
312 | bn_pack4(670C,354E,4ABC,9804), | 312 | bn_pack4(0x670C,0x354E,0x4ABC,0x9804), |
313 | bn_pack4(9ED5,2907,7096,966D), | 313 | bn_pack4(0x9ED5,0x2907,0x7096,0x966D), |
314 | bn_pack4(1C62,F356,2085,52BB), | 314 | bn_pack4(0x1C62,0xF356,0x2085,0x52BB), |
315 | bn_pack4(8365,5D23,DCA3,AD96), | 315 | bn_pack4(0x8365,0x5D23,0xDCA3,0xAD96), |
316 | bn_pack4(6916,3FA8,FD24,CF5F), | 316 | bn_pack4(0x6916,0x3FA8,0xFD24,0xCF5F), |
317 | bn_pack4(98DA,4836,1C55,D39A), | 317 | bn_pack4(0x98DA,0x4836,0x1C55,0xD39A), |
318 | bn_pack4(C200,7CB8,A163,BF05), | 318 | bn_pack4(0xC200,0x7CB8,0xA163,0xBF05), |
319 | bn_pack4(4928,6651,ECE4,5B3D), | 319 | bn_pack4(0x4928,0x6651,0xECE4,0x5B3D), |
320 | bn_pack4(AE9F,2411,7C4B,1FE6), | 320 | bn_pack4(0xAE9F,0x2411,0x7C4B,0x1FE6), |
321 | bn_pack4(EE38,6BFB,5A89,9FA5), | 321 | bn_pack4(0xEE38,0x6BFB,0x5A89,0x9FA5), |
322 | bn_pack4(0BFF,5CB6,F406,B7ED), | 322 | bn_pack4(0x0BFF,0x5CB6,0xF406,0xB7ED), |
323 | bn_pack4(F44C,42E9,A637,ED6B), | 323 | bn_pack4(0xF44C,0x42E9,0xA637,0xED6B), |
324 | bn_pack4(E485,B576,625E,7EC6), | 324 | bn_pack4(0xE485,0xB576,0x625E,0x7EC6), |
325 | bn_pack4(4FE1,356D,6D51,C245), | 325 | bn_pack4(0x4FE1,0x356D,0x6D51,0xC245), |
326 | bn_pack4(302B,0A6D,F25F,1437), | 326 | bn_pack4(0x302B,0x0A6D,0xF25F,0x1437), |
327 | bn_pack4(EF95,19B3,CD3A,431B), | 327 | bn_pack4(0xEF95,0x19B3,0xCD3A,0x431B), |
328 | bn_pack4(514A,0879,8E34,04DD), | 328 | bn_pack4(0x514A,0x0879,0x8E34,0x04DD), |
329 | bn_pack4(020B,BEA6,3B13,9B22), | 329 | bn_pack4(0x020B,0xBEA6,0x3B13,0x9B22), |
330 | bn_pack4(2902,4E08,8A67,CC74), | 330 | bn_pack4(0x2902,0x4E08,0x8A67,0xCC74), |
331 | bn_pack4(C4C6,628B,80DC,1CD1), | 331 | bn_pack4(0xC4C6,0x628B,0x80DC,0x1CD1), |
332 | bn_pack4(C90F,DAA2,2168,C234), | 332 | bn_pack4(0xC90F,0xDAA2,0x2168,0xC234), |
333 | bn_pack4(FFFF,FFFF,FFFF,FFFF) | 333 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF) |
334 | }; | 334 | }; |
335 | static BIGNUM bn_group_6144 = { | 335 | static BIGNUM bn_group_6144 = { |
336 | bn_group_6144_value, | 336 | bn_group_6144_value, |
@@ -341,134 +341,134 @@ static BIGNUM bn_group_6144 = { | |||
341 | }; | 341 | }; |
342 | 342 | ||
343 | static BN_ULONG bn_group_8192_value[] = { | 343 | static BN_ULONG bn_group_8192_value[] = { |
344 | bn_pack4(FFFF,FFFF,FFFF,FFFF), | 344 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF), |
345 | bn_pack4(60C9,80DD,98ED,D3DF), | 345 | bn_pack4(0x60C9,0x80DD,0x98ED,0xD3DF), |
346 | bn_pack4(C81F,56E8,80B9,6E71), | 346 | bn_pack4(0xC81F,0x56E8,0x80B9,0x6E71), |
347 | bn_pack4(9E30,50E2,7656,94DF), | 347 | bn_pack4(0x9E30,0x50E2,0x7656,0x94DF), |
348 | bn_pack4(9558,E447,5677,E9AA), | 348 | bn_pack4(0x9558,0xE447,0x5677,0xE9AA), |
349 | bn_pack4(C919,0DA6,FC02,6E47), | 349 | bn_pack4(0xC919,0x0DA6,0xFC02,0x6E47), |
350 | bn_pack4(889A,002E,D5EE,382B), | 350 | bn_pack4(0x889A,0x002E,0xD5EE,0x382B), |
351 | bn_pack4(4009,438B,481C,6CD7), | 351 | bn_pack4(0x4009,0x438B,0x481C,0x6CD7), |
352 | bn_pack4(3590,46F4,EB87,9F92), | 352 | bn_pack4(0x3590,0x46F4,0xEB87,0x9F92), |
353 | bn_pack4(FAF3,6BC3,1ECF,A268), | 353 | bn_pack4(0xFAF3,0x6BC3,0x1ECF,0xA268), |
354 | bn_pack4(B1D5,10BD,7EE7,4D73), | 354 | bn_pack4(0xB1D5,0x10BD,0x7EE7,0x4D73), |
355 | bn_pack4(F9AB,4819,5DED,7EA1), | 355 | bn_pack4(0xF9AB,0x4819,0x5DED,0x7EA1), |
356 | bn_pack4(64F3,1CC5,0846,851D), | 356 | bn_pack4(0x64F3,0x1CC5,0x0846,0x851D), |
357 | bn_pack4(4597,E899,A025,5DC1), | 357 | bn_pack4(0x4597,0xE899,0xA025,0x5DC1), |
358 | bn_pack4(DF31,0EE0,74AB,6A36), | 358 | bn_pack4(0xDF31,0x0EE0,0x74AB,0x6A36), |
359 | bn_pack4(6D2A,13F8,3F44,F82D), | 359 | bn_pack4(0x6D2A,0x13F8,0x3F44,0xF82D), |
360 | bn_pack4(062B,3CF5,B3A2,78A6), | 360 | bn_pack4(0x062B,0x3CF5,0xB3A2,0x78A6), |
361 | bn_pack4(7968,3303,ED5B,DD3A), | 361 | bn_pack4(0x7968,0x3303,0xED5B,0xDD3A), |
362 | bn_pack4(FA9D,4B7F,A2C0,87E8), | 362 | bn_pack4(0xFA9D,0x4B7F,0xA2C0,0x87E8), |
363 | bn_pack4(4BCB,C886,2F83,85DD), | 363 | bn_pack4(0x4BCB,0xC886,0x2F83,0x85DD), |
364 | bn_pack4(3473,FC64,6CEA,306B), | 364 | bn_pack4(0x3473,0xFC64,0x6CEA,0x306B), |
365 | bn_pack4(13EB,57A8,1A23,F0C7), | 365 | bn_pack4(0x13EB,0x57A8,0x1A23,0xF0C7), |
366 | bn_pack4(2222,2E04,A403,7C07), | 366 | bn_pack4(0x2222,0x2E04,0xA403,0x7C07), |
367 | bn_pack4(E3FD,B8BE,FC84,8AD9), | 367 | bn_pack4(0xE3FD,0xB8BE,0xFC84,0x8AD9), |
368 | bn_pack4(238F,16CB,E39D,652D), | 368 | bn_pack4(0x238F,0x16CB,0xE39D,0x652D), |
369 | bn_pack4(3423,B474,2BF1,C978), | 369 | bn_pack4(0x3423,0xB474,0x2BF1,0xC978), |
370 | bn_pack4(3AAB,639C,5AE4,F568), | 370 | bn_pack4(0x3AAB,0x639C,0x5AE4,0xF568), |
371 | bn_pack4(2576,F693,6BA4,2466), | 371 | bn_pack4(0x2576,0xF693,0x6BA4,0x2466), |
372 | bn_pack4(741F,A7BF,8AFC,47ED), | 372 | bn_pack4(0x741F,0xA7BF,0x8AFC,0x47ED), |
373 | bn_pack4(3BC8,32B6,8D9D,D300), | 373 | bn_pack4(0x3BC8,0x32B6,0x8D9D,0xD300), |
374 | bn_pack4(D8BE,C4D0,73B9,31BA), | 374 | bn_pack4(0xD8BE,0xC4D0,0x73B9,0x31BA), |
375 | bn_pack4(3877,7CB6,A932,DF8C), | 375 | bn_pack4(0x3877,0x7CB6,0xA932,0xDF8C), |
376 | bn_pack4(74A3,926F,12FE,E5E4), | 376 | bn_pack4(0x74A3,0x926F,0x12FE,0xE5E4), |
377 | bn_pack4(E694,F91E,6DBE,1159), | 377 | bn_pack4(0xE694,0xF91E,0x6DBE,0x1159), |
378 | bn_pack4(12BF,2D5B,0B74,74D6), | 378 | bn_pack4(0x12BF,0x2D5B,0x0B74,0x74D6), |
379 | bn_pack4(043E,8F66,3F48,60EE), | 379 | bn_pack4(0x043E,0x8F66,0x3F48,0x60EE), |
380 | bn_pack4(387F,E8D7,6E3C,0468), | 380 | bn_pack4(0x387F,0xE8D7,0x6E3C,0x0468), |
381 | bn_pack4(DA56,C9EC,2EF2,9632), | 381 | bn_pack4(0xDA56,0xC9EC,0x2EF2,0x9632), |
382 | bn_pack4(EB19,CCB1,A313,D55C), | 382 | bn_pack4(0xEB19,0xCCB1,0xA313,0xD55C), |
383 | bn_pack4(F550,AA3D,8A1F,BFF0), | 383 | bn_pack4(0xF550,0xAA3D,0x8A1F,0xBFF0), |
384 | bn_pack4(06A1,D58B,B7C5,DA76), | 384 | bn_pack4(0x06A1,0xD58B,0xB7C5,0xDA76), |
385 | bn_pack4(A797,15EE,F29B,E328), | 385 | bn_pack4(0xA797,0x15EE,0xF29B,0xE328), |
386 | bn_pack4(14CC,5ED2,0F80,37E0), | 386 | bn_pack4(0x14CC,0x5ED2,0x0F80,0x37E0), |
387 | bn_pack4(CC8F,6D7E,BF48,E1D8), | 387 | bn_pack4(0xCC8F,0x6D7E,0xBF48,0xE1D8), |
388 | bn_pack4(4BD4,07B2,2B41,54AA), | 388 | bn_pack4(0x4BD4,0x07B2,0x2B41,0x54AA), |
389 | bn_pack4(0F1D,45B7,FF58,5AC5), | 389 | bn_pack4(0x0F1D,0x45B7,0xFF58,0x5AC5), |
390 | bn_pack4(23A9,7A7E,36CC,88BE), | 390 | bn_pack4(0x23A9,0x7A7E,0x36CC,0x88BE), |
391 | bn_pack4(59E7,C97F,BEC7,E8F3), | 391 | bn_pack4(0x59E7,0xC97F,0xBEC7,0xE8F3), |
392 | bn_pack4(B5A8,4031,900B,1C9E), | 392 | bn_pack4(0xB5A8,0x4031,0x900B,0x1C9E), |
393 | bn_pack4(D55E,702F,4698,0C82), | 393 | bn_pack4(0xD55E,0x702F,0x4698,0x0C82), |
394 | bn_pack4(F482,D7CE,6E74,FEF6), | 394 | bn_pack4(0xF482,0xD7CE,0x6E74,0xFEF6), |
395 | bn_pack4(F032,EA15,D172,1D03), | 395 | bn_pack4(0xF032,0xEA15,0xD172,0x1D03), |
396 | bn_pack4(5983,CA01,C64B,92EC), | 396 | bn_pack4(0x5983,0xCA01,0xC64B,0x92EC), |
397 | bn_pack4(6FB8,F401,378C,D2BF), | 397 | bn_pack4(0x6FB8,0xF401,0x378C,0xD2BF), |
398 | bn_pack4(3320,5151,2BD7,AF42), | 398 | bn_pack4(0x3320,0x5151,0x2BD7,0xAF42), |
399 | bn_pack4(DB7F,1447,E6CC,254B), | 399 | bn_pack4(0xDB7F,0x1447,0xE6CC,0x254B), |
400 | bn_pack4(44CE,6CBA,CED4,BB1B), | 400 | bn_pack4(0x44CE,0x6CBA,0xCED4,0xBB1B), |
401 | bn_pack4(DA3E,DBEB,CF9B,14ED), | 401 | bn_pack4(0xDA3E,0xDBEB,0xCF9B,0x14ED), |
402 | bn_pack4(1797,27B0,865A,8918), | 402 | bn_pack4(0x1797,0x27B0,0x865A,0x8918), |
403 | bn_pack4(B06A,53ED,9027,D831), | 403 | bn_pack4(0xB06A,0x53ED,0x9027,0xD831), |
404 | bn_pack4(E5DB,382F,4130,01AE), | 404 | bn_pack4(0xE5DB,0x382F,0x4130,0x01AE), |
405 | bn_pack4(F8FF,9406,AD9E,530E), | 405 | bn_pack4(0xF8FF,0x9406,0xAD9E,0x530E), |
406 | bn_pack4(C975,1E76,3DBA,37BD), | 406 | bn_pack4(0xC975,0x1E76,0x3DBA,0x37BD), |
407 | bn_pack4(C1D4,DCB2,6026,46DE), | 407 | bn_pack4(0xC1D4,0xDCB2,0x6026,0x46DE), |
408 | bn_pack4(36C3,FAB4,D27C,7026), | 408 | bn_pack4(0x36C3,0xFAB4,0xD27C,0x7026), |
409 | bn_pack4(4DF4,35C9,3402,8492), | 409 | bn_pack4(0x4DF4,0x35C9,0x3402,0x8492), |
410 | bn_pack4(86FF,B7DC,90A6,C08F), | 410 | bn_pack4(0x86FF,0xB7DC,0x90A6,0xC08F), |
411 | bn_pack4(93B4,EA98,8D8F,DDC1), | 411 | bn_pack4(0x93B4,0xEA98,0x8D8F,0xDDC1), |
412 | bn_pack4(D006,9127,D5B0,5AA9), | 412 | bn_pack4(0xD006,0x9127,0xD5B0,0x5AA9), |
413 | bn_pack4(B81B,DD76,2170,481C), | 413 | bn_pack4(0xB81B,0xDD76,0x2170,0x481C), |
414 | bn_pack4(1F61,2970,CEE2,D7AF), | 414 | bn_pack4(0x1F61,0x2970,0xCEE2,0xD7AF), |
415 | bn_pack4(233B,A186,515B,E7ED), | 415 | bn_pack4(0x233B,0xA186,0x515B,0xE7ED), |
416 | bn_pack4(99B2,964F,A090,C3A2), | 416 | bn_pack4(0x99B2,0x964F,0xA090,0xC3A2), |
417 | bn_pack4(287C,5947,4E6B,C05D), | 417 | bn_pack4(0x287C,0x5947,0x4E6B,0xC05D), |
418 | bn_pack4(2E8E,FC14,1FBE,CAA6), | 418 | bn_pack4(0x2E8E,0xFC14,0x1FBE,0xCAA6), |
419 | bn_pack4(DBBB,C2DB,04DE,8EF9), | 419 | bn_pack4(0xDBBB,0xC2DB,0x04DE,0x8EF9), |
420 | bn_pack4(2583,E9CA,2AD4,4CE8), | 420 | bn_pack4(0x2583,0xE9CA,0x2AD4,0x4CE8), |
421 | bn_pack4(1A94,6834,B615,0BDA), | 421 | bn_pack4(0x1A94,0x6834,0xB615,0x0BDA), |
422 | bn_pack4(99C3,2718,6AF4,E23C), | 422 | bn_pack4(0x99C3,0x2718,0x6AF4,0xE23C), |
423 | bn_pack4(8871,9A10,BDBA,5B26), | 423 | bn_pack4(0x8871,0x9A10,0xBDBA,0x5B26), |
424 | bn_pack4(1A72,3C12,A787,E6D7), | 424 | bn_pack4(0x1A72,0x3C12,0xA787,0xE6D7), |
425 | bn_pack4(4B82,D120,A921,0801), | 425 | bn_pack4(0x4B82,0xD120,0xA921,0x0801), |
426 | bn_pack4(43DB,5BFC,E0FD,108E), | 426 | bn_pack4(0x43DB,0x5BFC,0xE0FD,0x108E), |
427 | bn_pack4(08E2,4FA0,74E5,AB31), | 427 | bn_pack4(0x08E2,0x4FA0,0x74E5,0xAB31), |
428 | bn_pack4(7709,88C0,BAD9,46E2), | 428 | bn_pack4(0x7709,0x88C0,0xBAD9,0x46E2), |
429 | bn_pack4(BBE1,1757,7A61,5D6C), | 429 | bn_pack4(0xBBE1,0x1757,0x7A61,0x5D6C), |
430 | bn_pack4(521F,2B18,177B,200C), | 430 | bn_pack4(0x521F,0x2B18,0x177B,0x200C), |
431 | bn_pack4(D876,0273,3EC8,6A64), | 431 | bn_pack4(0xD876,0x0273,0x3EC8,0x6A64), |
432 | bn_pack4(F12F,FA06,D98A,0864), | 432 | bn_pack4(0xF12F,0xFA06,0xD98A,0x0864), |
433 | bn_pack4(CEE3,D226,1AD2,EE6B), | 433 | bn_pack4(0xCEE3,0xD226,0x1AD2,0xEE6B), |
434 | bn_pack4(1E8C,94E0,4A25,619D), | 434 | bn_pack4(0x1E8C,0x94E0,0x4A25,0x619D), |
435 | bn_pack4(ABF5,AE8C,DB09,33D7), | 435 | bn_pack4(0xABF5,0xAE8C,0xDB09,0x33D7), |
436 | bn_pack4(B397,0F85,A6E1,E4C7), | 436 | bn_pack4(0xB397,0x0F85,0xA6E1,0xE4C7), |
437 | bn_pack4(8AEA,7157,5D06,0C7D), | 437 | bn_pack4(0x8AEA,0x7157,0x5D06,0x0C7D), |
438 | bn_pack4(ECFB,8504,58DB,EF0A), | 438 | bn_pack4(0xECFB,0x8504,0x58DB,0xEF0A), |
439 | bn_pack4(A855,21AB,DF1C,BA64), | 439 | bn_pack4(0xA855,0x21AB,0xDF1C,0xBA64), |
440 | bn_pack4(AD33,170D,0450,7A33), | 440 | bn_pack4(0xAD33,0x170D,0x0450,0x7A33), |
441 | bn_pack4(1572,8E5A,8AAA,C42D), | 441 | bn_pack4(0x1572,0x8E5A,0x8AAA,0xC42D), |
442 | bn_pack4(15D2,2618,98FA,0510), | 442 | bn_pack4(0x15D2,0x2618,0x98FA,0x0510), |
443 | bn_pack4(3995,497C,EA95,6AE5), | 443 | bn_pack4(0x3995,0x497C,0xEA95,0x6AE5), |
444 | bn_pack4(DE2B,CBF6,9558,1718), | 444 | bn_pack4(0xDE2B,0xCBF6,0x9558,0x1718), |
445 | bn_pack4(B5C5,5DF0,6F4C,52C9), | 445 | bn_pack4(0xB5C5,0x5DF0,0x6F4C,0x52C9), |
446 | bn_pack4(9B27,83A2,EC07,A28F), | 446 | bn_pack4(0x9B27,0x83A2,0xEC07,0xA28F), |
447 | bn_pack4(E39E,772C,180E,8603), | 447 | bn_pack4(0xE39E,0x772C,0x180E,0x8603), |
448 | bn_pack4(3290,5E46,2E36,CE3B), | 448 | bn_pack4(0x3290,0x5E46,0x2E36,0xCE3B), |
449 | bn_pack4(F174,6C08,CA18,217C), | 449 | bn_pack4(0xF174,0x6C08,0xCA18,0x217C), |
450 | bn_pack4(670C,354E,4ABC,9804), | 450 | bn_pack4(0x670C,0x354E,0x4ABC,0x9804), |
451 | bn_pack4(9ED5,2907,7096,966D), | 451 | bn_pack4(0x9ED5,0x2907,0x7096,0x966D), |
452 | bn_pack4(1C62,F356,2085,52BB), | 452 | bn_pack4(0x1C62,0xF356,0x2085,0x52BB), |
453 | bn_pack4(8365,5D23,DCA3,AD96), | 453 | bn_pack4(0x8365,0x5D23,0xDCA3,0xAD96), |
454 | bn_pack4(6916,3FA8,FD24,CF5F), | 454 | bn_pack4(0x6916,0x3FA8,0xFD24,0xCF5F), |
455 | bn_pack4(98DA,4836,1C55,D39A), | 455 | bn_pack4(0x98DA,0x4836,0x1C55,0xD39A), |
456 | bn_pack4(C200,7CB8,A163,BF05), | 456 | bn_pack4(0xC200,0x7CB8,0xA163,0xBF05), |
457 | bn_pack4(4928,6651,ECE4,5B3D), | 457 | bn_pack4(0x4928,0x6651,0xECE4,0x5B3D), |
458 | bn_pack4(AE9F,2411,7C4B,1FE6), | 458 | bn_pack4(0xAE9F,0x2411,0x7C4B,0x1FE6), |
459 | bn_pack4(EE38,6BFB,5A89,9FA5), | 459 | bn_pack4(0xEE38,0x6BFB,0x5A89,0x9FA5), |
460 | bn_pack4(0BFF,5CB6,F406,B7ED), | 460 | bn_pack4(0x0BFF,0x5CB6,0xF406,0xB7ED), |
461 | bn_pack4(F44C,42E9,A637,ED6B), | 461 | bn_pack4(0xF44C,0x42E9,0xA637,0xED6B), |
462 | bn_pack4(E485,B576,625E,7EC6), | 462 | bn_pack4(0xE485,0xB576,0x625E,0x7EC6), |
463 | bn_pack4(4FE1,356D,6D51,C245), | 463 | bn_pack4(0x4FE1,0x356D,0x6D51,0xC245), |
464 | bn_pack4(302B,0A6D,F25F,1437), | 464 | bn_pack4(0x302B,0x0A6D,0xF25F,0x1437), |
465 | bn_pack4(EF95,19B3,CD3A,431B), | 465 | bn_pack4(0xEF95,0x19B3,0xCD3A,0x431B), |
466 | bn_pack4(514A,0879,8E34,04DD), | 466 | bn_pack4(0x514A,0x0879,0x8E34,0x04DD), |
467 | bn_pack4(020B,BEA6,3B13,9B22), | 467 | bn_pack4(0x020B,0xBEA6,0x3B13,0x9B22), |
468 | bn_pack4(2902,4E08,8A67,CC74), | 468 | bn_pack4(0x2902,0x4E08,0x8A67,0xCC74), |
469 | bn_pack4(C4C6,628B,80DC,1CD1), | 469 | bn_pack4(0xC4C6,0x628B,0x80DC,0x1CD1), |
470 | bn_pack4(C90F,DAA2,2168,C234), | 470 | bn_pack4(0xC90F,0xDAA2,0x2168,0xC234), |
471 | bn_pack4(FFFF,FFFF,FFFF,FFFF) | 471 | bn_pack4(0xFFFF,0xFFFF,0xFFFF,0xFFFF) |
472 | }; | 472 | }; |
473 | static BIGNUM bn_group_8192 = { | 473 | static BIGNUM bn_group_8192 = { |
474 | bn_group_8192_value, | 474 | bn_group_8192_value, |
diff --git a/src/lib/libcrypto/srp/srp_lib.c b/src/lib/libcrypto/srp/srp_lib.c index 92cea98dcd..7c1dcc5111 100644 --- a/src/lib/libcrypto/srp/srp_lib.c +++ b/src/lib/libcrypto/srp/srp_lib.c | |||
@@ -63,13 +63,17 @@ | |||
63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
64 | 64 | ||
65 | #if (BN_BYTES == 8) | 65 | #if (BN_BYTES == 8) |
66 | #define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ul | 66 | # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) |
67 | #endif | 67 | # define bn_pack4(a1,a2,a3,a4) ((a1##UI64<<48)|(a2##UI64<<32)|(a3##UI64<<16)|a4##UI64) |
68 | #if (BN_BYTES == 4) | 68 | # elif defined(__arch64__) |
69 | #define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##ul, 0x##a1##a2##ul | 69 | # define bn_pack4(a1,a2,a3,a4) ((a1##UL<<48)|(a2##UL<<32)|(a3##UL<<16)|a4##UL) |
70 | #endif | 70 | # else |
71 | #if (BN_BYTES == 2) | 71 | # define bn_pack4(a1,a2,a3,a4) ((a1##ULL<<48)|(a2##ULL<<32)|(a3##ULL<<16)|a4##ULL) |
72 | #define bn_pack4(a1,a2,a3,a4) 0x##a4##u,0x##a3##u,0x##a2##u,0x##a1##u | 72 | # endif |
73 | #elif (BN_BYTES == 4) | ||
74 | # define bn_pack4(a1,a2,a3,a4) ((a3##UL<<16)|a4##UL), ((a1##UL<<16)|a2##UL) | ||
75 | #else | ||
76 | # error "unsupported BN_BYTES" | ||
73 | #endif | 77 | #endif |
74 | 78 | ||
75 | 79 | ||
diff --git a/src/lib/libcrypto/srp/srp_vfy.c b/src/lib/libcrypto/srp/srp_vfy.c index c8be907d7f..4a3d13edf6 100644 --- a/src/lib/libcrypto/srp/srp_vfy.c +++ b/src/lib/libcrypto/srp/srp_vfy.c | |||
@@ -390,7 +390,7 @@ int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file) | |||
390 | } | 390 | } |
391 | for (i = 0; i < sk_OPENSSL_PSTRING_num(tmpdb->data); i++) | 391 | for (i = 0; i < sk_OPENSSL_PSTRING_num(tmpdb->data); i++) |
392 | { | 392 | { |
393 | pp = (char **)sk_OPENSSL_PSTRING_value(tmpdb->data,i); | 393 | pp = sk_OPENSSL_PSTRING_value(tmpdb->data,i); |
394 | if (pp[DB_srptype][0] == DB_SRP_INDEX) | 394 | if (pp[DB_srptype][0] == DB_SRP_INDEX) |
395 | { | 395 | { |
396 | /*we add this couple in the internal Stack */ | 396 | /*we add this couple in the internal Stack */ |
@@ -581,7 +581,8 @@ char *SRP_create_verifier(const char *user, const char *pass, char **salt, | |||
581 | if (*salt == NULL) | 581 | if (*salt == NULL) |
582 | { | 582 | { |
583 | char *tmp_salt; | 583 | char *tmp_salt; |
584 | if ((tmp_salt = (char *)OPENSSL_malloc(SRP_RANDOM_SALT_LEN * 2)) == NULL) | 584 | |
585 | if ((tmp_salt = OPENSSL_malloc(SRP_RANDOM_SALT_LEN * 2)) == NULL) | ||
585 | { | 586 | { |
586 | OPENSSL_free(vf); | 587 | OPENSSL_free(vf); |
587 | goto err; | 588 | goto err; |