Nebula
Nebula
|
函数 | |
rc5UserKey * | RC5_Key_Create () |
Allocate and initialize an RC5 user key. 更多... | |
void | RC5_Key_Destroy (rc5UserKey *pKey) |
Zero and free an RC5 user key. 更多... | |
int | RC5_Key_Set (rc5UserKey *pKey, int keyLength, unsigned char *keyBytes) |
Set the value of an RC5 user key. 更多... | |
void | RC5_Key_Expand (int b, unsigned char *K, int R, RC5_WORD *S) |
Expand an RC5 user key. 更多... | |
void | RC5_Block_Encrypt (RC5_WORD *S, int R, unsigned char *in, unsigned char *out) |
encryption of a single input block 更多... | |
void | RC5_Block_Decrypt (RC5_WORD *S, int R, unsigned char *in, unsigned char *out) |
rc5CBCAlg * | RC5_CBC_Create (int Pad, int R, int Version, int bb, unsigned char *I) |
Allocate and initialize the RC5 CBC algorithm object. 更多... | |
void | RC5_CBC_Destroy (rc5CBCAlg *pAlg) |
Zero and free an RC5 algorithm object. 更多... | |
int | RC5_CBC_SetIV (rc5CBCAlg *pAlg, unsigned char *I) |
Setup a new initialization vector for a CBC operation and reset the CBC object. 更多... | |
int | RC5_CBC_Encrypt_Init (rc5CBCAlg *pAlg, rc5UserKey *pKey) |
Binding a key to a cipher object. 更多... | |
int | RC5_CBC_Encrypt_Update (rc5CBCAlg *pAlg, int N, unsigned char *P, int *pCipherLen, int maxCipherLen, unsigned char *C) |
Encrypt a buffer of plaintext. 更多... | |
int | RC5_CBC_Encrypt_Final (rc5CBCAlg *pAlg, int *pCipherLen, int maxCipherLen, unsigned char *C) |
Produce the final block of ciphertext including any padding, and then reset the algorithm object. 更多... | |
int | RC5_CBC_Decrypt_Init (rc5CBCAlg *pAlg, rc5UserKey *pKey) |
int | RC5_CBC_Decrypt_Update (rc5CBCAlg *pAlg, int N, unsigned char *C, int *plainLen, unsigned char *P) |
void RC5_Block_Decrypt | ( | RC5_WORD * | S, |
int | R, | ||
unsigned char * | in, | ||
unsigned char * | out | ||
) |
void RC5_Block_Encrypt | ( | RC5_WORD * | S, |
int | R, | ||
unsigned char * | in, | ||
unsigned char * | out | ||
) |
encryption of a single input block
S | |
R | |
in | |
out |
rc5CBCAlg* RC5_CBC_Create | ( | int | Pad, |
int | R, | ||
int | Version, | ||
int | bb, | ||
unsigned char * | I | ||
) |
Allocate and initialize the RC5 CBC algorithm object.
Pad | 1 = RC5-CBC-Pad, 0 = RC5-CBC. |
R | Number of rounds. |
Version | RC5 version number. |
bb | Bytes per RC5 block == IV len. |
I | CBC IV, bb bytes long. |
int RC5_CBC_Decrypt_Init | ( | rc5CBCAlg * | pAlg, |
rc5UserKey * | pKey | ||
) |
int RC5_CBC_Decrypt_Update | ( | rc5CBCAlg * | pAlg, |
int | N, | ||
unsigned char * | C, | ||
int * | plainLen, | ||
unsigned char * | P | ||
) |
void RC5_CBC_Destroy | ( | rc5CBCAlg * | pAlg | ) |
Zero and free an RC5 algorithm object.
pAlg | RC5 CBC algorithm object |
int RC5_CBC_Encrypt_Final | ( | rc5CBCAlg * | pAlg, |
int * | pCipherLen, | ||
int | maxCipherLen, | ||
unsigned char * | C | ||
) |
Produce the final block of ciphertext including any padding, and then reset the algorithm object.
pAlg | Cipher algorithm object. |
pCipherLen | Gets byte len of C. |
maxCipherLen | Len of C buffer. |
C | Ciphertext buffer. |
int RC5_CBC_Encrypt_Init | ( | rc5CBCAlg * | pAlg, |
rc5UserKey * | pKey | ||
) |
Binding a key to a cipher object.
pAlg | RC5 CBC algorithm object |
pKey | user key |
int RC5_CBC_Encrypt_Update | ( | rc5CBCAlg * | pAlg, |
int | N, | ||
unsigned char * | P, | ||
int * | pCipherLen, | ||
int | maxCipherLen, | ||
unsigned char * | C | ||
) |
Encrypt a buffer of plaintext.
pAlg | Cipher algorithm object. |
N | Byte length of P. |
P | Plaintext buffer. |
pCipherLen | Gets byte len of C. |
maxCipherLen | Size of C. |
C | Ciphertext buffer. |
int RC5_CBC_SetIV | ( | rc5CBCAlg * | pAlg, |
unsigned char * | I | ||
) |
Setup a new initialization vector for a CBC operation and reset the CBC object.
pAlg | RC5 CBC algorithm object |
I | CBC Initialization vector, BB bytes. |
rc5UserKey* RC5_Key_Create | ( | ) |
Allocate and initialize an RC5 user key.
void RC5_Key_Destroy | ( | rc5UserKey * | pKey | ) |
Zero and free an RC5 user key.
pKey | user key |
void RC5_Key_Expand | ( | int | b, |
unsigned char * | K, | ||
int | R, | ||
RC5_WORD * | S | ||
) |
Expand an RC5 user key.
b | Byte length of secret key |
K | Secret key |
R | Number of rounds |
S | Expanded key buffer, 2*(R+1) words |
int RC5_Key_Set | ( | rc5UserKey * | pKey, |
int | keyLength, | ||
unsigned char * | keyBytes | ||
) |
Set the value of an RC5 user key.
pKey | user key |
keyLength | user key length |
keyBytes | user key bytes |