From d7e0cd001c9f2eda41d26deec8dd5bee975b65e1 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 20 Aug 2019 13:03:11 +0100 Subject: [PATCH] TinyCrypt PK wrap: Add short documentation for extract_ecdsa_sig_int --- library/pk_wrap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 78cee744a..e567e636d 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -475,6 +475,11 @@ const mbedtls_pk_info_t mbedtls_eckeydh_info = { #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_USE_TINYCRYPT) + +/* + * An ASN.1 encoded signature is a sequence of two ASN.1 integers. Parse one of + * those integers and convert it to the fixed-length encoding. + */ static int extract_ecdsa_sig_int( unsigned char **from, const unsigned char *end, unsigned char *to, size_t to_len ) {