123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef OPTIGA_BACKEND_UTILS_H__
- #define OPTIGA_BACKEND_UTILS_H__
- #include <stdint.h>
- #include <stdbool.h>
- #include <stddef.h>
- #include "sdk_config.h"
- #include "nordic_common.h"
- #include "sdk_errors.h"
- #define DER_TAG_INTEGER 0x02
- #define DER_INTEGER_MAX_LEN 0x7F
- #define DER_OVERHEAD ((2 + 1) * 2)
- ret_code_t asn1_to_ecdsa_rs(uint8_t const * p_asn1,
- size_t asn1_len,
- uint8_t * p_rs,
- size_t * p_rs_len);
- bool ecdsa_rs_to_asn1(uint8_t const * p_r,
- size_t r_len,
- uint8_t const * p_s,
- size_t s_len,
- uint8_t * p_asn_sig,
- size_t * p_asn_sig_len);
- #endif
|