11 #ifndef AZURE_IOT_JWS_H
12 #define AZURE_IOT_JWS_H
32 #define azureiotjwsRSA3072_SIZE 384
33 #define azureiotjwsSHA256_SIZE 32
34 #define azureiotjwsJWS_HEADER_SIZE 1400
35 #define azureiotjwsJWS_PAYLOAD_SIZE 60
36 #define azureiotjwsJWK_HEADER_SIZE 48
37 #define azureiotjwsJWK_PAYLOAD_SIZE 700
38 #define azureiotjwsSIGNATURE_SIZE 400
39 #define azureiotjwsSIGNING_KEY_E_SIZE 10
40 #define azureiotjwsSIGNING_KEY_N_SIZE azureiotjwsRSA3072_SIZE
41 #define azureiotjwsSHA_CALCULATION_SCRATCH_SIZE azureiotjwsRSA3072_SIZE + azureiotjwsSHA256_SIZE
49 #define azureiotjwsSCRATCH_BUFFER_SIZE \
50 ( azureiotjwsJWS_HEADER_SIZE + azureiotjwsJWK_HEADER_SIZE + azureiotjwsJWK_PAYLOAD_SIZE \
51 + azureiotjwsSIGNATURE_SIZE + azureiotjwsSIGNING_KEY_N_SIZE + azureiotjwsSIGNING_KEY_E_SIZE \
52 + azureiotjwsSHA_CALCULATION_SCRATCH_SIZE )
75 uint32_t ulManifestLength,
79 uint32_t ulADURootKeysLength,
80 uint8_t * pucScratchBuffer,
81 uint32_t ulScratchBufferLength );
AzureIoTResult_t AzureIoTJWS_ManifestAuthenticate(const uint8_t *pucManifest, uint32_t ulManifestLength, uint8_t *pucJWS, uint32_t ulJWSLength, AzureIoTJWS_RootKey_t *xADURootKeys, uint32_t ulADURootKeysLength, uint8_t *pucScratchBuffer, uint32_t ulScratchBufferLength)
Authenticate the manifest from ADU.
struct AzureIoTJWS_RootKey AzureIoTJWS_RootKey_t
Holds the values of the root key used to verify the JWS signature.
Azure IoT FreeRTOS middleware result values.
enum AzureIoTResult AzureIoTResult_t
The results used by the middleware.
Holds the values of the root key used to verify the JWS signature.
Definition: azure_iot_jws.h:22
uint32_t ulRootKeyIdLength
Definition: azure_iot_jws.h:24
uint32_t ulRootKeyExponentLength
Definition: azure_iot_jws.h:28
uint32_t ulRootKeyNLength
Definition: azure_iot_jws.h:26
uint8_t * pucRootKeyN
Definition: azure_iot_jws.h:25
uint8_t * pucRootKeyId
Definition: azure_iot_jws.h:23
uint8_t * pucRootKeyExponent
Definition: azure_iot_jws.h:27