Update readme
This commit is contained in:
66
README.md
66
README.md
@@ -4,7 +4,6 @@ Here is the link to the original project: <http://git.gniibe.org/cgit/gnuk/gnuk.
|
||||
|
||||
What's Gnuk?
|
||||
============
|
||||
|
||||
Gnuk is an implementation of USB cryptographic token for GNU Privacy Guard. Gnuk supports OpenPGP card protocol version 3, and it runs on STM32F103 processor (and its compatible). Gnuk allows one to converting a Cheap $2 ST-Link v2 clone into a Hardware GPG Key.
|
||||
|
||||
It has supports of Ed25519 and X25519 (ECDH on Curve25519). It also has experimental support of ECDSA (on NIST P256 and secp256k1) and ECDH (on NIST P256 and secp256k1).
|
||||
@@ -15,7 +14,6 @@ Gnuk supports the Key Derived Function (KDF) functionality. With the KDF functio
|
||||
|
||||
How to build the firmware
|
||||
=========================
|
||||
|
||||
You will need the GNU toolchain and newlib for arm-none-eabi.
|
||||
|
||||
On Arch Linux this can be installed with the following
|
||||
@@ -28,7 +26,7 @@ On Debian or Ubuntu one can use the following command
|
||||
sudo apt-get install gcc-arm-none-eabi
|
||||
```
|
||||
|
||||
Cloning source code and compile
|
||||
Clone source code and compile
|
||||
```
|
||||
git clone --recursive https://git.spengler.co.za/deon/gnuk.git gnuk
|
||||
cd gnuk/src
|
||||
@@ -40,44 +38,42 @@ Then, we will have "gnuk.bin" under src/build directory.
|
||||
|
||||
***Please read section 'USB vendor ID and product ID' below.***
|
||||
|
||||
How to protect flash ROM
|
||||
========================
|
||||
How flash firmware
|
||||
==================
|
||||
Now create a file called stm32f103.cfg with the following content
|
||||
```
|
||||
telnet_port 4444
|
||||
source [find interface/stlink-v2.cfg]
|
||||
source [find target/stm32f1x.cfg]
|
||||
set WORKAREASIZE 0x10000
|
||||
```
|
||||
|
||||
To protect, invoke OpenOCD like (for FST-01):
|
||||
|
||||
$ openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg \
|
||||
-c init -c "reset halt" -c "stm32f1x lock 0" -c reset -c exit
|
||||
|
||||
After power-off / power-on sequence, the contents of flash ROM cannot
|
||||
be accessible from JTAG debugger.
|
||||
|
||||
Unprotecting is:
|
||||
|
||||
$ openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg \
|
||||
-c init -c "reset halt" -c "stm32f1x unlock 0" -c reset -c exit
|
||||
|
||||
Upon unprotection, flash is erased.
|
||||
|
||||
Note that it would be still possible for some implementation of DfuSe
|
||||
to access the contents, even if it's protected. If you really want to
|
||||
protect, killing DfuSe and accessing by JTAG debugger is recommended.
|
||||
Now execute the openocd command and connect with telnet
|
||||
```
|
||||
openocd stm32f103.cfg
|
||||
telnet localhost 4444
|
||||
```
|
||||
|
||||
Use the following commands to unlock, flash the firmware and lock the device again.
|
||||
```
|
||||
stm32f1x unlock 0
|
||||
reset halt
|
||||
flash write_bank 0 ./src/build/gnuk.bin 0
|
||||
stm32f1x lock 0
|
||||
reset halt
|
||||
```
|
||||
|
||||
Testing Gnuk
|
||||
------------
|
||||
|
||||
Type following command to see Gnuk runs:
|
||||
|
||||
$ gpg --card-status
|
||||
|
||||
|
||||
Besides, there is a functionality test under tests/ directory. See
|
||||
tests/README.
|
||||
============
|
||||
Type following command to see if GnuPG detects the token.
|
||||
```
|
||||
gpg --card-status
|
||||
```
|
||||
|
||||
***See tests/README for functionality tests.***
|
||||
|
||||
Personalize the Token, import keys, and change the password
|
||||
-----------------------------------------------------------
|
||||
|
||||
===========================================================
|
||||
You can personalize the token, putting your information like: Name,
|
||||
Login name, Sex, Languages, URL. To do so, GnuPG command is:
|
||||
|
||||
@@ -187,5 +183,3 @@ license.
|
||||
Otherwise, companies which want to distribute Gnuk devices, please use
|
||||
your own USB vendor ID and product ID. Please replace vendor string
|
||||
and possibly product string to yours, when you modify Gnuk.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user