Go to the documentation of this file.
42 #ifndef VS_SECMODULE_HELPERS_H_
43 #define VS_SECMODULE_HELPERS_H_
46 namespace VirgilIoTKit {
52 #define VS_PUBKEY_SECP192_LEN (49)
53 #define VS_PUBKEY_SECP224_LEN (57)
54 #define VS_PUBKEY_SECP256_LEN (65)
55 #define VS_PUBKEY_SECP384_LEN (97)
56 #define VS_PUBKEY_SECP521_LEN (133)
57 #define VS_PUBKEY_25519_LEN (32)
59 #define VS_SIGNATURE_SECP192_LEN (48)
60 #define VS_SIGNATURE_SECP224_LEN (56)
61 #define VS_SIGNATURE_SECP256_LEN (64)
62 #define VS_SIGNATURE_SECP384_LEN (96)
63 #define VS_SIGNATURE_SECP521_LEN (132)
64 #define VS_SIGNATURE_25519_LEN (64)
66 #define VS_HASH_SHA256_LEN (32)
67 #define VS_HASH_SHA384_LEN (48)
68 #define VS_HASH_SHA512_LEN (64)
70 #define VS_AES_256_KEY_SIZE (32)
71 #define VS_AES_256_KEY_BITLEN (VS_AES_256_KEY_SIZE * 8)
72 #define VS_AES_256_BLOCK_SIZE (16)
74 #define VS_AES_256_GCM_IV_SIZE (12)
75 #define VS_AES_256_GCM_AUTH_TAG_SIZE (16)
77 #define VS_AES_256_CBC_IV_SIZE (16)
145 uint16_t virgil_sign_sz,
146 uint8_t *raw_signature,
160 uint8_t *virgil_sign,
162 uint16_t *virgil_sign_sz);
169 #endif // VS_SECMODULE_HELPERS_H_
vs_status_e vs_secmodule_tiny_secp256_signature_to_virgil(const uint8_t raw_signature[VS_SIGNATURE_SECP256_LEN], uint8_t *virgil_sign, uint16_t buf_sz, uint16_t *virgil_sign_sz)
Convert a NIST-256 signature from raw format to Virgil format.
vs_status_e
Status code.
Definition: status_code.h:77
const char * vs_secmodule_keypair_type_descr(vs_secmodule_keypair_type_e type)
Get key pair type description.
#define VS_SIGNATURE_SECP256_LEN
Definition: secmodule-helpers.h:61
int vs_secmodule_get_signature_len(vs_secmodule_keypair_type_e keypair_type)
Get signature length.
vs_secmodule_hash_type_e
Hash types.
Definition: secmodule.h:94
vs_secmodule_keypair_type_e
Keypair types.
Definition: secmodule.h:76
const char * vs_secmodule_hash_type_descr(vs_secmodule_hash_type_e type)
Get hash type description.
int vs_secmodule_get_hash_len(vs_secmodule_hash_type_e hash_type)
Get hash length.
vs_status_e vs_secmodule_virgil_secp256_signature_to_tiny(const uint8_t *virgil_sign, uint16_t virgil_sign_sz, uint8_t *raw_signature, uint16_t buf_sz)
Convert a NIST256 signature from a Virgil format to raw.
int vs_secmodule_get_pubkey_len(vs_secmodule_keypair_type_e keypair_type)
Get public key length.
Security Module implementations signatures.