Go to the source code of this file.
Data Structures | |
struct | aes_key_st |
Defines | |
#define | GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) |
#define | PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } |
#define | MAXKC (256/32) |
#define | MAXKB (256/8) |
#define | MAXNR 14 |
#define | AES_BLOCK_SIZE 16 |
#define | AES_MAXNR 14 |
#define | KEYSIZE 16 |
#define | HEX_KEYSIZE 32 |
#define | IVSIZE 8 |
#define | HEX_IVSIZE 16 |
Typedefs | |
typedef unsigned int | u32 |
typedef unsigned short | u16 |
typedef unsigned char | u8 |
typedef aes_key_st | AES_KEY |
Functions | |
size_t | lock_memory (char *addr, size_t size) |
size_t | unlock_memory (char *addr, size_t size) |
void | ivec_inc (unsigned char *counter) |
void | ivec_dec (unsigned char *counter) |
void | securestorage_AES_ctr (const unsigned char *in, unsigned char *out, const unsigned long length, const AES_KEY *key, unsigned char ivec[16], unsigned char ecount_buf[16], unsigned int *num) |
Encrypt input string using AES_ctr algorithm. | |
int | AES_set_encrypt_key (const unsigned char *userKey, const int bits, AES_KEY *key) |
int | AES_set_decrypt_key (const unsigned char *userKey, const int bits, AES_KEY *key) |
void | AES_encrypt (const unsigned char *in, unsigned char *out, const AES_KEY *key) |
void | AES_decrypt (const unsigned char *in, unsigned char *out, const AES_KEY *key) |
int | ss_rand (int size, unsigned char *out) |
Generate random data function. | |
int | ss_generate_surl (char **dest_surl, char *dest_file, char *vo, char *guid) |
Generate SURL. | |
int | ss_get_lfchome (const char *input_lfn, char **lfn_new) |
Get LFC Home. | |
int | ss_get_surl (char *lfn, char **surl, char *vo, char *se, int insecure) |
Get SURL. | |
int | ss_check_lfn (char *lfn, char *vo) |
Check LFN existence. | |
const char * | securestorage_error (int errnum) |
Return descriptive string of error. |
Definition in file ss-util.h.
|
Definition at line 90 of file ss-util.h. Referenced by lcg_scp(), lcg_scr(), securestorage_AES_ctr(), securestorage_lseek(), and securestorage_open_extended(). |
|
|
|
Definition at line 71 of file ss-util.h. Referenced by AES_decrypt(), AES_encrypt(), AES_set_encrypt_key(), ivec_dec(), and ivec_inc(). |
|
Definition at line 95 of file ss-util.h. Referenced by lcg_scp(), lcg_scr(), securestorage_lseek(), and securestorage_open_extended(). |
|
Definition at line 93 of file ss-util.h. Referenced by lcg_scp(), lcg_scr(), and securestorage_open_extended(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 72 of file ss-util.h. Referenced by AES_decrypt(), AES_encrypt(), ivec_dec(), and ivec_inc(). |
|
Definition at line 106 of file ss-util.h. Referenced by AES_decrypt(), AES_encrypt(), AES_set_decrypt_key(), AES_set_encrypt_key(), lcg_scp(), lcg_scr(), and securestorage_AES_ctr(). |
|
|
|
Definition at line 78 of file ss-util.h. Referenced by AES_decrypt(), AES_encrypt(), AES_set_decrypt_key(), and AES_set_encrypt_key(). |
|
|
|
Decrypt a single block. in and out can overlap AES_ctr encryption doesn't use this function!
Definition at line 1006 of file aes_core.c. References AES_KEY, GETU32, PUTU32, aes_key_st::rd_key, aes_key_st::rounds, and u32. |
|
Encrypt a single block. in and out can overlap.
Definition at line 815 of file aes_core.c. References AES_KEY, GETU32, PUTU32, aes_key_st::rd_key, aes_key_st::rounds, and u32. Referenced by securestorage_AES_ctr(), and securestorage_lseek(). |
|
Expand the cipher key into the decryption key schedule. Definition at line 762 of file aes_core.c. References AES_KEY, AES_set_encrypt_key(), aes_key_st::rd_key, aes_key_st::rounds, and u32. |
|
Expand the cipher key into the encryption key schedule. Definition at line 661 of file aes_core.c. References AES_KEY, GETU32, aes_key_st::rd_key, aes_key_st::rounds, and u32. Referenced by AES_set_decrypt_key(), lcg_scp(), lcg_scr(), and securestorage_open_extended(). |
|
decrement counter (128-bit int) by 1.
Definition at line 136 of file ss-util.c. References GETU32, and PUTU32. Referenced by securestorage_lseek(). |
|
increment counter (128-bit int) by 1.
Definition at line 97 of file ss-util.c. References GETU32, and PUTU32. Referenced by securestorage_AES_ctr(), and securestorage_lseek(). |
|
Lock memory.
|
|
Encrypt input string using AES_ctr algorithm. The input encrypted as though 128bit counter mode is being used. The extra state information to record how much of the 128bit block we have used is contained in *num, and the encrypted counter is kept in ecount_buf. Both *num and ecount_buf must be initialised with zeros before the first call to securestorage_AES_ctr(). This algorithm assumes that the counter is in the x lower bits of the IV (ivec), and that the application has full control over overflow and the rest of the IV. This implementation takes NO responsability for checking that the counter doesn't overflow into the rest of the IV when incremented.
Definition at line 193 of file ss-util.c. References AES_BLOCK_SIZE, AES_encrypt(), AES_KEY, and ivec_inc(). Referenced by lcg_scp(), lcg_scr(), securestorage_read(), and securestorage_write(). |
|
Return descriptive string of error. for errnum provided
Definition at line 547 of file ss-util.c. References ss_errlist. |
|
Check LFN existence. This function check if provided lfn exist in LFC Catalog
Definition at line 504 of file ss-util.c. References errno, and insecure. Referenced by lcg_scr(), lcg_sdel(), securestorage_del_extended(), and securestorage_open_extended(). |
|
Generate SURL. This function generate a valid SURL ( in srm:// format ).
Definition at line 293 of file ss-util.c. References errno. Referenced by lcg_scr(), and securestorage_open_extended(). |
|
Get LFC Home. This function add LFC_HOME To your current LFN.
Definition at line 363 of file ss-util.c. References LCG_MAXPATHLEN. Referenced by lcg_scp(), lcg_scr(), lcg_sdel(), securestorage_del_extended(), securestorage_mkdir(), securestorage_open_extended(), securestorage_opendir(), securestorage_rmdir(), and securestorage_statg(). |
|
Get SURL. This function get the SURL for the input LFN given.
Definition at line 438 of file ss-util.c. References errno, insecure, and SS_ENOENT. Referenced by lcg_scp(), and securestorage_open_extended(). |
|
Generate random data function. This function generate random data for the specified size, for using it on encryption process.
Definition at line 252 of file ss-util.c. References errno. Referenced by lcg_scr(), and securestorage_open_extended(). |
|
Unlock memory.
|