![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "config.h"#include "config_unix.h"#include "config_win32.h"#include "crypto/crypt_des.h"#include "crypto/random.h"
Go to the source code of this file.
Macros | |
| #define | B00 0x80000000 |
| #define | B01 0x40000000 |
| #define | B02 0x20000000 |
| #define | B03 0x10000000 |
| #define | B04 0x08000000 |
| #define | B05 0x04000000 |
| #define | B06 0x02000000 |
| #define | B07 0x01000000 |
| #define | B08 0x00800000 |
| #define | B09 0x00400000 |
| #define | B10 0x00200000 |
| #define | B11 0x00100000 |
| #define | B12 0x00080000 |
| #define | B13 0x00040000 |
| #define | B14 0x00020000 |
| #define | B15 0x00010000 |
| #define | B16 0x00008000 |
| #define | B17 0x00004000 |
| #define | B18 0x00002000 |
| #define | B19 0x00001000 |
| #define | B20 0x00000800 |
| #define | B21 0x00000400 |
| #define | B22 0x00000200 |
| #define | B23 0x00000100 |
| #define | B24 0x00000080 |
| #define | B25 0x00000040 |
| #define | B26 0x00000020 |
| #define | B27 0x00000010 |
| #define | B28 0x00000008 |
| #define | B29 0x00000004 |
| #define | B30 0x00000002 |
| #define | B31 0x00000001 |
| #define | DES(t, ik) |
| #define | FINAL_PERMUTATION(regR, regL, t) |
| #define | FINAL_PERMUTATION_AUX(_i0, _i1, _o0, _o1) |
| #define | INITIAL_PERMUTATION(t, regL, regR) |
| #define | INITIAL_PERMUTATION_AUX(_i0, _i1, _o0, _o1) |
| #define | MAKE_LITTLE_ENDIAN(t, s) |
| #define | PC1(k, regC, regD) |
| #define | PC1_AUX(_i0, _i1, _o0, _o1) |
| #define | PC2(regC, regD, k) |
| #define | PC2_AUX(_i0, _i1, _o0, _o1) |
Typedefs | |
| typedef unsigned int | Word |
Functions | |
| int | qfDES (unsigned char *key, unsigned char *data, unsigned int size, const QFDES_what what, const QFDES_mode mode, unsigned char *initVec) |
| unsigned int | qfDES_checkParity (unsigned char *ptr, unsigned int size, const QFDES_parity parity) |
| int | qfDES_checkWeakKeys (unsigned char *key) |
| unsigned char * | qfDES_generate (const QFDES_generate what) |
| unsigned char | qfDES_setPad (unsigned char pad) |
| void | qfDES_setParity (unsigned char *ptr, unsigned int size, const QFDES_parity parity) |
| static Word | ROTATE_LEFT (Word x) |
| static Word | ROTATE_RIGHT (Word x) |
Variables | |
| unsigned char | G_padChar = (char)0 |
| static Word | s_p0 [64] |
| static Word | s_p1 [64] |
| static Word | s_p2 [64] |
| static Word | s_p3 [64] |
| static Word | s_p4 [64] |
| static Word | s_p5 [64] |
| static Word | s_p6 [64] |
| static Word | s_p7 [64] |
| static unsigned char | weakKeys [18][8] |
| #define B00 0x80000000 |
Definition at line 18 of file crypt_des.c.
| #define B01 0x40000000 |
Definition at line 19 of file crypt_des.c.
| #define B02 0x20000000 |
Definition at line 20 of file crypt_des.c.
| #define B03 0x10000000 |
Definition at line 21 of file crypt_des.c.
| #define B04 0x08000000 |
Definition at line 22 of file crypt_des.c.
| #define B05 0x04000000 |
Definition at line 23 of file crypt_des.c.
| #define B06 0x02000000 |
Definition at line 24 of file crypt_des.c.
| #define B07 0x01000000 |
Definition at line 25 of file crypt_des.c.
| #define B08 0x00800000 |
Definition at line 26 of file crypt_des.c.
| #define B09 0x00400000 |
Definition at line 27 of file crypt_des.c.
| #define B10 0x00200000 |
Definition at line 28 of file crypt_des.c.
| #define B11 0x00100000 |
Definition at line 29 of file crypt_des.c.
| #define B12 0x00080000 |
Definition at line 30 of file crypt_des.c.
| #define B13 0x00040000 |
Definition at line 31 of file crypt_des.c.
| #define B14 0x00020000 |
Definition at line 32 of file crypt_des.c.
| #define B15 0x00010000 |
Definition at line 33 of file crypt_des.c.
| #define B16 0x00008000 |
Definition at line 34 of file crypt_des.c.
| #define B17 0x00004000 |
Definition at line 35 of file crypt_des.c.
| #define B18 0x00002000 |
Definition at line 36 of file crypt_des.c.
| #define B19 0x00001000 |
Definition at line 37 of file crypt_des.c.
| #define B20 0x00000800 |
Definition at line 38 of file crypt_des.c.
| #define B21 0x00000400 |
Definition at line 39 of file crypt_des.c.
| #define B22 0x00000200 |
Definition at line 40 of file crypt_des.c.
| #define B23 0x00000100 |
Definition at line 41 of file crypt_des.c.
| #define B24 0x00000080 |
Definition at line 42 of file crypt_des.c.
| #define B25 0x00000040 |
Definition at line 43 of file crypt_des.c.
| #define B26 0x00000020 |
Definition at line 44 of file crypt_des.c.
| #define B27 0x00000010 |
Definition at line 45 of file crypt_des.c.
| #define B28 0x00000008 |
Definition at line 46 of file crypt_des.c.
| #define B29 0x00000004 |
Definition at line 47 of file crypt_des.c.
| #define B30 0x00000002 |
Definition at line 48 of file crypt_des.c.
| #define B31 0x00000001 |
Definition at line 49 of file crypt_des.c.
| #define DES | ( | t, | |
| ik ) |
Definition at line 502 of file crypt_des.c.
Referenced by qfDES().
| #define FINAL_PERMUTATION | ( | regR, | |
| regL, | |||
| t ) |
Definition at line 468 of file crypt_des.c.
| #define FINAL_PERMUTATION_AUX | ( | _i0, | |
| _i1, | |||
| _o0, | |||
| _o1 ) |
Definition at line 120 of file crypt_des.c.
| #define INITIAL_PERMUTATION | ( | t, | |
| regL, | |||
| regR ) |
Definition at line 465 of file crypt_des.c.
| #define INITIAL_PERMUTATION_AUX | ( | _i0, | |
| _i1, | |||
| _o0, | |||
| _o1 ) |
Definition at line 51 of file crypt_des.c.
| #define MAKE_LITTLE_ENDIAN | ( | t, | |
| s ) |
Definition at line 524 of file crypt_des.c.
Referenced by qfDES().
| #define PC1 | ( | k, | |
| regC, | |||
| regD ) |
Definition at line 471 of file crypt_des.c.
Referenced by qfDES().
| #define PC1_AUX | ( | _i0, | |
| _i1, | |||
| _o0, | |||
| _o1 ) |
Definition at line 190 of file crypt_des.c.
| #define PC2 | ( | regC, | |
| regD, | |||
| k ) |
Definition at line 474 of file crypt_des.c.
Referenced by qfDES().
| #define PC2_AUX | ( | _i0, | |
| _i1, | |||
| _o0, | |||
| _o1 ) |
Definition at line 252 of file crypt_des.c.
| typedef unsigned int Word |
Definition at line 16 of file crypt_des.c.
| int qfDES | ( | unsigned char * | key, |
| unsigned char * | data, | ||
| unsigned int | size, | ||
| const QFDES_what | what, | ||
| const QFDES_mode | mode, | ||
| unsigned char * | initVec ) |
Definition at line 558 of file crypt_des.c.
References __attribute__(), DES, key, MAKE_LITTLE_ENDIAN, mode, PC1, PC2, qfDES_cbc, qfDES_cfb, qfDES_ecb, qfDES_encrypt, qfDES_ofb, ROTATE_LEFT(), and ROTATE_RIGHT().

