summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2022-11-11 12:18:25 +0000
committerjsing <>2022-11-11 12:18:25 +0000
commit8b13fe96b7b99abbc6d1c8c12b47b24b73929b7e (patch)
treefd3daddbc792ba537cdf2f4cbc019abc73e9a244 /src
parent57b70d7ba6ec6499567b2f281f47b636282a2ecd (diff)
downloadopenbsd-8b13fe96b7b99abbc6d1c8c12b47b24b73929b7e.tar.gz
openbsd-8b13fe96b7b99abbc6d1c8c12b47b24b73929b7e.tar.bz2
openbsd-8b13fe96b7b99abbc6d1c8c12b47b24b73929b7e.zip
Tidy includes, fix comment style and mop up some blank lines.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bf/bf_cbc.c4
-rw-r--r--src/lib/libcrypto/bf/bf_cfb64.c7
-rw-r--r--src/lib/libcrypto/bf/bf_ecb.c9
-rw-r--r--src/lib/libcrypto/bf/bf_enc.c6
-rw-r--r--src/lib/libcrypto/bf/bf_ofb64.c7
-rw-r--r--src/lib/libcrypto/bf/bf_skey.c6
6 files changed, 22 insertions, 17 deletions
diff --git a/src/lib/libcrypto/bf/bf_cbc.c b/src/lib/libcrypto/bf/bf_cbc.c
index 58e85b63c8..b13ea12961 100644
--- a/src/lib/libcrypto/bf/bf_cbc.c
+++ b/src/lib/libcrypto/bf/bf_cbc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_cbc.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_cbc.c,v 1.7 2022/11/11 12:18:25 jsing 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 *
@@ -57,6 +57,7 @@
57 */ 57 */
58 58
59#include <openssl/blowfish.h> 59#include <openssl/blowfish.h>
60
60#include "bf_locl.h" 61#include "bf_locl.h"
61 62
62void 63void
@@ -134,4 +135,3 @@ BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
134 tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; 135 tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
135 tin[0] = tin[1] = 0; 136 tin[0] = tin[1] = 0;
136} 137}
137
diff --git a/src/lib/libcrypto/bf/bf_cfb64.c b/src/lib/libcrypto/bf/bf_cfb64.c
index 4ef15b94c6..7db0aed1ea 100644
--- a/src/lib/libcrypto/bf/bf_cfb64.c
+++ b/src/lib/libcrypto/bf/bf_cfb64.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_cfb64.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_cfb64.c,v 1.7 2022/11/11 12:18:25 jsing 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 *
@@ -57,9 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/blowfish.h> 59#include <openssl/blowfish.h>
60
60#include "bf_locl.h" 61#include "bf_locl.h"
61 62
62/* The input and output encrypted as though 64bit cfb mode is being 63/*
64 * The input and output encrypted as though 64bit cfb mode is being
63 * used. The extra state information to record how much of the 65 * used. The extra state information to record how much of the
64 * 64bit block we have used is contained in *num; 66 * 64bit block we have used is contained in *num;
65 */ 67 */
@@ -120,4 +122,3 @@ BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length,
120 v0 = v1 = ti[0] = ti[1] = t=c = cc = 0; 122 v0 = v1 = ti[0] = ti[1] = t=c = cc = 0;
121 *num = n; 123 *num = n;
122} 124}
123
diff --git a/src/lib/libcrypto/bf/bf_ecb.c b/src/lib/libcrypto/bf/bf_ecb.c
index 3421b5f514..2430455c39 100644
--- a/src/lib/libcrypto/bf/bf_ecb.c
+++ b/src/lib/libcrypto/bf/bf_ecb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_ecb.c,v 1.7 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_ecb.c,v 1.8 2022/11/11 12:18:25 jsing 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 *
@@ -57,10 +57,12 @@
57 */ 57 */
58 58
59#include <openssl/blowfish.h> 59#include <openssl/blowfish.h>
60#include "bf_locl.h"
61#include <openssl/opensslv.h> 60#include <openssl/opensslv.h>
62 61
63/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' 62#include "bf_locl.h"
63
64/*
65 * Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
64 * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, 66 * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
65 * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) 67 * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
66 */ 68 */
@@ -97,4 +99,3 @@ BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
97 l2n(l, out); 99 l2n(l, out);
98 l = d[0] = d[1] = 0; 100 l = d[0] = d[1] = 0;
99} 101}
100
diff --git a/src/lib/libcrypto/bf/bf_enc.c b/src/lib/libcrypto/bf/bf_enc.c
index 464d36d345..780e703805 100644
--- a/src/lib/libcrypto/bf/bf_enc.c
+++ b/src/lib/libcrypto/bf/bf_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_enc.c,v 1.7 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_enc.c,v 1.8 2022/11/11 12:18:25 jsing 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 *
@@ -57,9 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/blowfish.h> 59#include <openssl/blowfish.h>
60
60#include "bf_locl.h" 61#include "bf_locl.h"
61 62
62/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' 63/*
64 * Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
63 * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, 65 * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
64 * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) 66 * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
65 */ 67 */
diff --git a/src/lib/libcrypto/bf/bf_ofb64.c b/src/lib/libcrypto/bf/bf_ofb64.c
index 83a76550f9..e7aefef09d 100644
--- a/src/lib/libcrypto/bf/bf_ofb64.c
+++ b/src/lib/libcrypto/bf/bf_ofb64.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_ofb64.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_ofb64.c,v 1.7 2022/11/11 12:18:25 jsing 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 *
@@ -57,9 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/blowfish.h> 59#include <openssl/blowfish.h>
60
60#include "bf_locl.h" 61#include "bf_locl.h"
61 62
62/* The input and output encrypted as though 64bit ofb mode is being 63/*
64 * The input and output encrypted as though 64bit ofb mode is being
63 * used. The extra state information to record how much of the 65 * used. The extra state information to record how much of the
64 * 64bit block we have used is contained in *num; 66 * 64bit block we have used is contained in *num;
65 */ 67 */
@@ -107,4 +109,3 @@ BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length,
107 t = v0 = v1 = ti[0] = ti[1] = 0; 109 t = v0 = v1 = ti[0] = ti[1] = 0;
108 *num = n; 110 *num = n;
109} 111}
110
diff --git a/src/lib/libcrypto/bf/bf_skey.c b/src/lib/libcrypto/bf/bf_skey.c
index 8c214f7428..03f494f63b 100644
--- a/src/lib/libcrypto/bf/bf_skey.c
+++ b/src/lib/libcrypto/bf/bf_skey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_skey.c,v 1.13 2022/11/11 12:08:29 jsing Exp $ */ 1/* $OpenBSD: bf_skey.c,v 1.14 2022/11/11 12:18:25 jsing 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 *
@@ -58,8 +58,10 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61
61#include <openssl/crypto.h> 62#include <openssl/crypto.h>
62#include <openssl/blowfish.h> 63#include <openssl/blowfish.h>
64
63#include "bf_locl.h" 65#include "bf_locl.h"
64#include "bf_pi.h" 66#include "bf_pi.h"
65 67
@@ -70,7 +72,6 @@ BF_set_key(BF_KEY *key, int len, const unsigned char *data)
70 BF_LONG *p, ri, in[2]; 72 BF_LONG *p, ri, in[2];
71 const unsigned char *d, *end; 73 const unsigned char *d, *end;
72 74
73
74 memcpy(key, &bf_init, sizeof(BF_KEY)); 75 memcpy(key, &bf_init, sizeof(BF_KEY));
75 p = key->P; 76 p = key->P;
76 77
@@ -117,4 +118,3 @@ BF_set_key(BF_KEY *key, int len, const unsigned char *data)
117 p[i + 1] = in[1]; 118 p[i + 1] = in[1];
118 } 119 }
119} 120}
120