RWoT proposals and modern portable secure hardware

Nicolas Bacca, Ledger (nicolas@ledger.fr) - https://ledger.co

RWoT Paris, April 2017

RWoT proposals can involve "non standard" algorithms - this document provides a short history of the secure hardware landscape available today, as well as typical constraints and possible integration strategies to reuse existing solutions with as little modifications as possible and achieve faster user adoption

Smartcard integration pre 2005

Smartcard integration pre 2005 on personal computers was basically non existant or fully proprietary for several reasons :

Smartcard integration 2005 - 2012

The standardization of the USB reader communication class CCID (see [3]) helped solving parts of the previous issues :

However no progress was made on a common middleware or a high level access interface or the overall security - web integration was still a mix a different technologies with a life expectations of a few years at best

The FIDO Alliance proposal

The FIDO Alliance (see [4]) proposed U2F, a simple cryptographic scheme for 2FA that allowed to build on the previous improvements and deal with the remaining issues - it practically rebooted PKI.

U2F itself can be summarized as a stateless challenge/response over prime256v1 split into two stages

It is now the most successful personal smartcard deployment offering interoperability over hundreds of products and an open implementation used by Github, Gitlab, Dropbox, Facebook among others.

The UAF specification (extending U2F to also handle user credentials on the device itself) also supports natively secp256k1 - it is not as widely supported though and will likely be silently merged into FIDO 2.

Java Card limitations

Java Card (see [8]) is a minimalist Java VM designed for smartcard. Only minor changes were applied after it was released in 2000 (mostly additional cryptographic algorithms support) and it is the de-facto standard for uploading custom applications on off-the-shelf smartcards.

However Java Card suffers from severe limitations :

Also the lack of an interoperability profile for Java Card can harm vendor interoperability for "non standard" (not part of the proprietary test suite) operations (see [10])

Recent smartcards limitations

The biggest limitations of recent smartcards are the performance for general purpose algorithms and RAM. Cryptographic algorithms can usually be accelerated by a faster co-processor offering a big numbers arithmetic API

The available RAM shoud be considered between 10 Kb and 32 Kb for high end cards

Most recent secure elements are based on hardened ARM cores provided by the SecureCore IP blocks (see [11]). For performance evaluation and emulation purposes they can be considered equivalent to an ARM Cortex M0+ (for SC000) or ARM Cortex M3 (for SC300) clocked between 20 and 40 MHz

U2F modding

The U2F implementation has already been modded in the field (heavily in the Bitcoin community) to offer additional features :

WebUSB

The WebUSB proposal (see [16]) is supported by the W3C to offer a generic low level USB transport layer to web applications (basically equivalent to the Chrome proprietary APIs used to implement the early U2F pilots). It is currently being tested in Chrome.

GlobalPlatform Web API

The GlobalPlatform Web API (see [17]) is supported by GlobalPlatform is promoting a low level abstract transport API to access different Secure Elements. It is mainly tailored towards PC/SC support and proprietary vendor interfaces, similar to the (poorly supported on vanilla devices) Android SEEK API (see [18])

WebAuthN

The WebAuthN proposal (see [19]) is supported by the W3C to offer a high level API for credentials management, building upon the FIDO specifications. Hardware solutions are set to be natively supported as Authenticators with a scope similar to U2F, with support for vendor defined extensions, for example to identify the credential being accessed on device

PIV

The PIV (FIPS 201, HSPD-12) standard (see [20]) is the most recent attempt before FIDO to unite PKI standards on legacy smartcard technology, based on the existing work performed on PKCS #11 smartcard implementations such as PKCS #15 (see [21]) or the WIM (see [22]). It has been designed for high security and government compliance rather than ease of use by the general public, but bridges are getting established between it and the more modern FIDO/W3C specifications (see [23])

Mobile devices support

Mobile device support of portable secure hardware is still quite diverse :

Enclaves support is not considered as it doesn't create any significant restriction to the algorithms being implemented.

Recommendation to the group

References

[1] https://www.pcscworkgroup.com/

[2] ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11

[3] http://www.usb.org/developers/docs/devclass_docs/DWG_Smart-Card_CCID_Rev110.pdf

[4] https://fidoalliance.org/

[5] http://www.usb.org/developers/hidpage/HID1_11.pdf

[6] https://github.com/google/u2f-ref-code/tree/master/u2f-chrome-extension

[7] https://addons.mozilla.org/en-Us/firefox/addon/u2f-support-add-on/

[8] http://www.oracle.com/technetwork/java/embedded/javacard/overview/index.html

[9] https://github.com/LedgerHQ/ledger-javacard/blob/master/src-preprocessed/com/ledger/wallet/SHA512.javap

[10] https://www.fi.muni.cz/~xsvenda/jcalgtest/

[11] https://www.arm.com/products/processors/securcore

[12] https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

[13] https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

[14] https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki

[15] https://github.com/LedgerHQ/ledger-node-js-api

[16] https://wicg.github.io/webusb/

[17] http://globalplatform.github.io/WebApis-for-SE/doc/

[18] http://seek-for-android.github.io/

[19] https://www.w3.org/TR/webauthn/

[20] http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.201-2.pdf

[21] ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-15

[22] http://www.openmobilealliance.org/tech/affiliates/wap/wap-260-wim-20010712-a.pdf

[23] https://fidoalliance.org/wp-content/uploads/White-Paper-Leveraging-FIDO-Standards-to-Extend-the-PKI-Security-Model-in-US-Govt-Agencies.pdf

[24] https://github.com/LedgerHQ/android-u2f-bridge