diff options
-rw-r--r-- | src/lib/libcrypto/camellia/cmll_locl.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/camellia/cmll_misc.c | 39 | ||||
-rw-r--r-- | src/lib/libcrypto/camellia/cmll_utl.c | 61 | ||||
-rw-r--r-- | src/lib/libcrypto/crypto/Makefile | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-586.pl | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-parisc.pl | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-s390x.pl | 8 | ||||
-rwxr-xr-x | src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_skey.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_utl.c | 59 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/camellia/cmll_locl.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/camellia/cmll_misc.c | 39 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/camellia/cmll_utl.c | 61 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl | 8 | ||||
-rwxr-xr-x | src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rc4/rc4_skey.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rc4/rc4_utl.c | 59 |
19 files changed, 73 insertions, 314 deletions
diff --git a/src/lib/libcrypto/camellia/cmll_locl.h b/src/lib/libcrypto/camellia/cmll_locl.h index 1ee144d4d0..60055b0d18 100644 --- a/src/lib/libcrypto/camellia/cmll_locl.h +++ b/src/lib/libcrypto/camellia/cmll_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cmll_locl.h,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: cmll_locl.h,v 1.4 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . | 3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . |
4 | * ALL RIGHTS RESERVED. | 4 | * ALL RIGHTS RESERVED. |
@@ -81,6 +81,4 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], | |||
81 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); | 81 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); |
82 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], | 82 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], |
83 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); | 83 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); |
84 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
85 | CAMELLIA_KEY *key); | ||
86 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ | 84 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ |
diff --git a/src/lib/libcrypto/camellia/cmll_misc.c b/src/lib/libcrypto/camellia/cmll_misc.c index 5caa7a9874..68b8dc44ff 100644 --- a/src/lib/libcrypto/camellia/cmll_misc.c +++ b/src/lib/libcrypto/camellia/cmll_misc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cmll_misc.c,v 1.4 2014/07/09 11:10:50 bcook Exp $ */ | 1 | /* $OpenBSD: cmll_misc.c,v 1.5 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -54,25 +54,28 @@ | |||
54 | #include <openssl/camellia.h> | 54 | #include <openssl/camellia.h> |
55 | #include "cmll_locl.h" | 55 | #include "cmll_locl.h" |
56 | 56 | ||
57 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | 57 | int |
58 | CAMELLIA_KEY *key) | 58 | Camellia_set_key(const unsigned char *userKey, const int bits, |
59 | { | 59 | CAMELLIA_KEY *key) |
60 | if(!userKey || !key) | 60 | { |
61 | if (userKey == NULL || key == NULL) | ||
61 | return -1; | 62 | return -1; |
62 | if(bits != 128 && bits != 192 && bits != 256) | 63 | if (bits != 128 && bits != 192 && bits != 256) |
63 | return -2; | 64 | return -2; |
64 | key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key); | 65 | key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); |
65 | return 0; | 66 | return 0; |
66 | } | 67 | } |
67 | 68 | ||
68 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, | 69 | void |
69 | const CAMELLIA_KEY *key) | 70 | Camellia_encrypt(const unsigned char *in, unsigned char *out, |
70 | { | 71 | const CAMELLIA_KEY *key) |
71 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); | 72 | { |
72 | } | 73 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
74 | } | ||
73 | 75 | ||
74 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, | 76 | void |
75 | const CAMELLIA_KEY *key) | 77 | Camellia_decrypt(const unsigned char *in, unsigned char *out, |
76 | { | 78 | const CAMELLIA_KEY *key) |
77 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); | 79 | { |
78 | } | 80 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
81 | } | ||
diff --git a/src/lib/libcrypto/camellia/cmll_utl.c b/src/lib/libcrypto/camellia/cmll_utl.c deleted file mode 100644 index 198ba8951a..0000000000 --- a/src/lib/libcrypto/camellia/cmll_utl.c +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* $OpenBSD: cmll_utl.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | */ | ||
51 | |||
52 | #include <openssl/opensslv.h> | ||
53 | #include <openssl/crypto.h> | ||
54 | #include <openssl/camellia.h> | ||
55 | #include "cmll_locl.h" | ||
56 | |||
57 | int Camellia_set_key(const unsigned char *userKey, const int bits, | ||
58 | CAMELLIA_KEY *key) | ||
59 | { | ||
60 | return private_Camellia_set_key(userKey, bits, key); | ||
61 | } | ||
diff --git a/src/lib/libcrypto/crypto/Makefile b/src/lib/libcrypto/crypto/Makefile index 79fbd478b3..fdbafba852 100644 --- a/src/lib/libcrypto/crypto/Makefile +++ b/src/lib/libcrypto/crypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.44 2014/07/11 14:01:38 tedu Exp $ | 1 | # $OpenBSD: Makefile,v 1.45 2014/07/12 20:11:45 miod Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | 4 | ||
@@ -208,9 +208,6 @@ SRCS+= randfile.c rand_lib.c rand_err.c | |||
208 | # rc2/ | 208 | # rc2/ |
209 | SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | 209 | SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c |
210 | 210 | ||
211 | # rc4/ | ||
212 | SRCS+= rc4_utl.c | ||
213 | |||
214 | # rc5/ | 211 | # rc5/ |
215 | #SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5ofb64.c | 212 | #SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5ofb64.c |
216 | 213 | ||
diff --git a/src/lib/libcrypto/rc4/asm/rc4-586.pl b/src/lib/libcrypto/rc4/asm/rc4-586.pl index 5c9ac6ad28..84f1a798cb 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-586.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-586.pl | |||
@@ -300,7 +300,7 @@ $ido="ecx"; | |||
300 | $idx="edx"; | 300 | $idx="edx"; |
301 | 301 | ||
302 | # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); | 302 | # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); |
303 | &function_begin("private_RC4_set_key"); | 303 | &function_begin("RC4_set_key"); |
304 | &mov ($out,&wparam(0)); # load key | 304 | &mov ($out,&wparam(0)); # load key |
305 | &mov ($idi,&wparam(1)); # load len | 305 | &mov ($idi,&wparam(1)); # load len |
306 | &mov ($inp,&wparam(2)); # load data | 306 | &mov ($inp,&wparam(2)); # load data |
@@ -378,7 +378,7 @@ $idx="edx"; | |||
378 | &xor ("eax","eax"); | 378 | &xor ("eax","eax"); |
379 | &mov (&DWP(-8,$out),"eax"); # key->x=0; | 379 | &mov (&DWP(-8,$out),"eax"); # key->x=0; |
380 | &mov (&DWP(-4,$out),"eax"); # key->y=0; | 380 | &mov (&DWP(-4,$out),"eax"); # key->y=0; |
381 | &function_end("private_RC4_set_key"); | 381 | &function_end("RC4_set_key"); |
382 | 382 | ||
383 | # const char *RC4_options(void); | 383 | # const char *RC4_options(void); |
384 | &function_begin_B("RC4_options"); | 384 | &function_begin_B("RC4_options"); |
diff --git a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl index 9eca69902e..7e7974430a 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl | |||
@@ -247,9 +247,9 @@ ___ | |||
247 | 247 | ||
248 | $code.=<<___; | 248 | $code.=<<___; |
249 | 249 | ||
250 | .EXPORT private_RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR | 250 | .EXPORT RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR |
251 | .ALIGN 8 | 251 | .ALIGN 8 |
252 | private_RC4_set_key | 252 | RC4_set_key |
253 | .PROC | 253 | .PROC |
254 | .CALLINFO NO_CALLS | 254 | .CALLINFO NO_CALLS |
255 | .ENTRY | 255 | .ENTRY |
diff --git a/src/lib/libcrypto/rc4/asm/rc4-s390x.pl b/src/lib/libcrypto/rc4/asm/rc4-s390x.pl index 7528ece13c..1aa754820c 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-s390x.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-s390x.pl | |||
@@ -171,10 +171,10 @@ $ikey="%r7"; | |||
171 | $iinp="%r8"; | 171 | $iinp="%r8"; |
172 | 172 | ||
173 | $code.=<<___; | 173 | $code.=<<___; |
174 | .globl private_RC4_set_key | 174 | .globl RC4_set_key |
175 | .type private_RC4_set_key,\@function | 175 | .type RC4_set_key,\@function |
176 | .align 64 | 176 | .align 64 |
177 | private_RC4_set_key: | 177 | RC4_set_key: |
178 | stm${g} %r6,%r8,6*$SIZE_T($sp) | 178 | stm${g} %r6,%r8,6*$SIZE_T($sp) |
179 | lhi $cnt,256 | 179 | lhi $cnt,256 |
180 | la $idx,0(%r0) | 180 | la $idx,0(%r0) |
@@ -210,7 +210,7 @@ private_RC4_set_key: | |||
210 | .Ldone: | 210 | .Ldone: |
211 | lm${g} %r6,%r8,6*$SIZE_T($sp) | 211 | lm${g} %r6,%r8,6*$SIZE_T($sp) |
212 | br $rp | 212 | br $rp |
213 | .size private_RC4_set_key,.-private_RC4_set_key | 213 | .size RC4_set_key,.-RC4_set_key |
214 | 214 | ||
215 | ___ | 215 | ___ |
216 | } | 216 | } |
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl index 2bed1e279f..197749dda7 100755 --- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | |||
@@ -428,10 +428,10 @@ $idx="%r8"; | |||
428 | $ido="%r9"; | 428 | $ido="%r9"; |
429 | 429 | ||
430 | $code.=<<___; | 430 | $code.=<<___; |
431 | .globl private_RC4_set_key | 431 | .globl RC4_set_key |
432 | .type private_RC4_set_key,\@function,3 | 432 | .type RC4_set_key,\@function,3 |
433 | .align 16 | 433 | .align 16 |
434 | private_RC4_set_key: | 434 | RC4_set_key: |
435 | lea 8($dat),$dat | 435 | lea 8($dat),$dat |
436 | lea ($inp,$len),$inp | 436 | lea ($inp,$len),$inp |
437 | neg $len | 437 | neg $len |
@@ -498,7 +498,7 @@ private_RC4_set_key: | |||
498 | mov %eax,-8($dat) | 498 | mov %eax,-8($dat) |
499 | mov %eax,-4($dat) | 499 | mov %eax,-4($dat) |
500 | ret | 500 | ret |
501 | .size private_RC4_set_key,.-private_RC4_set_key | 501 | .size RC4_set_key,.-RC4_set_key |
502 | 502 | ||
503 | .globl RC4_options | 503 | .globl RC4_options |
504 | .type RC4_options,\@abi-omnipotent | 504 | .type RC4_options,\@abi-omnipotent |
diff --git a/src/lib/libcrypto/rc4/rc4_skey.c b/src/lib/libcrypto/rc4/rc4_skey.c index 282ed7cc1b..455cd44d13 100644 --- a/src/lib/libcrypto/rc4/rc4_skey.c +++ b/src/lib/libcrypto/rc4/rc4_skey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rc4_skey.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ | 1 | /* $OpenBSD: rc4_skey.c,v 1.12 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -83,7 +83,7 @@ const char *RC4_options(void) | |||
83 | * Date: Wed, 14 Sep 1994 06:35:31 GMT | 83 | * Date: Wed, 14 Sep 1994 06:35:31 GMT |
84 | */ | 84 | */ |
85 | 85 | ||
86 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | 86 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) |
87 | { | 87 | { |
88 | register RC4_INT tmp; | 88 | register RC4_INT tmp; |
89 | register int id1,id2; | 89 | register int id1,id2; |
diff --git a/src/lib/libcrypto/rc4/rc4_utl.c b/src/lib/libcrypto/rc4/rc4_utl.c deleted file mode 100644 index 0d02171a3e..0000000000 --- a/src/lib/libcrypto/rc4/rc4_utl.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* $OpenBSD: rc4_utl.c,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | */ | ||
51 | |||
52 | #include <openssl/opensslv.h> | ||
53 | #include <openssl/crypto.h> | ||
54 | #include <openssl/rc4.h> | ||
55 | |||
56 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | ||
57 | { | ||
58 | private_RC4_set_key(key, len, data); | ||
59 | } | ||
diff --git a/src/lib/libssl/src/crypto/camellia/cmll_locl.h b/src/lib/libssl/src/crypto/camellia/cmll_locl.h index 1ee144d4d0..60055b0d18 100644 --- a/src/lib/libssl/src/crypto/camellia/cmll_locl.h +++ b/src/lib/libssl/src/crypto/camellia/cmll_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cmll_locl.h,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: cmll_locl.h,v 1.4 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . | 3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . |
4 | * ALL RIGHTS RESERVED. | 4 | * ALL RIGHTS RESERVED. |
@@ -81,6 +81,4 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], | |||
81 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); | 81 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); |
82 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], | 82 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], |
83 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); | 83 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); |
84 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
85 | CAMELLIA_KEY *key); | ||
86 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ | 84 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ |
diff --git a/src/lib/libssl/src/crypto/camellia/cmll_misc.c b/src/lib/libssl/src/crypto/camellia/cmll_misc.c index 5caa7a9874..68b8dc44ff 100644 --- a/src/lib/libssl/src/crypto/camellia/cmll_misc.c +++ b/src/lib/libssl/src/crypto/camellia/cmll_misc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cmll_misc.c,v 1.4 2014/07/09 11:10:50 bcook Exp $ */ | 1 | /* $OpenBSD: cmll_misc.c,v 1.5 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -54,25 +54,28 @@ | |||
54 | #include <openssl/camellia.h> | 54 | #include <openssl/camellia.h> |
55 | #include "cmll_locl.h" | 55 | #include "cmll_locl.h" |
56 | 56 | ||
57 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | 57 | int |
58 | CAMELLIA_KEY *key) | 58 | Camellia_set_key(const unsigned char *userKey, const int bits, |
59 | { | 59 | CAMELLIA_KEY *key) |
60 | if(!userKey || !key) | 60 | { |
61 | if (userKey == NULL || key == NULL) | ||
61 | return -1; | 62 | return -1; |
62 | if(bits != 128 && bits != 192 && bits != 256) | 63 | if (bits != 128 && bits != 192 && bits != 256) |
63 | return -2; | 64 | return -2; |
64 | key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key); | 65 | key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); |
65 | return 0; | 66 | return 0; |
66 | } | 67 | } |
67 | 68 | ||
68 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, | 69 | void |
69 | const CAMELLIA_KEY *key) | 70 | Camellia_encrypt(const unsigned char *in, unsigned char *out, |
70 | { | 71 | const CAMELLIA_KEY *key) |
71 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); | 72 | { |
72 | } | 73 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
74 | } | ||
73 | 75 | ||
74 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, | 76 | void |
75 | const CAMELLIA_KEY *key) | 77 | Camellia_decrypt(const unsigned char *in, unsigned char *out, |
76 | { | 78 | const CAMELLIA_KEY *key) |
77 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); | 79 | { |
78 | } | 80 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
81 | } | ||
diff --git a/src/lib/libssl/src/crypto/camellia/cmll_utl.c b/src/lib/libssl/src/crypto/camellia/cmll_utl.c deleted file mode 100644 index 198ba8951a..0000000000 --- a/src/lib/libssl/src/crypto/camellia/cmll_utl.c +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* $OpenBSD: cmll_utl.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | */ | ||
51 | |||
52 | #include <openssl/opensslv.h> | ||
53 | #include <openssl/crypto.h> | ||
54 | #include <openssl/camellia.h> | ||
55 | #include "cmll_locl.h" | ||
56 | |||
57 | int Camellia_set_key(const unsigned char *userKey, const int bits, | ||
58 | CAMELLIA_KEY *key) | ||
59 | { | ||
60 | return private_Camellia_set_key(userKey, bits, key); | ||
61 | } | ||
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl index 5c9ac6ad28..84f1a798cb 100644 --- a/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl | |||
@@ -300,7 +300,7 @@ $ido="ecx"; | |||
300 | $idx="edx"; | 300 | $idx="edx"; |
301 | 301 | ||
302 | # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); | 302 | # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); |
303 | &function_begin("private_RC4_set_key"); | 303 | &function_begin("RC4_set_key"); |
304 | &mov ($out,&wparam(0)); # load key | 304 | &mov ($out,&wparam(0)); # load key |
305 | &mov ($idi,&wparam(1)); # load len | 305 | &mov ($idi,&wparam(1)); # load len |
306 | &mov ($inp,&wparam(2)); # load data | 306 | &mov ($inp,&wparam(2)); # load data |
@@ -378,7 +378,7 @@ $idx="edx"; | |||
378 | &xor ("eax","eax"); | 378 | &xor ("eax","eax"); |
379 | &mov (&DWP(-8,$out),"eax"); # key->x=0; | 379 | &mov (&DWP(-8,$out),"eax"); # key->x=0; |
380 | &mov (&DWP(-4,$out),"eax"); # key->y=0; | 380 | &mov (&DWP(-4,$out),"eax"); # key->y=0; |
381 | &function_end("private_RC4_set_key"); | 381 | &function_end("RC4_set_key"); |
382 | 382 | ||
383 | # const char *RC4_options(void); | 383 | # const char *RC4_options(void); |
384 | &function_begin_B("RC4_options"); | 384 | &function_begin_B("RC4_options"); |
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl index 9eca69902e..7e7974430a 100644 --- a/src/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl | |||
@@ -247,9 +247,9 @@ ___ | |||
247 | 247 | ||
248 | $code.=<<___; | 248 | $code.=<<___; |
249 | 249 | ||
250 | .EXPORT private_RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR | 250 | .EXPORT RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR |
251 | .ALIGN 8 | 251 | .ALIGN 8 |
252 | private_RC4_set_key | 252 | RC4_set_key |
253 | .PROC | 253 | .PROC |
254 | .CALLINFO NO_CALLS | 254 | .CALLINFO NO_CALLS |
255 | .ENTRY | 255 | .ENTRY |
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl index 7528ece13c..1aa754820c 100644 --- a/src/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl | |||
@@ -171,10 +171,10 @@ $ikey="%r7"; | |||
171 | $iinp="%r8"; | 171 | $iinp="%r8"; |
172 | 172 | ||
173 | $code.=<<___; | 173 | $code.=<<___; |
174 | .globl private_RC4_set_key | 174 | .globl RC4_set_key |
175 | .type private_RC4_set_key,\@function | 175 | .type RC4_set_key,\@function |
176 | .align 64 | 176 | .align 64 |
177 | private_RC4_set_key: | 177 | RC4_set_key: |
178 | stm${g} %r6,%r8,6*$SIZE_T($sp) | 178 | stm${g} %r6,%r8,6*$SIZE_T($sp) |
179 | lhi $cnt,256 | 179 | lhi $cnt,256 |
180 | la $idx,0(%r0) | 180 | la $idx,0(%r0) |
@@ -210,7 +210,7 @@ private_RC4_set_key: | |||
210 | .Ldone: | 210 | .Ldone: |
211 | lm${g} %r6,%r8,6*$SIZE_T($sp) | 211 | lm${g} %r6,%r8,6*$SIZE_T($sp) |
212 | br $rp | 212 | br $rp |
213 | .size private_RC4_set_key,.-private_RC4_set_key | 213 | .size RC4_set_key,.-RC4_set_key |
214 | 214 | ||
215 | ___ | 215 | ___ |
216 | } | 216 | } |
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl index 2bed1e279f..197749dda7 100755 --- a/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl | |||
@@ -428,10 +428,10 @@ $idx="%r8"; | |||
428 | $ido="%r9"; | 428 | $ido="%r9"; |
429 | 429 | ||
430 | $code.=<<___; | 430 | $code.=<<___; |
431 | .globl private_RC4_set_key | 431 | .globl RC4_set_key |
432 | .type private_RC4_set_key,\@function,3 | 432 | .type RC4_set_key,\@function,3 |
433 | .align 16 | 433 | .align 16 |
434 | private_RC4_set_key: | 434 | RC4_set_key: |
435 | lea 8($dat),$dat | 435 | lea 8($dat),$dat |
436 | lea ($inp,$len),$inp | 436 | lea ($inp,$len),$inp |
437 | neg $len | 437 | neg $len |
@@ -498,7 +498,7 @@ private_RC4_set_key: | |||
498 | mov %eax,-8($dat) | 498 | mov %eax,-8($dat) |
499 | mov %eax,-4($dat) | 499 | mov %eax,-4($dat) |
500 | ret | 500 | ret |
501 | .size private_RC4_set_key,.-private_RC4_set_key | 501 | .size RC4_set_key,.-RC4_set_key |
502 | 502 | ||
503 | .globl RC4_options | 503 | .globl RC4_options |
504 | .type RC4_options,\@abi-omnipotent | 504 | .type RC4_options,\@abi-omnipotent |
diff --git a/src/lib/libssl/src/crypto/rc4/rc4_skey.c b/src/lib/libssl/src/crypto/rc4/rc4_skey.c index 282ed7cc1b..455cd44d13 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4_skey.c +++ b/src/lib/libssl/src/crypto/rc4/rc4_skey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rc4_skey.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ | 1 | /* $OpenBSD: rc4_skey.c,v 1.12 2014/07/12 20:11:45 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -83,7 +83,7 @@ const char *RC4_options(void) | |||
83 | * Date: Wed, 14 Sep 1994 06:35:31 GMT | 83 | * Date: Wed, 14 Sep 1994 06:35:31 GMT |
84 | */ | 84 | */ |
85 | 85 | ||
86 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | 86 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) |
87 | { | 87 | { |
88 | register RC4_INT tmp; | 88 | register RC4_INT tmp; |
89 | register int id1,id2; | 89 | register int id1,id2; |
diff --git a/src/lib/libssl/src/crypto/rc4/rc4_utl.c b/src/lib/libssl/src/crypto/rc4/rc4_utl.c deleted file mode 100644 index 0d02171a3e..0000000000 --- a/src/lib/libssl/src/crypto/rc4/rc4_utl.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* $OpenBSD: rc4_utl.c,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | */ | ||
51 | |||
52 | #include <openssl/opensslv.h> | ||
53 | #include <openssl/crypto.h> | ||
54 | #include <openssl/rc4.h> | ||
55 | |||
56 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | ||
57 | { | ||
58 | private_RC4_set_key(key, len, data); | ||
59 | } | ||