Encryption module using AES but using non standard key extension.
More...
#include <auth_priv.h>
|
| PrivAESW3DESKeyExt (const int aes_type_) |
|
int | extend_short_key (const unsigned char *password, const unsigned int password_len, const unsigned char *engine_id, const unsigned int engine_id_len, unsigned char *key, unsigned int *key_len, const unsigned int max_key_len, Auth *auth) |
| Extend a localized key that is too short. More...
|
|
const char * | get_id_string () const |
| Get the unique identifier string of the privacy protocol. More...
|
|
int | get_id () const |
| Get the uniqhe id of the privacy protocol. More...
|
|
| PrivAES (const int aes_type_) |
|
int | encrypt (const unsigned char *key, const unsigned int key_len, const unsigned char *buffer, const unsigned int buffer_len, unsigned char *out_buffer, unsigned int *out_buffer_len, unsigned char *privacy_params, unsigned int *privacy_params_len, const unsigned long engine_boots, const unsigned long engine_time) |
| Encrypt the buffer with the given key. More...
|
|
int | decrypt (const unsigned char *key, const unsigned int key_len, const unsigned char *buffer, const unsigned int buffer_len, unsigned char *out_buffer, unsigned int *out_buffer_len, const unsigned char *privacy_params, const unsigned int privacy_params_len, const unsigned long engine_boots, const unsigned long engine_time) |
| Decrypt the buffer with the given key. More...
|
|
int | get_priv_params_len () const |
| Get the maximum length that is needed for the msgPrivacyParameters field. More...
|
|
int | get_min_key_len () const |
| Get the minimum key length needed for encryption and decryption. More...
|
|
void | fix_key_len (unsigned int &key_len) const |
| Decrease a too long length to the right value. More...
|
|
virtual | ~Priv () |
|
virtual void | set_salt (pp_uint64 *new_salt) |
| Set the pointer to the salt that should be used. More...
|
|
Encryption module using AES but using non standard key extension.
- Note
- This class adds compatibility with some devices that illegally use the 3DES key extension algorithm with AES privacy.
- See also
- PrivAES
Definition at line 771 of file auth_priv.h.
◆ PrivAESW3DESKeyExt()
PrivAESW3DESKeyExt::PrivAESW3DESKeyExt |
( |
const int |
aes_type_ | ) |
|
◆ extend_short_key()
int PrivAESW3DESKeyExt::extend_short_key |
( |
const unsigned char * |
password, |
|
|
const unsigned int |
password_len, |
|
|
const unsigned char * |
engine_id, |
|
|
const unsigned int |
engine_id_len, |
|
|
unsigned char * |
key, |
|
|
unsigned int * |
key_len, |
|
|
const unsigned int |
max_key_len, |
|
|
Auth * |
auth |
|
) |
| |
|
virtual |
Extend a localized key that is too short.
Some privacy protocols require a key that is longer than the key generated by the pasword to key algorithm of the authentication protocol. This function extends a short key to the required length.
- Parameters
-
password | - the password |
password_len | - the length of the password |
engine_id | - pointer to snmpEngineID |
engine_id_len | - length of snmpEngineID |
key | - pointer to the short key that was generated using Auth::password_to_key() function |
key_len | - IN: length of the short key OUT: length of the extended key |
max_key_len | - Length of the key buffer |
auth | - Pointer of the authentication protocol that should be used |
- Returns
- SNMPv3_USM_OK on success
Reimplemented from PrivAES.
◆ get_id()
int PrivAESW3DESKeyExt::get_id |
( |
| ) |
const |
|
inlinevirtual |
Get the uniqhe id of the privacy protocol.
Reimplemented from PrivAES.
Definition at line 787 of file auth_priv.h.
◆ get_id_string()
const char* PrivAESW3DESKeyExt::get_id_string |
( |
| ) |
const |
|
virtual |
Get the unique identifier string of the privacy protocol.
Reimplemented from PrivAES.
◆ map_aes_type()
static int PrivAESW3DESKeyExt::map_aes_type |
( |
const int |
t | ) |
|
|
static |
◆ own_aes_type
int PrivAESW3DESKeyExt::own_aes_type |
|
private |
The documentation for this class was generated from the following file: