Skip to content

Commit dd4305e

Browse files
committed
add storage requirements
1 parent 115dc4f commit dd4305e

File tree

7 files changed

+36
-3
lines changed

7 files changed

+36
-3
lines changed

docs/2-hardware.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The specification of the chip used in the FlexSecure and Apex Flex (with a diffe
1515
- Package: MOB10 ultra-thin (chip: `5 mm * 5 mm`, total: `5 mm * 8 mm`, thickness: `0.1 mm`) punched from `35 mm` tape reels
1616
- Hardware interface: Contactless (NFC `13.56 MHz`, ISO/IEC 14443 Type A) only
1717
- Capacitance: `56 pF`
18-
- Configuration: "MIFARE Plus EV1 in classic mode 4K applet" removed, leaves `>= 164K` EEPROM, `>= 4KB` RAM usable
18+
- Configuration: "MIFARE Plus EV1 in classic mode 4K applet" removed, leaves `>= 164K` EEPROM, `>= 4KB` RAM usable (for details, see below)
1919
- GlobalPlatform key: `404142434445464748494a4b4c4d4e4f` (default test key)
2020
- Supported algorithms: RSA 4096bits, AES, SHA1/SHA224/SHA256/SHA384/SHA512, 3DES(ECB,CBC), KOREAN SEED, ECC FP 160 bits to 521 bits
2121

@@ -61,15 +61,23 @@ The P71 has a few hundreds kilobytes of ROM (read-only) memory. The contents of
6161

6262
The P71 J3R200 has about `200 KB` of EEPROM (re-writeable) nonvolatile flash memory. According to our manufacturer, the FlexSecure has at least `164 KB` of EEPROM available. The Mifare classic emulation applet was removed from the ROM mask, otherwise only about `99 KB` flash would have been available.
6363

64+
Measurements show an available persistent (EEPROM) storage of at least `167736` bytes for the FlexSecure.
65+
6466
The ROM is typically used for storing pre-deployed packages which will never change. The EEPROM then stores only the applet instances, as well as configuration data like e.g. secret keys. In our case, all packages are loaded during runtime into the EEPROM, and the ROM is pretty much unused expect for some cryptographic algorithms and the operating system.
6567

66-
The P71 J3R200 has about `8 KB / 10KB` of volatile RAM available. Some of that is used by the operating system and cryptographic algorithms. According to out manufacturer, at least `4 KB` of RAM is available for applets on the FlexSecure.
68+
The P71 J3R200 has about `8 KB` of volatile RAM available. Some of that is used by the operating system and cryptographic algorithms. According to our manufacturer, at least `4 KB` of RAM is available for applets on the FlexSecure.
69+
70+
Measurements show a transient (RAM) storage size of at least `4115` / `4112` (reset / deselect) bytes for the FlexSecure.
6771

6872
The Apex Flex uses either the `J3R200` or the `J3R180` chip, which one is unclear at the time of writing. They have the same base specs (besides the `J3R180` having a `20 KB` smaller EEPROM), and use a different ROM mask specified by Fidesmo. The ROM mask should contain the pre-loaded payment package, and the EEPROM additionally contains the instance of this payment applet. This takes quite a chunk of memory (allegedly about `100 KB`). Information on these Fidesmo-deployed chips is scarce, maybe the payment package is stored in the EEPROM as well. In any case, the remaining amount of storage and memory is significantly smaller than on the FlexSecure.
6973

74+
Measurements show an available persistent (EEPROM) storage of at least `84336` bytes, and a transient (RAM) storage size of at least `4054` / `4160` (reset / deselect) bytes for the Apex Flex.
75+
76+
An issue concerning the fact that Fidesmo does not actually free the card memory upon applet deletion is being investigated.
77+
7078
## Payments
7179

72-
At the time of writing, it is unclear whether the payment functionality of the Apex Flex will be active. Mastercard / Visa have some ideological issues supporting implants, so although the Fidesmo payment applet works great, it might be disabled on the Apex Flex. It is unknown whether the payment applet will be loaded on the chip but refuse to function, or if it will be completely absent. In the latter case, there would be more storage and memory available, probably similar to the FlexSecure. However, it is more likely that the applet will lie dormant until Visa / Mastercard sort out their issues.
80+
It is unclear if and when the payment functionality of the Apex Flex will be active. Mastercard / Visa have some ideological issues supporting implants, so although the Fidesmo payment applet works great, it might be disabled on the Apex Flex. The payment applet will be loaded on the chip, but won't be enabled. The applet will lie dormant until Visa / Mastercard sort out their issues.
7381

7482
The FlexSecure comes without a payment applet. Although there are payment applet implementations by Fidesmo and e.g. Mastercard available, the legal paperwork and security requirements (sectioned chips, private administrative keys) mean that the FlexSecure cannot and will not be able to make payments.
7583

@@ -85,5 +93,6 @@ If you want full offline control over your hardware and keys, the maximum possib
8593
- https://www.javacardos.com/store/products/11020
8694
- https://fidesmo.com/
8795
- https://github.com/fidesmo/fdsm
96+
- https://github.com/StarGate01/javacard-memory
8897

8998
Improve this document: https://github.com/StarGate01/flexsecure-applets/tree/master/docs

docs/applets/1-pgp.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Explaining the theory of public-key cryptography is out of scope, please refer t
1010
- Binary name: `SmartPGPApplet-default.cap` and `SmartPGPApplet-large.cap`
1111
- Download: https://github.com/StarGate01/flexsecure-applets/releases
1212
- AID: `d2:76:00:01:24:01:03:04:00:0A:00:00:00:00:00:00` (has to be adjusted, see below), Package: `d2:76:00:01:24:01`
13+
- Storage requirements:
14+
- Persistent: `24776` bytes (`28148` with one RSA 2048 key)
15+
- Transient reset: `2118` bytes
16+
- Transient deselect: `16` bytes
1317

1418
## Compiling the Applet Yourself
1519

docs/applets/2-totp-hotp.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ These codes are preferred over e.g. SMS codes, because the process requires no c
1010
- Binary name: `vivokey-otp.cap`
1111
- Download: https://github.com/StarGate01/flexsecure-applets/releases
1212
- AID: `A0:00:00:05:27:21:01:01`, Package: `A0:00:00:05:27:21:01`
13+
- Storage requirements:
14+
- Persistent: `5128` bytes (`6020` with three TOTP accounts)
15+
- Transient reset: `2296` bytes (`2392`)
16+
- Transient deselect: `64` bytes
1317

1418
## Compiling the Applet Yourself
1519

docs/applets/3-hmac-sha1.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ This applet is compatible to the Yubikey-style protocol, supported by e.g. KeePa
1010
- Binary name: `YkHMACApplet.cap`
1111
- Download: https://github.com/StarGate01/flexsecure-applets/releases
1212
- AID: `A0:00:00:05:27:20:01`, Package: `A0:00:00:05:27:20`
13+
- Storage requirements:
14+
- Persistent: `3204` bytes
15+
- Transient reset: `240` bytes
16+
- Transient deselect: `128` bytes
1317

1418
## Compiling the Applet Yourself
1519

docs/applets/4-ndef.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ NDEF (NFC Data Exchange Format) is a data format used to store structured data.
88
- Binary name: `openjavacard-ndef-full.cap` and `openjavacard-ndef-tiny.cap`
99
- Download: https://github.com/StarGate01/flexsecure-applets/releases
1010
- AID: `D2:76:00:00:85:01:01`, Package: `D2:76:00:00:85`
11+
- Storage requirements:
12+
- Persistent: `4372` bytes
13+
- Transient reset: `16` bytes
14+
- Transient deselect: `0` bytes
1115

1216
## Compiling the Applet Yourself
1317

docs/applets/5-fido.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ The FIDO2 applet is still in development, and not completely finished. For examp
1818
- Binary name: `U2FApplet.cap`
1919
- Download: https://github.com/StarGate01/flexsecure-applets/releases
2020
- AID: `A0:00:00:06:47:2F:00:01`, Package: `a0:00:00:06:17:00:4f:97:a2:e9:50:01`
21+
- Storage requirements:
22+
- Persistent: `8020` bytes
23+
- Transient reset: `865` bytes
24+
- Transient deselect: `0` bytes
2125

2226
### FIDO2 CTAP2 (in development)
2327

scripts/clean/javacard-memory.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
cd /app/src/applets/javacard-memory
4+
rm -rf target

0 commit comments

Comments
 (0)