Macros | Functions | Variables
blowfish.c File Reference
#include <openssl/blowfish.h>
#include <openssl/cipher.h>
#include <openssl/obj.h>
#include <assert.h>
#include <string.h>
#include "../../crypto/internal.h"
#include "../macros.h"
Include dependency graph for blowfish.c:

Go to the source code of this file.

Macros

#define BF_ENC(LL, R, S, P)
 

Functions

static int bf_cbc_cipher (EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
 
void BF_cbc_encrypt (const uint8_t *in, uint8_t *out, size_t length, const BF_KEY *schedule, uint8_t *ivec, int encrypt)
 
static void BF_cfb64_encrypt (const uint8_t *in, uint8_t *out, size_t length, const BF_KEY *schedule, uint8_t *ivec, int *num, int encrypt)
 
static int bf_cfb_cipher (EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
 
void BF_decrypt (uint32_t *data, const BF_KEY *key)
 
static int bf_ecb_cipher (EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
 
void BF_ecb_encrypt (const uint8_t *in, uint8_t *out, const BF_KEY *key, int encrypt)
 
void BF_encrypt (uint32_t *data, const BF_KEY *key)
 
static int bf_init_key (EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, int enc)
 
void BF_set_key (BF_KEY *key, size_t len, const uint8_t *data)
 
const EVP_CIPHEREVP_bf_cbc (void)
 
const EVP_CIPHEREVP_bf_cfb (void)
 
const EVP_CIPHEREVP_bf_ecb (void)
 

Variables

static const EVP_CIPHER bf_cbc
 
static const EVP_CIPHER bf_cfb
 
static const EVP_CIPHER bf_ecb
 
static const BF_KEY bf_init
 

Macro Definition Documentation

◆ BF_ENC

#define BF_ENC (   LL,
  R,
  S,
  P 
)
Value:
(LL ^= P, \
LL ^= \
(((S[((int)(R >> 24) & 0xff)] + S[0x0100 + ((int)(R >> 16) & 0xff)]) ^ \
S[0x0200 + ((int)(R >> 8) & 0xff)]) + \
S[0x0300 + ((int)(R)&0xff)]) & \
0xffffffffL)

Definition at line 68 of file blowfish.c.

Function Documentation

◆ bf_cbc_cipher()

static int bf_cbc_cipher ( EVP_CIPHER_CTX ctx,
uint8_t out,
const uint8_t in,
size_t  len 
)
static

Definition at line 579 of file blowfish.c.

◆ BF_cbc_encrypt()

void BF_cbc_encrypt ( const uint8_t in,
uint8_t out,
size_t  length,
const BF_KEY schedule,
uint8_t ivec,
int  encrypt 
)

Definition at line 155 of file blowfish.c.

◆ BF_cfb64_encrypt()

static void BF_cfb64_encrypt ( const uint8_t in,
uint8_t out,
size_t  length,
const BF_KEY schedule,
uint8_t ivec,
int num,
int  encrypt 
)
static

Definition at line 501 of file blowfish.c.

◆ bf_cfb_cipher()

static int bf_cfb_cipher ( EVP_CIPHER_CTX ctx,
uint8_t out,
const uint8_t in,
size_t  len 
)
static

Definition at line 586 of file blowfish.c.

◆ BF_decrypt()

void BF_decrypt ( uint32_t data,
const BF_KEY key 
)

Definition at line 108 of file blowfish.c.

◆ bf_ecb_cipher()

static int bf_ecb_cipher ( EVP_CIPHER_CTX ctx,
uint8_t out,
const uint8_t in,
size_t  len 
)
static

Definition at line 564 of file blowfish.c.

◆ BF_ecb_encrypt()

void BF_ecb_encrypt ( const uint8_t in,
uint8_t out,
const BF_KEY key,
int  encrypt 
)

Definition at line 140 of file blowfish.c.

◆ BF_encrypt()

void BF_encrypt ( uint32_t data,
const BF_KEY key 
)

Definition at line 76 of file blowfish.c.

◆ bf_init_key()

static int bf_init_key ( EVP_CIPHER_CTX ctx,
const uint8_t key,
const uint8_t iv,
int  enc 
)
static

Definition at line 557 of file blowfish.c.

◆ BF_set_key()

void BF_set_key ( BF_KEY key,
size_t  len,
const uint8_t data 
)

Definition at line 445 of file blowfish.c.

◆ EVP_bf_cbc()

const EVP_CIPHER* EVP_bf_cbc ( void  )

Definition at line 624 of file blowfish.c.

◆ EVP_bf_cfb()

const EVP_CIPHER* EVP_bf_cfb ( void  )

Definition at line 626 of file blowfish.c.

◆ EVP_bf_ecb()

const EVP_CIPHER* EVP_bf_ecb ( void  )

Definition at line 622 of file blowfish.c.

Variable Documentation

◆ bf_cbc

const EVP_CIPHER bf_cbc
static
Initial value:

Definition at line 604 of file blowfish.c.

◆ bf_cfb

const EVP_CIPHER bf_cfb
static
Initial value:

Definition at line 613 of file blowfish.c.

◆ bf_ecb

const EVP_CIPHER bf_ecb
static
Initial value:

Definition at line 595 of file blowfish.c.

◆ bf_init

const BF_KEY bf_init
static

Definition at line 231 of file blowfish.c.

bf_cfb_cipher
static int bf_cfb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
Definition: blowfish.c:586
EVP_CIPH_VARIABLE_LENGTH
#define EVP_CIPH_VARIABLE_LENGTH
Definition: cipher.h:357
S
#define S(s)
bf_init_key
static int bf_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, int enc)
Definition: blowfish.c:557
xds_interop_client.int
int
Definition: xds_interop_client.py:113
NID_bf_ecb
#define NID_bf_ecb
Definition: nid.h:509
BF_KEY
struct bf_key_st BF_KEY
bf_cbc_cipher
static int bf_cbc_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
Definition: blowfish.c:579
EVP_CIPH_CBC_MODE
#define EVP_CIPH_CBC_MODE
Definition: cipher.h:345
EVP_CIPH_CFB_MODE
#define EVP_CIPH_CFB_MODE
Definition: cipher.h:346
BF_BLOCK
#define BF_BLOCK
Definition: blowfish.h:71
NID_bf_cbc
#define NID_bf_cbc
Definition: nid.h:504
bf_ecb_cipher
static int bf_ecb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t len)
Definition: blowfish.c:564
grpc_core::P
std::function< Poll< absl::StatusOr< T > >()> P
Definition: try_join_test.cc:27
NID_bf_cfb64
#define NID_bf_cfb64
Definition: nid.h:513
LL
#define LL(x)
EVP_CIPH_ECB_MODE
#define EVP_CIPH_ECB_MODE
Definition: cipher.h:344


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04