@@ -15,13 +15,19 @@ If you don't know what that is, you DEFINITELY don't need this.
1515## Don't you need a CBOR parser to write a CTAP2 authenticator?
1616
1717Apparently not. Instead of implementing a real CBOR parser I just
18- poured more sweat into the implemnentation , and added a topping of
18+ poured more sweat into the implementation , and added a topping of
1919non-standards-compliance.
2020
2121As a result of not having a proper CBOR parser, the app will often
2222return undesirable error codes on invalid input, but it should
2323handle most valid input acceptably.
2424
25+ It does this by linearly scanning a byte-buffer with the CBOR object in it,
26+ and moving a read index forward the desired amount. Unknown objects get skipped.
27+ Any object declaring a length greater than two bytes long causes an error,
28+ because it's not possible to have >65535 of something in a 1,024-byte-long
29+ buffer, and the CTAP2 standard requires that CBOR be "canonical".
30+
2531## Why did you write this, when someone else said they were almost done writing a better version?
2632
2733Well, they said that, but they hadn't published the source code and I got impatient.
@@ -50,12 +56,31 @@ CTAP2.1 standard says it's okay to return level three if two was requested,
5056but that breaks OpenSSH, so... credProtect is incorrectly implemented in
5157that it always applies level three internally.
5258
59+ Finally, the CTAP API requires user presence detection, but there's really no
60+ way to do that on Javacard 3.0.4. We can't even use the "presence timeout"
61+ that is described in the spec for NFC devices. So you're always treated as
62+ being present, which is to some extent offset by the fact that anything real
63+ requires you type your PIN (if one is set)...
64+
65+ So set a PIN, and unplug your card when you're not using it.
66+
5367## Why don't you implement U2F/CTAP1?
5468
5569U2F doesn't support PINs, and requires an attestation certificate.
5670
57- [ the security model] ( security.md ) requires PINs.
71+ [ The security model] ( security.md ) requires PINs.
72+
73+ It would be possible to implement U2F commands in non-standards-compliant ways,
74+ but implementing them the normal way would require turning off the ` alwaysUv `
75+ key feature for U2F-accessible credentials.
5876
5977## Isn't PBKDF2 on a smartcard a fig leaf?
6078
6179Probably, yes, but it makes me feel better.
80+
81+ You can raise the iteration count, but really there's only so much that can be
82+ done here. At least it means off-the-shelf rainbow tables probably won't work.
83+
84+ ## I hear bcrypt or Argon2id is better than PBKDF2
85+
86+ Good luck implementing those on a 16-bit microprocessor. I welcome you to try.
0 commit comments