15#ifndef CC3XX_INTERNAL_ASN1_UTIL_H
16#define CC3XX_INTERNAL_ASN1_UTIL_H
18#include <psa/crypto.h>
36#define CC3XX_TAG_ASN1_INTEGER 0x02
37#define CC3XX_TAG_ASN1_SEQUENCE 0x10
38#define CC3XX_TAG_ASN1_CONSTRUCTED 0x20
85 uint8_t *data,
size_t data_size);
int cc3xx_asn1_write_int(unsigned char **p, unsigned char *start, int val)
Write an int tag and value in ASN.1 format.
int cc3xx_asn1_write_tag(unsigned char **p, const unsigned char *start, unsigned char tag)
Write an ASN.1 tag in ASN.1 format.
psa_status_t cc3xx_asn1_get_tag(unsigned char **p, const unsigned char *end, size_t *len, int tag)
Get the tag and length of the element. Check for the requested tag. Updates the pointer to immediatel...
psa_status_t cc3xx_asn1_get_len(unsigned char **p, const unsigned char *end, size_t *len)
Get the length of an ASN.1 element. Updates the pointer to immediately behind the length.
int cc3xx_asn1_write_big_integer(unsigned char **p, const unsigned char *start, uint8_t *data, size_t data_size)
Write an int tag and value in ASN.1 format represented as a uint8_t array.
int cc3xx_asn1_write_len(unsigned char **p, const unsigned char *start, size_t len)
Write a length field in ASN.1 format.
psa_status_t cc3xx_asn1_get_int(unsigned char **p, const unsigned char *end, int *val)
Retrieve an integer ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.