Adding initialization.
- PINs are never stored, neither in flash nor in RAM. - PINs are stored in flash in doubled salted way. - PINs are stored in RAM in single salted way. - SOPIN in RAM (single salted) is used to encrypt/decrypt DKEK. - PINs in RAM (single salted) are used to encrypt/decrypt private keys related with user/so pins. - DKEK is only used to export/import data. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
7
sc_hsm.h
7
sc_hsm.h
@@ -44,4 +44,11 @@ extern const uint8_t sc_hsm_aid[];
|
||||
extern int pin_reset_retries(const file_t *pin);
|
||||
extern int pin_wrong_retry(const file_t *pin);
|
||||
|
||||
extern void hash(const uint8_t *input, size_t len, uint8_t output[32]);
|
||||
extern void double_hash_pin(const uint8_t *pin, size_t len, uint8_t output[32]);
|
||||
|
||||
extern uint8_t session_pin[32], session_sopin[32];
|
||||
|
||||
#define IV_SIZE 16
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user