Skip to content

Commit 966daa6

Browse files
committed
Use Yubico compatible AID for TOTP
1 parent 1dc1d7b commit 966daa6

File tree

4 files changed

+9
-30
lines changed

4 files changed

+9
-30
lines changed

applets/apex-totp

Submodule apex-totp updated 1 file

docs/applets/2-totp-hotp.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ These codes are preferred over e.g. SMS codes, because the process requires no c
99
- Repository: https://github.com/VivoKey/apex-totp
1010
- Binary name: `vivokey-otp.cap`
1111
- Download: https://github.com/DangerousThings/flexsecure-applets/releases
12-
- AID: `A0:00:00:07:47:00:61:FC:54:D5:01:01`, Package: `A0:00:00:07:47:00:61:FC:54:D5:01`
12+
- AID: `A0:00:00:05:27:21:01:01:02`, Package: `A0:00:00:05:27:21:01:01`
1313
- Storage requirements:
1414
- Persistent: `5128` bytes (`6020` with three TOTP accounts)
1515
- Transient reset: `2296` bytes (`2392`)
@@ -32,42 +32,21 @@ gp -install vivokey-otp.cap
3232
Listing the applets using `gp --list` should print something like this:
3333

3434
```
35-
APP: A0000007470061FC54D50101 (SELECTABLE)
35+
APP: A00000052721010102 (SELECTABLE)
3636
Parent: A000000151000000
37-
From: A0000007470061FC54D501
37+
From: A000000527210101
3838
39-
PKG: A0000007470061FC54D501 (LOADED)
39+
PKG: A000000527210101 (LOADED)
4040
Parent: A000000151000000
4141
Version: 1.1
42-
Applet: A0000007470061FC54D50101
43-
```
44-
45-
If you want to emulate a YubiKey, e.g. to use the Yubico Authenticator app, you have to specify another AID (`A0:00:00:05:27:21:01:01`):
46-
47-
```
48-
gp -load vivokey-otp.cap
49-
50-
gp -package A0000007470061FC54D501 -applet A0000007470061FC54D50101 -create A000000527210101
51-
```
52-
53-
Listing the applets using `gp --list` should print something like this:
54-
55-
```
56-
APP: A000000527210101 (SELECTABLE)
57-
Parent: A000000151000000
58-
From: A0000007470061FC54D501
59-
60-
PKG: A0000007470061FC54D501 (LOADED)
61-
Parent: A000000151000000
62-
Version: 1.1
63-
Applet: A0000007470061FC54D50101
42+
Applet: A00000052721010102
6443
```
6544

6645
## Using the Applet
6746

6847
Use the VivoKey Apex Manager App to interface this applet.
6948

70-
The Yubikey Authenticator tool is able to interface this applet on both Desktop and Mobile if you emulate a YubiKey AID, and also have the HMAC-SHA1 applet installed (it does not necessarily have to be initialized with keys). On Desktop, you have to specify your PCSC reader in **Settings -> Advanced -> Custom Reader**.
49+
The Yubikey Authenticator tool is able to interface this applet on both Desktop and Mobile as well, but it requires you to also have the HMAC-SHA1 applet installed (it does not necessarily have to be initialized with keys). On Desktop, you have to specify your PCSC reader in **Settings -> Advanced -> Custom Reader**.
7150

7251
You can also use the yubikey-manager CLI tool (`ykman`) to interface with the applet. You have to specify your reader using the `-r` flag (use `ykman list -r` to get a list of readers). Replace `SECRET` with a 32 character Base-32 encoded secret:
7352

scripts/test/apex-totp.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setup() {
1515
java -cp /app/tools/jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar:./target com.licel.jcardsim.remote.VSmartCard /app/src/scripts/test/res/apex-totp.jcardsim.cfg > /dev/null &
1616
JCSIM_PID="$!"
1717
sleep 2
18-
opensc-tool -r 'Virtual PCD 00 00' -s '80 b8 00 00 0B 08 A0 00 00 05 27 21 01 01 00 FF'
18+
opensc-tool -r 'Virtual PCD 00 00' -s '80 b8 00 00 0B 09 A0 00 00 05 27 21 01 01 02 00 FF'
1919
SECRETB32='IVCEGRTIOQ3UGSLNI5KDMT2RKF4FGUCO'
2020
}
2121

scripts/test/res/apex-totp.jcardsim.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
com.licel.jcardsim.card.applet.0.AID=A000000527210101
1+
com.licel.jcardsim.card.applet.0.AID=A00000052721010102
22
com.licel.jcardsim.card.applet.0.Class=com.vivokey.otp.YkneoOath
33
com.licel.jcardsim.card.ATR=3BF91800FF8131FE4550565F4A334130343040
44
com.licel.jcardsim.vsmartcard.host=localhost

0 commit comments

Comments
 (0)