Skip to content

Commit

Permalink
add SM2_ID_DEFAULT
Browse files Browse the repository at this point in the history
  • Loading branch information
dangfan committed Dec 25, 2023
1 parent cc51cc7 commit 1a716f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#define CANOKEY_CRYPTO_ECC_H

#include <algo.h>
#include <sha.h>
#include <stddef.h>
#include <stdint.h>

Expand All @@ -15,6 +14,8 @@ typedef struct {
uint8_t pub[MAX_EC_PUBLIC_KEY];
} ecc_key_t;

extern const uint8_t SM2_ID_DEFAULT[];

void swap_big_number_endian(uint8_t buf[32]);

/**
Expand Down
3 changes: 3 additions & 0 deletions src/ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <sm3.h>
#include <string.h>

const uint8_t SM2_ID_DEFAULT[] = {0x10, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x31, 0x32, 0x33, 0x34, 0x35,
0x36, 0x37, 0x38};

#ifdef USE_MBEDCRYPTO
#include <mbedtls/bn_mul.h>
#include <mbedtls/ecdsa.h>
Expand Down

0 comments on commit 1a716f3

Please sign in to comment.