diff options
author | tpashkin <tpashkin@yandex-team.ru> | 2022-02-10 16:46:42 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:42 +0300 |
commit | 656921707c02b816d730f31c1fdc1d615adbfe00 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/openssl/crypto/bf | |
parent | 5475379a04e37df30085bd1724f1c57e3f40996f (diff) | |
download | ydb-656921707c02b816d730f31c1fdc1d615adbfe00.tar.gz |
Restoring authorship annotation for <tpashkin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/openssl/crypto/bf')
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_cfb64.c | 2 | ||||
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_ecb.c | 2 | ||||
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_enc.c | 2 | ||||
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_local.h | 168 | ||||
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_ofb64.c | 2 | ||||
-rw-r--r-- | contrib/libs/openssl/crypto/bf/bf_skey.c | 2 |
6 files changed, 89 insertions, 89 deletions
diff --git a/contrib/libs/openssl/crypto/bf/bf_cfb64.c b/contrib/libs/openssl/crypto/bf/bf_cfb64.c index cec54d2da4..12332c540d 100644 --- a/contrib/libs/openssl/crypto/bf/bf_cfb64.c +++ b/contrib/libs/openssl/crypto/bf/bf_cfb64.c @@ -8,7 +8,7 @@ */ #include <openssl/blowfish.h> -#include "bf_local.h" +#include "bf_local.h" /* * The input and output encrypted as though 64bit cfb mode is being used. diff --git a/contrib/libs/openssl/crypto/bf/bf_ecb.c b/contrib/libs/openssl/crypto/bf/bf_ecb.c index 277263d7ff..38e784cc2d 100644 --- a/contrib/libs/openssl/crypto/bf/bf_ecb.c +++ b/contrib/libs/openssl/crypto/bf/bf_ecb.c @@ -8,7 +8,7 @@ */ #include <openssl/blowfish.h> -#include "bf_local.h" +#include "bf_local.h" #include <openssl/opensslv.h> /* diff --git a/contrib/libs/openssl/crypto/bf/bf_enc.c b/contrib/libs/openssl/crypto/bf/bf_enc.c index 11d0014f3a..423a4697a5 100644 --- a/contrib/libs/openssl/crypto/bf/bf_enc.c +++ b/contrib/libs/openssl/crypto/bf/bf_enc.c @@ -8,7 +8,7 @@ */ #include <openssl/blowfish.h> -#include "bf_local.h" +#include "bf_local.h" /* * Blowfish as implemented from 'Blowfish: Springer-Verlag paper' (From diff --git a/contrib/libs/openssl/crypto/bf/bf_local.h b/contrib/libs/openssl/crypto/bf/bf_local.h index 89a7bb2950..8c76976fa4 100644 --- a/contrib/libs/openssl/crypto/bf/bf_local.h +++ b/contrib/libs/openssl/crypto/bf/bf_local.h @@ -1,84 +1,84 @@ -/* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OSSL_CRYPTO_BF_LOCAL_H -# define OSSL_CRYPTO_BF_LOCAL_H -# include <openssl/opensslconf.h> - -/* NOTE - c is not incremented as per n2l */ -# define n2ln(c,l1,l2,n) { \ - c+=n; \ - l1=l2=0; \ - switch (n) { \ - case 8: l2 =((unsigned long)(*(--(c)))) ; \ - /* fall thru */ \ - case 7: l2|=((unsigned long)(*(--(c))))<< 8; \ - /* fall thru */ \ - case 6: l2|=((unsigned long)(*(--(c))))<<16; \ - /* fall thru */ \ - case 5: l2|=((unsigned long)(*(--(c))))<<24; \ - /* fall thru */ \ - case 4: l1 =((unsigned long)(*(--(c)))) ; \ - /* fall thru */ \ - case 3: l1|=((unsigned long)(*(--(c))))<< 8; \ - /* fall thru */ \ - case 2: l1|=((unsigned long)(*(--(c))))<<16; \ - /* fall thru */ \ - case 1: l1|=((unsigned long)(*(--(c))))<<24; \ - } \ - } - -/* NOTE - c is not incremented as per l2n */ -# define l2nn(l1,l2,c,n) { \ - c+=n; \ - switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \ - /* fall thru */ \ - case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ - /* fall thru */ \ - case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ - /* fall thru */ \ - case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ - /* fall thru */ \ - case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \ - /* fall thru */ \ - case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ - /* fall thru */ \ - case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ - /* fall thru */ \ - case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ - } \ - } - -# undef n2l -# define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \ - l|=((unsigned long)(*((c)++)))<<16L, \ - l|=((unsigned long)(*((c)++)))<< 8L, \ - l|=((unsigned long)(*((c)++)))) - -# undef l2n -# define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ - *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ - *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ - *((c)++)=(unsigned char)(((l) )&0xff)) - -/* - * This is actually a big endian algorithm, the most significant byte is used - * to lookup array 0 - */ - -# define BF_ENC(LL,R,S,P) ( \ - LL^=P, \ - LL^=((( S[ ((R>>24)&0xff)] + \ - S[0x0100+((R>>16)&0xff)])^ \ - S[0x0200+((R>> 8)&0xff)])+ \ - S[0x0300+((R )&0xff)])&0xffffffffU \ - ) - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef OSSL_CRYPTO_BF_LOCAL_H +# define OSSL_CRYPTO_BF_LOCAL_H +# include <openssl/opensslconf.h> + +/* NOTE - c is not incremented as per n2l */ +# define n2ln(c,l1,l2,n) { \ + c+=n; \ + l1=l2=0; \ + switch (n) { \ + case 8: l2 =((unsigned long)(*(--(c)))) ; \ + /* fall thru */ \ + case 7: l2|=((unsigned long)(*(--(c))))<< 8; \ + /* fall thru */ \ + case 6: l2|=((unsigned long)(*(--(c))))<<16; \ + /* fall thru */ \ + case 5: l2|=((unsigned long)(*(--(c))))<<24; \ + /* fall thru */ \ + case 4: l1 =((unsigned long)(*(--(c)))) ; \ + /* fall thru */ \ + case 3: l1|=((unsigned long)(*(--(c))))<< 8; \ + /* fall thru */ \ + case 2: l1|=((unsigned long)(*(--(c))))<<16; \ + /* fall thru */ \ + case 1: l1|=((unsigned long)(*(--(c))))<<24; \ + } \ + } + +/* NOTE - c is not incremented as per l2n */ +# define l2nn(l1,l2,c,n) { \ + c+=n; \ + switch (n) { \ + case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \ + /* fall thru */ \ + case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ + /* fall thru */ \ + case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ + /* fall thru */ \ + case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ + /* fall thru */ \ + case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \ + /* fall thru */ \ + case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ + /* fall thru */ \ + case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ + /* fall thru */ \ + case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ + } \ + } + +# undef n2l +# define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \ + l|=((unsigned long)(*((c)++)))<<16L, \ + l|=((unsigned long)(*((c)++)))<< 8L, \ + l|=((unsigned long)(*((c)++)))) + +# undef l2n +# define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ + *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ + *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ + *((c)++)=(unsigned char)(((l) )&0xff)) + +/* + * This is actually a big endian algorithm, the most significant byte is used + * to lookup array 0 + */ + +# define BF_ENC(LL,R,S,P) ( \ + LL^=P, \ + LL^=((( S[ ((R>>24)&0xff)] + \ + S[0x0100+((R>>16)&0xff)])^ \ + S[0x0200+((R>> 8)&0xff)])+ \ + S[0x0300+((R )&0xff)])&0xffffffffU \ + ) + +#endif diff --git a/contrib/libs/openssl/crypto/bf/bf_ofb64.c b/contrib/libs/openssl/crypto/bf/bf_ofb64.c index f7a36b0782..5d75401fcc 100644 --- a/contrib/libs/openssl/crypto/bf/bf_ofb64.c +++ b/contrib/libs/openssl/crypto/bf/bf_ofb64.c @@ -8,7 +8,7 @@ */ #include <openssl/blowfish.h> -#include "bf_local.h" +#include "bf_local.h" /* * The input and output encrypted as though 64bit ofb mode is being used. diff --git a/contrib/libs/openssl/crypto/bf/bf_skey.c b/contrib/libs/openssl/crypto/bf/bf_skey.c index 3aba09154d..ed29cf9153 100644 --- a/contrib/libs/openssl/crypto/bf/bf_skey.c +++ b/contrib/libs/openssl/crypto/bf/bf_skey.c @@ -10,7 +10,7 @@ #include <stdio.h> #include <string.h> #include <openssl/blowfish.h> -#include "bf_local.h" +#include "bf_local.h" #include "bf_pi.h" void BF_set_key(BF_KEY *key, int len, const unsigned char *data) |