Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcefdb3c84 | ||
|
|
685ee2bbd5 | ||
|
|
6ae2a91e55 | ||
|
|
2373f21994 | ||
|
|
25bddb7230 | ||
|
|
418fa9c143 | ||
|
|
ce9ef47bb2 | ||
|
|
603963123b | ||
|
|
79ce35e944 | ||
|
|
5ddfa6382b | ||
|
|
9a99baafca | ||
|
|
819fb99646 | ||
|
|
35fb97c58f | ||
|
|
3fa5dbccd0 | ||
|
|
b674708955 | ||
|
|
86b508f2ae | ||
|
|
167b6d9770 | ||
|
|
d0c167345e | ||
|
|
ca6affaf5d | ||
|
|
7a77b31760 | ||
|
|
9f069a7e31 | ||
|
|
a0384f67ca | ||
|
|
32c6f60b49 | ||
|
|
0ab5526dac | ||
|
|
eb066472b1 | ||
|
|
a2d1c5cf22 | ||
|
|
436c0744d0 | ||
|
|
223a1e015b | ||
|
|
1491b9d36d | ||
|
|
74aa99afa6 | ||
|
|
c68fe30077 | ||
|
|
21284a9375 | ||
|
|
151f6d134e | ||
|
|
d95d19a85b | ||
|
|
4e2f3ce38d | ||
|
|
6ddb118bbf | ||
|
|
6c4cb4b12a | ||
|
|
456dd24fe5 | ||
|
|
e13a4fc121 | ||
|
|
49cee088b8 | ||
|
|
74197de147 | ||
|
|
193220e59e | ||
|
|
06745515eb | ||
|
|
30bb31a9c9 | ||
|
|
f0e7cdc18d | ||
|
|
283289fbc6 | ||
|
|
dc988e2a88 | ||
|
|
1594da7533 | ||
|
|
2c47816686 | ||
|
|
b0b30aff3a | ||
|
|
30e5f12b25 | ||
|
|
3c2bfbc119 | ||
|
|
77842f23e7 | ||
|
|
b67a902eb6 | ||
|
|
e2c8d2e0aa | ||
|
|
d87334bfbc | ||
|
|
6fef2dd1dc |
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
|||||||
[submodule "pico-ccid"]
|
[submodule "pico-hsm-sdk"]
|
||||||
path = pico-ccid
|
path = pico-hsm-sdk
|
||||||
url = https://github.com/polhenarejos/pico-ccid.git
|
url = ../pico-hsm-sdk
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
#
|
#
|
||||||
# This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
# This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
||||||
# Copyright (c) 2022 Pol Henarejos.
|
# Copyright (c) 2022 Pol Henarejos.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation, version 3.
|
# the Free Software Foundation, version 3.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful, but
|
# This program is distributed in the hope that it will be useful, but
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# General Public License for more details.
|
# General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -28,74 +28,25 @@ pico_sdk_init()
|
|||||||
|
|
||||||
add_executable(pico_openpgp)
|
add_executable(pico_openpgp)
|
||||||
|
|
||||||
if (NOT DEFINED USB_VID)
|
|
||||||
set(USB_VID 0xFEFF)
|
|
||||||
endif()
|
|
||||||
add_definitions(-DUSB_VID=${USB_VID})
|
|
||||||
if (NOT DEFINED USB_PID)
|
|
||||||
set(USB_PID 0xFCFD)
|
|
||||||
endif()
|
|
||||||
add_definitions(-DUSB_PID=${USB_PID})
|
|
||||||
|
|
||||||
target_sources(pico_openpgp PUBLIC
|
target_sources(pico_openpgp PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/ccid/ccid2040.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/openpgp.c
|
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/openpgp.c
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/files.c
|
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/files.c
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/usb/usb_descriptors.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/fs/file.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/fs/flash.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/fs/low_flash.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/rng/random.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/rng/neug.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/ccid/crypto_utils.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/ccid/eac.c
|
|
||||||
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/sha256.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/aes.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/sha512.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/rsa.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/bignum.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/platform_util.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/md.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/oid.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/rsa_alt_helpers.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/constant_time.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ecdsa.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ecp.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ecp_curves.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/asn1write.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/hmac_drbg.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/md5.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ripemd160.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/sha1.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ecdh.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/cmac.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/cipher.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/cipher_wrap.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/chachapoly.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/camellia.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/chacha20.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/aria.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/poly1305.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/gcm.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/ccm.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/des.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/nist_kw.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library/hkdf.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(pico_openpgp PUBLIC
|
target_include_directories(pico_openpgp PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/fs
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/openpgp
|
${CMAKE_CURRENT_LIST_DIR}/src/openpgp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/ccid
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/rng
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/src/usb
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/include
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/pico-ccid/mbedtls/library
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(HSM_DRIVER "ccid")
|
||||||
|
include(pico-hsm-sdk/pico_hsm_sdk_import.cmake)
|
||||||
|
|
||||||
|
target_compile_options(pico_openpgp PUBLIC
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
)
|
||||||
|
|
||||||
pico_add_extra_outputs(pico_openpgp)
|
pico_add_extra_outputs(pico_openpgp)
|
||||||
|
|
||||||
#target_compile_definitions(pico_openpgp PRIVATE MBEDTLS_ECDSA_DETERMINISTIC=1)
|
#target_compile_definitions(pico_openpgp PRIVATE MBEDTLS_ECDSA_DETERMINISTIC=1)
|
||||||
|
|
||||||
target_link_libraries(pico_openpgp PRIVATE pico_stdlib tinyusb_device tinyusb_board pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc)
|
target_link_libraries(pico_openpgp PRIVATE pico_hsm_sdk pico_stdlib tinyusb_device tinyusb_board pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc)
|
||||||
|
|||||||
137
README.md
Normal file
137
README.md
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
# Pico OpenPGP
|
||||||
|
This project aims at transforming your Raspberry Pico into a Smart Card with an OpenPGP applet integrated. The Pico works as a reader with an embedded OpenPGP card, like a USB card.
|
||||||
|
|
||||||
|
OpenPGP cards are used to manage PGP keys and do cryptographic operations, such as keypair generation, signing and asymmetric deciphering. Pico OpenPGP follows the [**OpenPGP 3.4.1** specifications](https://gnupg.org/ftp/specs/OpenPGP-smart-card-application-3.4.pdf "**OpenPGP 3.4.1** specifications"), available at [GnuPG](http://gnupg.org "GnuPG").
|
||||||
|
|
||||||
|
## Features
|
||||||
|
Pico OpenPGP has implemented the following features:
|
||||||
|
|
||||||
|
- Key generation and encrypted storage.
|
||||||
|
- RSA key generation from 1024 to 4096 bits.
|
||||||
|
- ECDSA key generation from 192 to 521 bits.
|
||||||
|
- ECC curves secp256r1, secp384r1, secp521r1, brainpoolP256r1, brainpoolP384r1, brainpoolP512r1, secp256k1.
|
||||||
|
- SHA1, SHA224, SHA256, SHA384, SHA512 digests.
|
||||||
|
- RSA-PKCS and raw RSA signature.
|
||||||
|
- ECDSA raw and hash signature.
|
||||||
|
- ECDH key derivation.
|
||||||
|
- PIN authorization.
|
||||||
|
- PKCS11 compliant interface.
|
||||||
|
- HRNG (hardware random number generator).
|
||||||
|
- Device Encryption Key (DEK).
|
||||||
|
- USB/CCID support with OpenSC, openssl, etc.
|
||||||
|
- Extended APDU support.
|
||||||
|
- Lifecycle card (termination and activation).
|
||||||
|
- Press-to-confirm button.
|
||||||
|
- User Interaction Flag for enabling/disabling press-to-confirm button.
|
||||||
|
- Key Derivation Function (KDF) for PIN.
|
||||||
|
- Manage Security Environment (MSE).
|
||||||
|
- DEK for internal safe storage.
|
||||||
|
- AES key generation.
|
||||||
|
- AES ciphering and deciphering.
|
||||||
|
- Cardholder certificates support.
|
||||||
|
|
||||||
|
All these features are compliant with the specification. Therefore, if you detect some behaviour that is not expected or it does not follow the rules of specs, please open an issue.
|
||||||
|
|
||||||
|
## AES support
|
||||||
|
There is no known software that supports AES with OpenPGP. Nevertheless, it can be used with customized PKCS11 modules or interfacing with raw APDU packets.
|
||||||
|
|
||||||
|
During asymmetric key generation for DEC key, Pico OpenPGP also generates a 32 bits symmetric key for AES operations.
|
||||||
|
|
||||||
|
OpenPGP card 3.4 specifications describe the procedure to perform ciphering (encryption and decryption) with AES via PSO:ENCIPHER and PSO:DECIPHER. Both commands are supported by Pico OpenPGP.
|
||||||
|
|
||||||
|
### About Gnuk
|
||||||
|
This project was inspired by [Gnuk](https://wiki.debian.org/GNUK "Gnuk"), a same project but focused on STM32 processor family. Despite the initial idea was to port Gnuk to the Raspberry Pico family, the underlaying architecture is widely different (although boh run on ARM). For instance, the Pico has two ARM cores, with an appropiate SDK able to leverage them. Also, Pico has an internal flash storage, which is farly larger compared to STM32 ROM storage. Finally, the Pico has a complete USB interface based on TinyUSB, which difficults to port Gnuk. These are only few examples of the difficulties of porting Gnuk to the Raspberry Pico.
|
||||||
|
|
||||||
|
As a consequence, Pico OpenPGP is designed from zero. Well, not strictly from zero, as it borrows some of the cryptographic operations implemented with MbedTLS library.
|
||||||
|
|
||||||
|
Whilst Gnuk is OpenPGP 2.0 with small set of enhancements, Pico OpenPGP aims at being OpenPGP 3.4 compliant, with new features (not present in Gnuk), such as Manage Security Environment (MSE) or UIF.
|
||||||
|
|
||||||
|
## Security considerations
|
||||||
|
All secret keys (asymmetric and symmetric) are stored encrypted in the flash memory of the Raspberry Pico. DEK is used as a 256 bit AES key to protect private and secret keys. Keys are never stored in RAM except for signature and decryption operations and only during the process. All keys (including DEK) are loaded and cleared every time to avoid potential security flaws.
|
||||||
|
|
||||||
|
At the same time, DEK is encrypted with doubled salted and hashed PIN. Also, the PIN is hashed in memory during the session. Hence, PIN is never stored in plain text neither in flash nor in memory. Note that PIN is conveyed from the host to the Pico in plain text if no secure channel is provided.
|
||||||
|
|
||||||
|
If the Pico is stolen the contents of private and secret keys cannot be read without the PIN, even if the flash memory is dumped.
|
||||||
|
|
||||||
|
## Download
|
||||||
|
Please, go to the [Release page](https://github.com/polhenarejos/pico-openpgp/releases "Release page")) and download the UF2 file for your board.
|
||||||
|
|
||||||
|
Note that UF2 files are shiped with a dummy VID/PID to avoid license issues (FEFF:FCFD). If you are planning to use it with OpenSC or similar, you should modify Info.plist of CCID driver to add these VID/PID or use the VID/PID patcher as follows: `./patch_vidpid.sh VID:PID input_openpgp_file.uf2 output_openpgp_file.uf2`
|
||||||
|
|
||||||
|
You can use whatever VID/PID (i.e., 234b:0000 from FISJ), but remember that you are not authorized to distribute the binary with a VID/PID that you do not own.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
Before building, ensure you have installed the toolchain for the Pico and the Pico SDK is properly located in your drive.
|
||||||
|
|
||||||
|
git clone https://github.com/polhenarejos/pico-openpgp
|
||||||
|
cd pico-openpgp
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
PICO_SDK_PATH=/path/to/pico-sdk cmake .. -DPICO_BOARD=board_type -DUSB_VID=0x1234 -DUSB_PID=0x5678
|
||||||
|
make
|
||||||
|
|
||||||
|
Note that PICO_BOARD, USB_VID and USB_PID are optional. If not provided, pico board and VID/PID FEFF:FCFD will be used.
|
||||||
|
|
||||||
|
After make ends, the binary file pico_openpgp.uf2 will be generated. Put your pico board into loading mode, by pushing BOOTSEL button while pluging on, and copy the UF2 to the new fresh usb mass storage Pico device. Once copied, the pico mass storage will be disconnected automatically and the pico board will reset with the new firmware. A blinking led will indicate the device is ready to work.
|
||||||
|
|
||||||
|
## Operation time
|
||||||
|
### Keypair generation
|
||||||
|
Generating EC keys is almost instant. RSA keypair generation takes some time, specially for 3072 and 4096 bits.
|
||||||
|
### Keypair generation
|
||||||
|
Generating EC keys is almost instant. RSA keypair generation takes some time, specially for `3072` and `4096` bits.
|
||||||
|
|
||||||
|
| RSA key length (bits) | Average time (seconds) |
|
||||||
|
| :---: | :---: |
|
||||||
|
| 1024 | 16 |
|
||||||
|
| 2048 | 124 |
|
||||||
|
| 3072 | 600 |
|
||||||
|
| 4096 | ~1000 |
|
||||||
|
|
||||||
|
### Signature and decrypt
|
||||||
|
| RSA key length (bits) | Average time (seconds) |
|
||||||
|
| :---: | :---: |
|
||||||
|
| 1024 | 1 |
|
||||||
|
| 2048 | 3 |
|
||||||
|
| 3072 | 7 |
|
||||||
|
| 4096 | 15 |
|
||||||
|
|
||||||
|
## Led blink
|
||||||
|
Pico OpenPGP uses the led to indicate the current status. Four states are available:
|
||||||
|
### Press to confirm
|
||||||
|
The Led is almost on all the time. It goes off for 100 miliseconds every second.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Idle mode
|
||||||
|
In idle mode, the Pico OpenPGP goes to sleep. It waits for a command and it is awaken by the driver. The Led is almost off all the time. It goes on for 500 milliseconds every second.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Active mode
|
||||||
|
In active mode, the Pico OpenPGP is awaken and ready to receive a command. It blinks four times in a second.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Processing
|
||||||
|
While processing, the Pico OpenPGP is busy and cannot receive additional commands until the current is processed. In this state, the Led blinks 20 times in a second.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Driver
|
||||||
|
|
||||||
|
Pico OpenPGP uses the `openpgp` driver provided by [OpenSC](https://github.com/OpenSC/OpenSC/ "OpenSC"). This driver utilizes the standardized PKCS#11 interface to communicate with the user and it can be used with many engines that accept PKCS#11 interface, such as OpenSSL, P11 library or pkcs11-tool.
|
||||||
|
|
||||||
|
It also accepts the use of GnuPG programs (`gpg` and `gpg2`) to manipulate the card. For instance, it can be used with the `gpg --edit-card --expert` interface to change the cryptographic keys, generate new keypairs or simply set the cardholder name.
|
||||||
|
|
||||||
|
Pico OpenPGP relies on PKCS#15 structure to store and manipulate the internal files (PINs, private keys, certificates, etc.) and directories. Therefore, it accepts the commands from `pkcs15-tool`. For instance, `pkcs15-tool -D` will list all elements stored in the Pico OpenPGP.
|
||||||
|
|
||||||
|
The way to communicate is exactly the same as with other cards, such as OpenPGP or similar.
|
||||||
|
|
||||||
|
### Important
|
||||||
|
OpenSC relies on PCSC driver, which reads a list (`Info.plist`) that contains a pair of VID/PID of supported readers. In order to be detectable, you must patch the UF2 binary (if you just downloaded from the [Release section](https://github.com/polhenarejos/pico-openpgp/releases "Release section")) or configure the project with the proper VID/PID with `USB_VID` and `USB_PID` parameters in `CMake` (see [Build section](#build "Build section")). Note that you cannot distribute the patched/compiled binary if you do not own the VID/PID or have an explicit authorization.
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
Pico OpenPGP uses the following libraries or portion of code:
|
||||||
|
- MbedTLS for cryptographic operations.
|
||||||
|
- TinyUSB for low level USB procedures.
|
||||||
|
|
||||||
53
build_pico_openpgp.sh
Executable file
53
build_pico_openpgp.sh
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION_MAJOR="1"
|
||||||
|
VERSION_MINOR="8"
|
||||||
|
|
||||||
|
rm -rf release/*
|
||||||
|
cd build_release
|
||||||
|
|
||||||
|
for board in adafruit_feather_rp2040 \
|
||||||
|
adafruit_itsybitsy_rp2040 \
|
||||||
|
adafruit_kb2040 \
|
||||||
|
adafruit_macropad_rp2040 \
|
||||||
|
adafruit_qtpy_rp2040 \
|
||||||
|
adafruit_trinkey_qt2040 \
|
||||||
|
arduino_nano_rp2040_connect \
|
||||||
|
datanoisetv_rp2040_dsp \
|
||||||
|
eetree_gamekit_rp2040 \
|
||||||
|
garatronic_pybstick26_rp2040 \
|
||||||
|
melopero_shake_rp2040 \
|
||||||
|
pico \
|
||||||
|
pico_w \
|
||||||
|
pimoroni_badger2040 \
|
||||||
|
pimoroni_interstate75 \
|
||||||
|
pimoroni_keybow2040 \
|
||||||
|
pimoroni_motor2040 \
|
||||||
|
pimoroni_pga2040 \
|
||||||
|
pimoroni_picolipo_4mb \
|
||||||
|
pimoroni_picolipo_16mb \
|
||||||
|
pimoroni_picosystem \
|
||||||
|
pimoroni_plasma2040 \
|
||||||
|
pimoroni_servo2040 \
|
||||||
|
pimoroni_tiny2040 \
|
||||||
|
pimoroni_tiny2040_2mb \
|
||||||
|
seeed_xiao_rp2040 \
|
||||||
|
solderparty_rp2040_stamp \
|
||||||
|
solderparty_rp2040_stamp_carrier \
|
||||||
|
solderparty_rp2040_stamp_round_carrier \
|
||||||
|
sparkfun_micromod \
|
||||||
|
sparkfun_promicro \
|
||||||
|
sparkfun_thingplus \
|
||||||
|
vgaboard \
|
||||||
|
waveshare_rp2040_lcd_0.96 \
|
||||||
|
waveshare_rp2040_plus_4mb \
|
||||||
|
waveshare_rp2040_plus_16mb \
|
||||||
|
waveshare_rp2040_zero \
|
||||||
|
wiznet_w5100s_evb_pico
|
||||||
|
do
|
||||||
|
rm -rf *
|
||||||
|
PICO_SDK_PATH=../../pico-sdk cmake .. -DPICO_BOARD=$board
|
||||||
|
make -kj20
|
||||||
|
mv pico_openpgp.uf2 ../release/pico_openpgp_$board-$VERSION_MAJOR.$VERSION_MINOR.uf2
|
||||||
|
|
||||||
|
done
|
||||||
94
patch_vidpid.sh
Executable file
94
patch_vidpid.sh
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
||||||
|
# Copyright (c) 2022 Pol Henarejos.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
VERSION_MAJOR="3" #Version of Pico CCID Core
|
||||||
|
VERSION_MINOR="4"
|
||||||
|
|
||||||
|
echo "----------------------------"
|
||||||
|
echo "VID/PID patcher for Pico OpenPGP"
|
||||||
|
echo "----------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ "$#" -le 0 ]; then
|
||||||
|
echo "Usage: $0 VID:PID [input_uf2_file] [output_uf2_file]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=':' read -r -a ARR <<< "$1"
|
||||||
|
|
||||||
|
if [ ${#ARR[@]} -ne 2 ]; then
|
||||||
|
echo "ERROR: Specify vendor and product ids as VID:PID (e.g., $0 CAFE:1234)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VID=${ARR[0]}
|
||||||
|
PID=${ARR[1]}
|
||||||
|
|
||||||
|
if [ ${#VID} -ne 4 ]; then
|
||||||
|
echo "ERROR: VID length must be 4 hexadecimal characters"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${#PID} -ne 4 ]; then
|
||||||
|
echo "ERROR: PID length must be 4 hexadecimal characters"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ $VID =~ ^[0-9A-Fa-f]{1,}$ ]] ; then
|
||||||
|
echo "ERROR: VID must contain hexadecimal characters"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ $PID =~ ^[0-9A-Fa-f]{1,}$ ]] ; then
|
||||||
|
echo "ERROR: PID must contain hexadecimal characters"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
UF2_FILE_IF="pico_openpgp.uf2"
|
||||||
|
UF2_FILE_OF="$UF2_FILE_IF"
|
||||||
|
|
||||||
|
if [ "$#" -ge 2 ]; then
|
||||||
|
UF2_FILE_IF="$2"
|
||||||
|
UF2_FILE_OF="$UF2_FILE_IF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$#" -ge 3 ]; then
|
||||||
|
UF2_FILE_OF="$3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo -n "Patching ${UF2_FILE_IF}... "
|
||||||
|
|
||||||
|
if [[ ! -f "$UF2_FILE_IF" ]]; then
|
||||||
|
echo "ERROR: UF2 file ${UF2_FILE_IF} does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$UF2_FILE_IF" != "$UF2_FILE_OF" ]; then
|
||||||
|
cp -R $UF2_FILE_IF $UF2_FILE_OF
|
||||||
|
fi
|
||||||
|
|
||||||
|
LITTLE_VID="\x${VID:2:2}\x${VID:0:2}"
|
||||||
|
LITTLE_PID="\x${PID:2:2}\x${PID:0:2}"
|
||||||
|
|
||||||
|
perl -pi -e "s/\xff\xfe\xfd\xfc\x$VERSION_MINOR\x$VERSION_MAJOR\x01\x02\x03\x01/$LITTLE_VID$LITTLE_PID\x$VERSION_MINOR\x$VERSION_MAJOR\x01\x02\x03\x01/" $UF2_FILE_OF
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
|
echo ""
|
||||||
|
echo "Patched file was saved in ${UF2_FILE_OF}"
|
||||||
Submodule pico-ccid deleted from cddc3b2dec
1
pico-hsm-sdk
Submodule
1
pico-hsm-sdk
Submodule
Submodule pico-hsm-sdk added at c4178fda4b
@@ -54,14 +54,14 @@ uint8_t historical_bytes[] = {
|
|||||||
|
|
||||||
uint8_t extended_capabilities[] = {
|
uint8_t extended_capabilities[] = {
|
||||||
10, 0,
|
10, 0,
|
||||||
0x74, /*
|
0x77, /*
|
||||||
* No Secure Messaging supported
|
* No Secure Messaging supported
|
||||||
* GET CHALLENGE supported
|
* GET CHALLENGE supported
|
||||||
* Key import supported
|
* Key import supported
|
||||||
* PW status byte can be put
|
* PW status byte can be put
|
||||||
* No private_use_DO
|
* No private_use_DO
|
||||||
* Algorithm attrs are changable
|
* Algorithm attrs are changable
|
||||||
* No DEC with AES
|
* ENC/DEC with AES
|
||||||
* KDF-DO available
|
* KDF-DO available
|
||||||
*/
|
*/
|
||||||
0, /* Secure Messaging Algorithm: N/A (TDES=0, AES=1) */
|
0, /* Secure Messaging Algorithm: N/A (TDES=0, AES=1) */
|
||||||
@@ -126,21 +126,24 @@ file_t file_entries[] = {
|
|||||||
/* 39 */ { .fid = EF_PW1, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 39 */ { .fid = EF_PW1, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 40 */ { .fid = EF_RC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 40 */ { .fid = EF_RC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 41 */ { .fid = EF_PW3, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 41 */ { .fid = EF_PW3, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 42 */ { .fid = EF_PW1_RETRIES, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 42 */ { .fid = EF_ALGO_PRIV1, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 43 */ { .fid = EF_RC_RETRIES, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 43 */ { .fid = EF_ALGO_PRIV2, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 44 */ { .fid = EF_PW3_RETRIES, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 44 */ { .fid = EF_ALGO_PRIV3, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 45 */ { .fid = EF_ALGO_PRIV1, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
/* 45 */ { .fid = EF_PK_SIG, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 46 */ { .fid = EF_ALGO_PRIV2, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
/* 46 */ { .fid = EF_PK_DEC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 47 */ { .fid = EF_ALGO_PRIV3, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
/* 47 */ { .fid = EF_PK_AUT, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
||||||
/* 48 */ { .fid = EF_PK_SIG, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 48 */ { .fid = EF_PB_SIG, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 49 */ { .fid = EF_PK_DEC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 49 */ { .fid = EF_PB_DEC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 50 */ { .fid = EF_PK_AUT, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 50 */ { .fid = EF_PB_AUT, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 51 */ { .fid = EF_PB_SIG, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 51 */ { .fid = EF_PW_PRIV, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
/* 52 */ { .fid = EF_PB_DEC, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 52 */ { .fid = EF_DEK, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_NONE },
|
||||||
/* 53 */ { .fid = EF_PB_AUT, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_WP },
|
/* 53 */ { .fid = EF_KDF, .parent = 0, .name = NULL, .type = FILE_TYPE_WORKING_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_R_WP },
|
||||||
|
/* 54 */ { .fid = EF_CH_1, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_NONE },
|
||||||
|
/* 55 */ { .fid = EF_CH_2, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_NONE },
|
||||||
|
/* 56 */ { .fid = EF_CH_3, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_NONE },
|
||||||
|
|
||||||
/* 54 */ { .fid = 0x0000, .parent = 0, .name = openpgp_aid, .type = FILE_TYPE_WORKING_EF, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_RO },
|
/* 57 */ { .fid = 0x0000, .parent = 0, .name = openpgp_aid, .type = FILE_TYPE_WORKING_EF, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = ACL_RO },
|
||||||
/* 55 */ { .fid = 0x0000, .parent = 0xff, .name = NULL, .type = FILE_TYPE_UNKNOWN, .data = NULL, .ef_structure = 0, .acl = ACL_NONE } //end
|
/* 58 */ { .fid = 0x0000, .parent = 0xff, .name = NULL, .type = FILE_TYPE_UNKNOWN, .data = NULL, .ef_structure = 0, .acl = ACL_NONE } //end
|
||||||
};
|
};
|
||||||
|
|
||||||
const file_t *MF = &file_entries[0];
|
const file_t *MF = &file_entries[0];
|
||||||
|
|||||||
@@ -24,18 +24,20 @@
|
|||||||
#define EF_PW1 0x1081
|
#define EF_PW1 0x1081
|
||||||
#define EF_RC 0x1082
|
#define EF_RC 0x1082
|
||||||
#define EF_PW3 0x1083
|
#define EF_PW3 0x1083
|
||||||
#define EF_PW1_RETRIES 0x1084
|
|
||||||
#define EF_RC_RETRIES 0x1085
|
|
||||||
#define EF_PW3_RETRIES 0x1086
|
|
||||||
#define EF_ALGO_PRIV1 0x10c1
|
#define EF_ALGO_PRIV1 0x10c1
|
||||||
#define EF_ALGO_PRIV2 0x10c2
|
#define EF_ALGO_PRIV2 0x10c2
|
||||||
#define EF_ALGO_PRIV3 0x10c3
|
#define EF_ALGO_PRIV3 0x10c3
|
||||||
|
#define EF_PW_PRIV 0x10c4
|
||||||
#define EF_PK_SIG 0x10d1
|
#define EF_PK_SIG 0x10d1
|
||||||
#define EF_PK_DEC 0x10d2
|
#define EF_PK_DEC 0x10d2
|
||||||
#define EF_PK_AUT 0x10d3
|
#define EF_PK_AUT 0x10d3
|
||||||
#define EF_PB_SIG 0x10d4
|
#define EF_PB_SIG 0x10d4
|
||||||
#define EF_PB_DEC 0x10d5
|
#define EF_PB_DEC 0x10d5
|
||||||
#define EF_PB_AUT 0x10d6
|
#define EF_PB_AUT 0x10d6
|
||||||
|
#define EF_DEK 0x1099
|
||||||
|
#define EF_CH_1 0x1f21
|
||||||
|
#define EF_CH_2 0x1f22
|
||||||
|
#define EF_CH_3 0x1f23
|
||||||
|
|
||||||
#define EF_EXT_HEADER 0x004d //C
|
#define EF_EXT_HEADER 0x004d //C
|
||||||
#define EF_FULL_AID 0x004f //S
|
#define EF_FULL_AID 0x004f //S
|
||||||
@@ -64,10 +66,12 @@
|
|||||||
#define EF_TS_DEC 0x00cf //S
|
#define EF_TS_DEC 0x00cf //S
|
||||||
#define EF_TS_AUT 0x00d0 //S
|
#define EF_TS_AUT 0x00d0 //S
|
||||||
#define EF_RESET_CODE 0x00d3 //S
|
#define EF_RESET_CODE 0x00d3 //S
|
||||||
|
#define EF_AES_KEY 0x00d5 //S
|
||||||
#define EF_UIF_SIG 0x00d6 //S
|
#define EF_UIF_SIG 0x00d6 //S
|
||||||
#define EF_UIF_DEC 0x00d7 //S
|
#define EF_UIF_DEC 0x00d7 //S
|
||||||
#define EF_UIF_AUT 0x00d8 //S
|
#define EF_UIF_AUT 0x00d8 //S
|
||||||
#define EF_KEY_INFO 0x00de //S
|
#define EF_KEY_INFO 0x00de //S
|
||||||
|
#define EF_KDF 0x00f9 //C
|
||||||
#define EF_ALGO_INFO 0x00fa //C
|
#define EF_ALGO_INFO 0x00fa //C
|
||||||
#define EF_LANG_PREF 0x5f2d //S
|
#define EF_LANG_PREF 0x5f2d //S
|
||||||
#define EF_SEX 0x5f35 //S
|
#define EF_SEX 0x5f35 //S
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
* This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
||||||
* Copyright (c) 2022 Pol Henarejos.
|
* Copyright (c) 2022 Pol Henarejos.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, version 3.
|
* the Free Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -21,7 +21,8 @@
|
|||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include <pico/stdlib.h>
|
#include <pico/stdlib.h>
|
||||||
|
|
||||||
#include "ccid2040.h"
|
#include "hsm.h"
|
||||||
|
#include "apdu.h"
|
||||||
|
|
||||||
extern bool has_pw1;
|
extern bool has_pw1;
|
||||||
extern bool has_pw3;
|
extern bool has_pw3;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
* This file is part of the Pico OpenPGP distribution (https://github.com/polhenarejos/pico-openpgp).
|
||||||
* Copyright (c) 2022 Pol Henarejos.
|
* Copyright (c) 2022 Pol Henarejos.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, version 3.
|
* the Free Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -23,5 +23,10 @@
|
|||||||
#define OPGP_VERSION_MAJOR ((OPGP_VERSION >> 8) & 0xff)
|
#define OPGP_VERSION_MAJOR ((OPGP_VERSION >> 8) & 0xff)
|
||||||
#define OPGP_VERSION_MINOR (OPGP_VERSION & 0xff)
|
#define OPGP_VERSION_MINOR (OPGP_VERSION & 0xff)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#define PIPGP_VERSION 0x0108
|
||||||
|
|
||||||
|
#define PIPGP_VERSION_MAJOR ((PIPGP_VERSION >> 8) & 0xff)
|
||||||
|
#define PIPGP_VERSION_MINOR (PIPGP_VERSION & 0xff)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user