NCBI C++ ToolKit
|
#include <config.h>
#include <tds_sysdep_public.h>
#include <freetds/bytes.h>
#include <freetds/utils/des.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | P32I_INDEX_ROW(n, i, a, b, c, d) n==a ? 0+i : n==b ? 1+i : n==c ? 2+i : n==d ? 3+i |
#define | P32I_INDEX(n) |
Functions | |
void | tds_des_set_odd_parity (des_cblock key) |
static void | permute_ip (const des_cblock inblock, const DES_KEY *key, des_cblock outblock) |
static void | permute_fp (const des_cblock inblock, const DES_KEY *key, des_cblock outblock) |
static void | perminit_ip (DES_KEY *key) |
static void | spinit (DES_KEY *key) |
static void | perminit_fp (DES_KEY *key) |
static uint32_t | f (const DES_KEY *key, register uint32_t r, register const unsigned char *subkey) |
static int | des_init (DES_KEY *key) |
int | tds_des_set_key (DES_KEY *dkey, const des_cblock user_key, size_t len) |
void | tds_des_encrypt (const DES_KEY *key, des_cblock block) |
int | tds_des_ecb_encrypt (const void *plaintext, size_t len, DES_KEY *akey, unsigned char *output) |
Variables | |
static const char | ip [] |
static const char | fp [] |
static const char | pc1 [] |
static const char | totrot [] |
static const char | pc2 [] |
static const char | si [8][64] |
static const char | pbox [32] |
static const int | bytebit [] |
static const int | nibblebit [] |
#define P32I_INDEX | ( | n | ) |
Definition at line 275 of file des.c.
References ncbi::grid::netcache::search::fields::key, perminit_fp(), perminit_ip(), and spinit().
Referenced by tds_des_set_key().
|
static |
Definition at line 502 of file des.c.
References int, ncbi::grid::netcache::search::fields::key, r(), ncbi::grid::netcache::search::fields::subkey, TDS_DBG_FUNC, tdsdump_log, and uint32_t.
Referenced by tds_des_encrypt().
Definition at line 577 of file des.c.
References bytebit, fp, i, ncbi::grid::netcache::search::fields::key, l(), and nibblebit.
Referenced by des_init().
Definition at line 555 of file des.c.
References bytebit, i, ip, ncbi::grid::netcache::search::fields::key, l(), and nibblebit.
Referenced by des_init().
|
static |
Definition at line 473 of file des.c.
References ncbi::grid::netcache::search::fields::key.
Referenced by tds_des_encrypt().
|
static |
Definition at line 444 of file des.c.
References ncbi::grid::netcache::search::fields::key.
Referenced by tds_des_encrypt().
Definition at line 600 of file des.c.
References i, ncbi::grid::netcache::search::fields::key, pbox, si, and val.
Referenced by des_init().
int tds_des_ecb_encrypt | ( | const void * | plaintext, |
size_t | len, | ||
DES_KEY * | akey, | ||
unsigned char * | output | ||
) |
Definition at line 627 of file des.c.
References len, output, and tds_des_encrypt().
void tds_des_encrypt | ( | const DES_KEY * | key, |
des_cblock | block | ||
) |
Definition at line 327 of file des.c.
References f(), ncbi::grid::netcache::search::fields::key, permute_fp(), permute_ip(), TDS_GET_A4BE, and TDS_PUT_A4BE.
int tds_des_set_key | ( | DES_KEY * | dkey, |
const des_cblock | user_key, | ||
size_t | len | ||
) |
Definition at line 288 of file des.c.
References bytebit, des_init(), i, des_key::kn, l(), pc1, pc2, and totrot.
void tds_des_set_odd_parity | ( | des_cblock | key | ) |
Definition at line 46 of file des.c.
References i, and ncbi::grid::netcache::search::fields::key.
Definition at line 263 of file des.c.
Referenced by perminit_fp(), perminit_ip(), and tds_des_set_key().
|
static |
Definition at line 87 of file des.c.
Referenced by perminit_fp().
|
static |
Definition at line 75 of file des.c.
Referenced by perminit_ip().
Definition at line 267 of file des.c.
Referenced by perminit_fp(), and perminit_ip().
|
static |
Definition at line 116 of file des.c.
Referenced by tds_des_set_key().
|
static |
Definition at line 134 of file des.c.
Referenced by tds_des_set_key().
|
static |
Definition at line 129 of file des.c.
Referenced by tds_des_set_key().