| unsigned int qfDES_checkParity | ( | unsigned char * | ptr, |
| unsigned int | size, | ||
| const QFDES_parity | parity ) |
Definition at line 856 of file crypt_des.c.
| int qfDES_checkWeakKeys | ( | unsigned char * | key | ) |
Definition at line 902 of file crypt_des.c.
Referenced by qfDES_generate().
| unsigned char * qfDES_generate | ( | const QFDES_generate | what | ) |
Definition at line 921 of file crypt_des.c.
References lbl_random(), lbl_srandom(), qfDES_checkWeakKeys(), qfDES_key, qfDES_odd, and qfDES_setParity().

| unsigned char qfDES_setPad | ( | unsigned char | pad | ) |
Definition at line 949 of file crypt_des.c.
References G_padChar.
| void qfDES_setParity | ( | unsigned char * | ptr, |
| unsigned int | size, | ||
| const QFDES_parity | parity ) |
Definition at line 842 of file crypt_des.c.
Referenced by qfDES_generate().
Definition at line 479 of file crypt_des.c.
Referenced by qfDES().
Definition at line 486 of file crypt_des.c.
Referenced by qfDES().
| unsigned char G_padChar = (char)0 |
Definition at line 477 of file crypt_des.c.
Referenced by qfDES_setPad().
|
static |
Definition at line 306 of file crypt_des.c.
|
static |
Definition at line 326 of file crypt_des.c.
|
static |
Definition at line 346 of file crypt_des.c.
|
static |
Definition at line 366 of file crypt_des.c.
|
static |
Definition at line 386 of file crypt_des.c.
|
static |
Definition at line 406 of file crypt_des.c.
|
static |
Definition at line 426 of file crypt_des.c.
|
static |
Definition at line 446 of file crypt_des.c.
|
static |
Definition at line 876 of file crypt_des.c.
Referenced by qfDES_checkWeakKeys().