Function desfire::fs::create_app_for_ro

Function Documentation

result<any_key> desfire::fs::create_app_for_ro(tag &tag, cipher_type cipher, app_id aid, random_oracle rng)

Creates an app with a unique, randomized key, suitable for being turned into a “read only” app later.

Note

The caller is responsible for selecting the root app and authenticating, and ensuring that aid does not exist. On successful exit, the tag will have aid selected and be authenticated on the returned key.

Parameters:
  • tag – Tag on which to operate.

  • cipher – Cipher to use on this app. It is 2023, the only reasonable setting for this is cipher_type::aes128.

  • aid – Application id to create. Make sure it does not exist.

  • rng – Random number generator used to create the key.

Returns:

A randomized master key for the app, or any of the error codes returned by tag::create_application.