summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/des/des_enc.c
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2015-07-28 11:46:38 -0400
committerPeter Jones <pjones@redhat.com>2015-07-28 11:46:38 -0400
commit5ce38c90cf43ee79cd999716ea83a5a44eeb819e (patch)
tree2fb3d9dd667c772fae5f87fa61e1501cf12da0ce /Cryptlib/OpenSSL/crypto/des/des_enc.c
parent69ba24ff72921ecabbb47178de40dc5a79350040 (diff)
downloadefi-boot-shim-5ce38c90cf43ee79cd999716ea83a5a44eeb819e.tar.gz
efi-boot-shim-5ce38c90cf43ee79cd999716ea83a5a44eeb819e.zip
Update openssl to 1.0.2d
Also update Cryptlib to edk2 r17731 Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/des/des_enc.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/des/des_enc.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/Cryptlib/OpenSSL/crypto/des/des_enc.c b/Cryptlib/OpenSSL/crypto/des/des_enc.c
index 7be2a358..c0b062da 100644
--- a/Cryptlib/OpenSSL/crypto/des/des_enc.c
+++ b/Cryptlib/OpenSSL/crypto/des/des_enc.c
@@ -57,6 +57,7 @@
*/
#include "des_locl.h"
+#include "spr.h"
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
{
@@ -109,11 +110,9 @@ void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
D_ENCRYPT(l, r, 28); /* 15 */
D_ENCRYPT(r, l, 30); /* 16 */
#else
- for (i = 0; i < 32; i += 8) {
+ for (i = 0; i < 32; i += 4) {
D_ENCRYPT(l, r, i + 0); /* 1 */
D_ENCRYPT(r, l, i + 2); /* 2 */
- D_ENCRYPT(l, r, i + 4); /* 3 */
- D_ENCRYPT(r, l, i + 6); /* 4 */
}
#endif
} else {
@@ -135,11 +134,9 @@ void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
D_ENCRYPT(l, r, 2); /* 2 */
D_ENCRYPT(r, l, 0); /* 1 */
#else
- for (i = 30; i > 0; i -= 8) {
+ for (i = 30; i > 0; i -= 4) {
D_ENCRYPT(l, r, i - 0); /* 16 */
D_ENCRYPT(r, l, i - 2); /* 15 */
- D_ENCRYPT(l, r, i - 4); /* 14 */
- D_ENCRYPT(r, l, i - 6); /* 13 */
}
#endif
}
@@ -203,11 +200,9 @@ void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc)
D_ENCRYPT(l, r, 28); /* 15 */
D_ENCRYPT(r, l, 30); /* 16 */
#else
- for (i = 0; i < 32; i += 8) {
+ for (i = 0; i < 32; i += 4) {
D_ENCRYPT(l, r, i + 0); /* 1 */
D_ENCRYPT(r, l, i + 2); /* 2 */
- D_ENCRYPT(l, r, i + 4); /* 3 */
- D_ENCRYPT(r, l, i + 6); /* 4 */
}
#endif
} else {
@@ -229,11 +224,9 @@ void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc)
D_ENCRYPT(l, r, 2); /* 2 */
D_ENCRYPT(r, l, 0); /* 1 */
#else
- for (i = 30; i > 0; i -= 8) {
+ for (i = 30; i > 0; i -= 4) {
D_ENCRYPT(l, r, i - 0); /* 16 */
D_ENCRYPT(r, l, i - 2); /* 15 */
- D_ENCRYPT(l, r, i - 4); /* 14 */
- D_ENCRYPT(r, l, i - 6); /* 13 */
}
#endif
}
@@ -285,10 +278,8 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
#ifndef DES_DEFAULT_OPTIONS
-# if !defined(OPENSSL_FIPS_DES_ASM)
-
-# undef CBC_ENC_C__DONT_UPDATE_IV
-# include "ncbc_enc.c" /* DES_ncbc_encrypt */
+# undef CBC_ENC_C__DONT_UPDATE_IV
+# include "ncbc_enc.c" /* DES_ncbc_encrypt */
void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *ks1,
@@ -395,6 +386,4 @@ void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
tin[0] = tin[1] = 0;
}
-# endif
-
#endif /* DES_DEFAULT_OPTIONS */