From d0dc786f747093a6aaa3e4b3b5278a036774080c Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 6 Nov 2023 13:32:28 +0100 Subject: [PATCH] Rename project to Pico Keys SDK to avoid confusions with Pico Fido and Pico OpenPGP. Signed-off-by: Pol Henarejos --- CMakeLists.txt | 20 ++++++++++---------- src/apdu.c | 4 ++-- src/apdu.h | 2 +- src/asn1.c | 2 +- src/asn1.h | 2 +- src/crypto_utils.c | 12 ++++++------ src/crypto_utils.h | 28 ++++++++++++++-------------- src/eac.c | 8 ++++---- src/eac.h | 4 ++-- src/fs/file.c | 4 ++-- src/fs/file.h | 2 +- src/fs/flash.c | 4 ++-- src/fs/low_flash.c | 4 ++-- src/main.c | 4 ++-- src/rng/hwrng.c | 2 +- src/rng/hwrng.h | 2 +- src/rng/random.c | 2 +- src/rng/random.h | 2 +- src/usb/ccid/ccid.c | 4 ++-- src/usb/ccid/ccid.h | 2 +- src/usb/emulation/emulation.c | 4 ++-- src/usb/emulation/emulation.h | 2 +- src/usb/hid/ctap_hid.h | 2 +- src/usb/hid/hid.c | 14 +++++++------- src/usb/usb.c | 4 ++-- src/usb/usb.h | 2 +- src/usb/usb_descriptors.c | 6 +++--- src/usb/usb_descriptors.h | 2 +- 28 files changed, 75 insertions(+), 75 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a606a99..30b9be0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # - # This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + # This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). # Copyright (c) 2022 Pol Henarejos. # # This program is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ include(pico_sdk_import.cmake) endif() - project(pico_hsm C CXX ASM) + project(pico_keys C CXX ASM) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) @@ -41,32 +41,32 @@ set(USB_ITF_CCID 1) set(USB_ITF_HID 1) -include(pico_hsm_sdk_import.cmake) +include(pico_keys_sdk_import.cmake) -add_executable(pico_hsm_sdk_exe) +add_executable(pico_keys_sdk_exe) -target_compile_options(pico_hsm_sdk_exe PUBLIC +target_compile_options(pico_keys_sdk_exe PUBLIC -Wall -Werror ) if(ENABLE_EMULATION) -target_compile_options(pico_hsm_sdk_exe PUBLIC +target_compile_options(pico_keys_sdk_exe PUBLIC -fdata-sections -ffunction-sections ) if(APPLE) -target_link_options(pico_hsm_sdk_exe PUBLIC +target_link_options(pico_keys_sdk_exe PUBLIC -Wl,-dead_strip ) else() -target_link_options(pico_hsm_sdk_exe PUBLIC +target_link_options(pico_keys_sdk_exe PUBLIC -Wl,--gc-sections ) endif (APPLE) else() -pico_add_extra_outputs(pico_hsm_sdk_exe) +pico_add_extra_outputs(pico_keys_sdk_exe) -target_link_libraries(pico_hsm_sdk_exe PRIVATE pico_hsm_sdk pico_stdlib pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc tinyusb_device tinyusb_board) +target_link_libraries(pico_keys_sdk_exe PRIVATE pico_keys_sdk pico_stdlib pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc tinyusb_device tinyusb_board) endif() diff --git a/src/apdu.c b/src/apdu.c index c78d7c5..2c5a3b4 100644 --- a/src/apdu.c +++ b/src/apdu.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ */ #include "apdu.h" -#include "hsm.h" +#include "pico_keys.h" #include "usb.h" #include diff --git a/src/apdu.h b/src/apdu.h index 1154e94..62c8877 100644 --- a/src/apdu.h +++ b/src/apdu.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/asn1.c b/src/asn1.c index e540894..568276c 100644 --- a/src/asn1.c +++ b/src/asn1.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/asn1.h b/src/asn1.h index 6751582..064efb8 100644 --- a/src/asn1.h +++ b/src/asn1.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/crypto_utils.c b/src/crypto_utils.c index 281d954..99e6cfb 100644 --- a/src/crypto_utils.c +++ b/src/crypto_utils.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ #include "mbedtls/sha256.h" #include "mbedtls/aes.h" #include "crypto_utils.h" -#include "hsm.h" +#include "pico_keys.h" void double_hash_pin(const uint8_t *pin, size_t len, uint8_t output[32]) { uint8_t o1[32]; @@ -91,7 +91,7 @@ int aes_encrypt(const uint8_t *key, if (r != 0) { return CCID_EXEC_ERROR; } - if (mode == HSM_AES_MODE_CBC) { + if (mode == PICO_KEYS_AES_MODE_CBC) { return mbedtls_aes_crypt_cbc(&aes, MBEDTLS_AES_ENCRYPT, len, tmp_iv, data, data); } return mbedtls_aes_crypt_cfb128(&aes, MBEDTLS_AES_ENCRYPT, len, &iv_offset, tmp_iv, data, data); @@ -115,7 +115,7 @@ int aes_decrypt(const uint8_t *key, if (r != 0) { return CCID_EXEC_ERROR; } - if (mode == HSM_AES_MODE_CBC) { + if (mode == PICO_KEYS_AES_MODE_CBC) { return mbedtls_aes_crypt_cbc(&aes, MBEDTLS_AES_DECRYPT, len, tmp_iv, data, data); } r = mbedtls_aes_setkey_enc(&aes, key, key_size); //CFB requires set_enc instead set_dec @@ -123,10 +123,10 @@ int aes_decrypt(const uint8_t *key, } int aes_encrypt_cfb_256(const uint8_t *key, const uint8_t *iv, uint8_t *data, int len) { - return aes_encrypt(key, iv, 256, HSM_AES_MODE_CFB, data, len); + return aes_encrypt(key, iv, 256, PICO_KEYS_AES_MODE_CFB, data, len); } int aes_decrypt_cfb_256(const uint8_t *key, const uint8_t *iv, uint8_t *data, int len) { - return aes_decrypt(key, iv, 256, HSM_AES_MODE_CFB, data, len); + return aes_decrypt(key, iv, 256, PICO_KEYS_AES_MODE_CFB, data, len); } struct lv_data { diff --git a/src/crypto_utils.h b/src/crypto_utils.h index 0ef36ed..7b2ca35 100644 --- a/src/crypto_utils.h +++ b/src/crypto_utils.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -25,20 +25,20 @@ #include "mbedtls/ecp.h" #include "mbedtls/md.h" -#define HSM_KEY_RSA 0x000f // It is a mask -#define HSM_KEY_RSA_1K 0x0001 -#define HSM_KEY_RSA_2K 0x0002 -#define HSM_KEY_RSA_3K 0x0004 -#define HSM_KEY_RSA_4k 0x0008 -#define HSM_KEY_EC 0x0010 -#define HSM_KEY_AES 0x0f00 // It is a mask -#define HSM_KEY_AES_128 0x0100 -#define HSM_KEY_AES_192 0x0200 -#define HSM_KEY_AES_256 0x0400 -#define HSM_KEY_AES_512 0x0800 /* For AES XTS */ +#define PICO_KEYS_KEY_RSA 0x000f // It is a mask +#define PICO_KEYS_KEY_RSA_1K 0x0001 +#define PICO_KEYS_KEY_RSA_2K 0x0002 +#define PICO_KEYS_KEY_RSA_3K 0x0004 +#define PICO_KEYS_KEY_RSA_4k 0x0008 +#define PICO_KEYS_KEY_EC 0x0010 +#define PICO_KEYS_KEY_AES 0x0f00 // It is a mask +#define PICO_KEYS_KEY_AES_128 0x0100 +#define PICO_KEYS_KEY_AES_192 0x0200 +#define PICO_KEYS_KEY_AES_256 0x0400 +#define PICO_KEYS_KEY_AES_512 0x0800 /* For AES XTS */ -#define HSM_AES_MODE_CBC 1 -#define HSM_AES_MODE_CFB 2 +#define PICO_KEYS_AES_MODE_CBC 1 +#define PICO_KEYS_AES_MODE_CFB 2 #define IV_SIZE 16 diff --git a/src/eac.c b/src/eac.c index df2edff..0f5a826 100644 --- a/src/eac.c +++ b/src/eac.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -131,7 +131,7 @@ int sm_unwrap() { return CCID_WRONG_PADDING; } sm_update_iv(); - aes_decrypt(sm_kenc, sm_iv, 128, HSM_AES_MODE_CBC, body, body_size); + aes_decrypt(sm_kenc, sm_iv, 128, PICO_KEYS_AES_MODE_CBC, body, body_size); memmove(apdu.data, body, body_size); apdu.nc = sm_remove_padding(apdu.data, body_size); DEBUG_PAYLOAD(apdu.data, (int) apdu.nc); @@ -162,7 +162,7 @@ int sm_wrap() { res_APDU_size += (sm_blocksize - (res_APDU_size % sm_blocksize)); DEBUG_PAYLOAD(res_APDU, res_APDU_size); sm_update_iv(); - aes_encrypt(sm_kenc, sm_iv, 128, HSM_AES_MODE_CBC, res_APDU, res_APDU_size); + aes_encrypt(sm_kenc, sm_iv, 128, PICO_KEYS_AES_MODE_CBC, res_APDU, res_APDU_size); memmove(res_APDU + 1, res_APDU, res_APDU_size); res_APDU[0] = 0x1; res_APDU_size++; @@ -224,7 +224,7 @@ void sm_update_iv() { uint8_t tmp_iv[16], sc_counter[16]; memset(tmp_iv, 0, sizeof(tmp_iv)); //IV is always 0 for encryption of IV based on counter mbedtls_mpi_write_binary(&sm_mSSC, sc_counter, sizeof(sc_counter)); - aes_encrypt(sm_kenc, tmp_iv, 128, HSM_AES_MODE_CBC, sc_counter, sizeof(sc_counter)); + aes_encrypt(sm_kenc, tmp_iv, 128, PICO_KEYS_AES_MODE_CBC, sc_counter, sizeof(sc_counter)); memcpy(sm_iv, sc_counter, sizeof(sc_counter)); } diff --git a/src/eac.h b/src/eac.h index e4b9332..a80baaf 100644 --- a/src/eac.h +++ b/src/eac.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ #ifndef ENABLE_EMULATION #include "pico/stdlib.h" #endif -#include "hsm.h" +#include "pico_keys.h" typedef enum MSE_protocol { MSE_AES = 0, diff --git a/src/fs/file.c b/src/fs/file.c index 205e62b..7b01221 100644 --- a/src/fs/file.c +++ b/src/fs/file.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ */ #include "file.h" -#include "hsm.h" +#include "pico_keys.h" #include #include #include "asn1.h" diff --git a/src/fs/file.h b/src/fs/file.h index 1bed734..aa53c7b 100644 --- a/src/fs/file.h +++ b/src/fs/file.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/fs/flash.c b/src/fs/flash.c index a5b309b..c94a35e 100644 --- a/src/fs/flash.c +++ b/src/fs/flash.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ #define FLASH_SECTOR_SIZE 4096 #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -#include "hsm.h" +#include "pico_keys.h" #include "file.h" #include diff --git a/src/fs/low_flash.c b/src/fs/low_flash.c index 11012cf..a70a216 100644 --- a/src/fs/low_flash.c +++ b/src/fs/low_flash.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ int fd_map = 0; uint8_t *map = NULL; #endif -#include "hsm.h" +#include "pico_keys.h" #include #define TOTAL_FLASH_PAGES 4 diff --git a/src/main.c b/src/main.c index d06c1c0..e83e5db 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -44,7 +44,7 @@ #endif #include "random.h" -#include "hsm.h" +#include "pico_keys.h" #include "apdu.h" #ifdef CYW43_WL_GPIO_LED_PIN #include "pico/cyw43_arch.h" diff --git a/src/rng/hwrng.c b/src/rng/hwrng.c index 179aa3e..1f778c2 100644 --- a/src/rng/hwrng.c +++ b/src/rng/hwrng.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/rng/hwrng.h b/src/rng/hwrng.h index f217d55..857e4ec 100644 --- a/src/rng/hwrng.h +++ b/src/rng/hwrng.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/rng/random.c b/src/rng/random.c index 3335def..2df3c4e 100644 --- a/src/rng/random.c +++ b/src/rng/random.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/rng/random.h b/src/rng/random.h index f3fc4ce..bb4ad24 100644 --- a/src/rng/random.h +++ b/src/rng/random.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/usb/ccid/ccid.c b/src/usb/ccid/ccid.c index 2185df7..84cbb47 100644 --- a/src/usb/ccid/ccid.c +++ b/src/usb/ccid/ccid.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -35,7 +35,7 @@ #include "hardware/resets.h" #include "random.h" -#include "hsm.h" +#include "pico_keys.h" #include "hardware/rtc.h" #include "tusb.h" #include "ccid.h" diff --git a/src/usb/ccid/ccid.h b/src/usb/ccid/ccid.h index 392c99d..ddd3d5d 100644 --- a/src/usb/ccid/ccid.h +++ b/src/usb/ccid/ccid.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/usb/emulation/emulation.c b/src/usb/emulation/emulation.c index 5b28d02..8612219 100644 --- a/src/usb/emulation/emulation.c +++ b/src/usb/emulation/emulation.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ #include #include -#include "hsm.h" +#include "pico_keys.h" #include "apdu.h" #include "usb.h" #include "ccid/ccid.h" diff --git a/src/usb/emulation/emulation.h b/src/usb/emulation/emulation.h index 0994964..0dfdb91 100644 --- a/src/usb/emulation/emulation.h +++ b/src/usb/emulation/emulation.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/usb/hid/ctap_hid.h b/src/usb/hid/ctap_hid.h index 6c85b75..cd56b8b 100644 --- a/src/usb/hid/ctap_hid.h +++ b/src/usb/hid/ctap_hid.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/usb/hid/hid.c b/src/usb/hid/hid.c index 8757172..d0173e6 100644 --- a/src/usb/hid/hid.c +++ b/src/usb/hid/hid.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -20,8 +20,8 @@ #include "bsp/board.h" #endif #include "ctap_hid.h" -#include "hsm.h" -#include "hsm_version.h" +#include "pico_keys.h" +#include "pico_keys_version.h" #include "apdu.h" #include "usb.h" @@ -362,8 +362,8 @@ int driver_process_usb_packet_hid(uint16_t read) { memcpy(resp->nonce, req->nonce, sizeof(resp->nonce)); resp->cid = 0x01000000; resp->versionInterface = CTAPHID_IF_VERSION; - resp->versionMajor = get_version_major ? get_version_major() : HSM_SDK_VERSION_MAJOR; - resp->versionMinor = get_version_minor ? get_version_minor() : HSM_SDK_VERSION_MINOR; + resp->versionMajor = get_version_major ? get_version_major() : PICO_KEYS_SDK_VERSION_MAJOR; + resp->versionMinor = get_version_minor ? get_version_minor() : PICO_KEYS_SDK_VERSION_MINOR; resp->capFlags = CAPFLAG_WINK | CAPFLAG_CBOR; ctap_resp->cid = ctap_req->cid; @@ -446,8 +446,8 @@ int driver_process_usb_packet_hid(uint16_t read) { memset(ctap_resp, 0, 64); ctap_resp->cid = ctap_req->cid; ctap_resp->init.cmd = ctap_req->init.cmd; - ctap_resp->init.data[0] = HSM_SDK_VERSION_MAJOR; - ctap_resp->init.data[1] = HSM_SDK_VERSION_MINOR; + ctap_resp->init.data[0] = PICO_KEYS_SDK_VERSION_MAJOR; + ctap_resp->init.data[1] = PICO_KEYS_SDK_VERSION_MINOR; ctap_resp->init.bcntl = 4; hid_write(64); msg_packet.len = msg_packet.current_len = 0; diff --git a/src/usb/usb.c b/src/usb/usb.c index 0866853..ca8939a 100644 --- a/src/usb/usb.c +++ b/src/usb/usb.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ #include "tusb.h" #include "bsp/board.h" #endif -#include "hsm.h" +#include "pico_keys.h" #include "usb.h" #include "apdu.h" diff --git a/src/usb/usb.h b/src/usb/usb.h index d7efad7..4e6ebd0 100644 --- a/src/usb/usb.h +++ b/src/usb/usb.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM distribution (https://github.com/polhenarejos/pico-hsm). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify diff --git a/src/usb/usb_descriptors.c b/src/usb/usb_descriptors.c index 8112868..074c967 100644 --- a/src/usb/usb_descriptors.c +++ b/src/usb/usb_descriptors.c @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ #include "tusb.h" #include "usb_descriptors.h" #include "pico/unique_id.h" -#include "hsm_version.h" +#include "pico_keys_version.h" #include "usb.h" #ifndef USB_VID @@ -50,7 +50,7 @@ tusb_desc_device_t const desc_device = { .idVendor = (USB_VID), .idProduct = (USB_PID), - .bcdDevice = HSM_SDK_VERSION, + .bcdDevice = PICO_KEYS_SDK_VERSION, .iManufacturer = 1, .iProduct = 2, diff --git a/src/usb/usb_descriptors.h b/src/usb/usb_descriptors.h index beb4629..a3d4a1d 100644 --- a/src/usb/usb_descriptors.h +++ b/src/usb/usb_descriptors.h @@ -1,5 +1,5 @@ /* - * This file is part of the Pico HSM SDK distribution (https://github.com/polhenarejos/pico-hsm-sdk). + * This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk). * Copyright (c) 2022 Pol Henarejos. * * This program is free software: you can redistribute it and/or modify