A multi-ride amusement park ticket application on NFC memory card

Overview

NFC-Android-Ticket-Application

A multi-ride amusement park ticket application on NFC memory card. The security features cover mitigating: Man in the Middle attack, Rollback attack, tearing protection, Write Protection.

Overview

We are designing a multi-ride amusement park ticket application on NFC memory card. The ticket will have a fixed number of rides with validity that will start from the first ride till the next 1 day. To renew the tickets, the ticket holder will need to go to the ticket vendor for renewal. The ticket holder can add more tickets on top of the existing tickets. We are implementing security features for the NXP MIFARE Ultralight C Smart Card. The security features cover mitigating: Man in the Middle attack, Rollback attack, tearing protection, Write Protection.

Features

  • Ticket is first authenticated and registered with 5 tickets.
  • The expiry time is set to 1 day after the ticket is used for the first time.
  • Each time customer uses the ticket, the ride count is increased by 1.
  • The ticket is no longer valid after maximum ride counts have been reached.
  • Customer can buy additional tickets.

Code Structure

The application logic for ticket and security features can be found in: NFC-Android-Ticket-Application/app/src/main/java/com/ticketapp/auth/ticket/Ticket.java

Ticket Application Structure

Page 32: This is the MAC calculated from Page 34 to 39

Page 33: This is the MAC calculated from Page 35 to 39.

Page 34: This page contains the time of expiry.

Page 35: This specifies the version of application. If there are multiple versions.

Page 36: This specifies the tag of the application, that will be used by reader to identify the specific application.

Page 37: This page contains the time when ticket was issued.

Page 38: This page contains the number of issued tickets till now.

Page 41: 16-bit counter to count the tickets used. Every time the ticket is issued, the counter is incremented by 1. We compare the incremented counter value with initial counter value and number of rides that is in the User data.

Page 42 (AUTH0): 04h: This specifies from where the authentication part starts. In our case, we protect the memory from 04h.

Page 43 (AUTH1): Write access to the pages that are specified in AUTH0.

Page 44 to 46: This memory page contains the authentication key. The authentication key contains the hash of the UID with some secret message that is only known by the reader. The reader will authenticate the ticket card using this Hash.

Security Protocols

MitM attack: MitM attack is mitigated by using the MAC scheme. We generate a MAC using a diversified key for all the information stored in the card – application tag, version number, expiry time, initial counter value, number of rides.

Rollback attack: 16-bit counter is used to protect against the rollback attack. The counter of the card is a one�way monotonic counter which cannot be rolled back.

Tearing protection: We keep a backup MAC to cater for the tearing attack. We write the first mac, when issuing tickets and the other MAC when the card is being used for the first time. When card is used for the first time, there are two write operations – updating counter value, writing expiry time. We generate a backup MAC using expiry time.

Key diversification: K = h(master secret | UID) Diversified keys are used for authentication and MAC scheme using the UID specific to each card and a master secret. Compromise of one card will not hamper or impact security of other cards, because the key for every card is different.

Write protection: AUTH0 and AUTH1 are set for blocking writing to the card without authentication. Without the secret key, the attacker can only know the UID of the card and cannot break the card.

Application Tag and Version: We use application tag to ensure that, the card is used for the purpose it is designed for. We use application version, for backward compatibility. The version number field will be useful later when we update the application or need multiple version of the ticket

You might also like...

Multi-OS Engine: Create iOS Apps in Java (or Kotlin ... etc.)

Multi-OS Engine Overview Multi-OS Engine provides a Java runtime and Java interfaces to iOS platform API to develop native iOS applications with nativ

Dec 22, 2022

Multi-Disciplinary Project

Multi-Disciplinary Project

Multi-Disciplinary Project With an odd-numbered group of 7, the planning for the distribution of work is tricky since certain members have to take add

Mar 9, 2022

MarioCash is a trust-based multi-dimensional blockchains built with a vision to connect everything and any blockchain networks.

MarioCash is a trust-based multi-dimensional blockchains built with a vision to connect everything and any blockchain networks.

MarioCash We will change the world by blockchain. What is mariocash? MARIOCASH is a trust-based multi-dimensional blockchains (branches) built with a

Mar 10, 2022

A supercharged gradle template for developing Minecraft plugins with multi platform support.

Minecraft Multi-Platform Template You can use this template to develop your own high quality Minecraft plugins for multiple platforms using Gradle wit

Nov 23, 2022

Cloud native multi-runtime microservice framework

Cloud native multi-runtime microservice framework

Femas: Cloud native multi-runtime microservice framework The repository address has been transferred to PolarisMesh English | 简体中文 Introduction abilit

Sep 5, 2022

An advanced, multi-purpose Discord bot

An advanced, multi-purpose Discord bot

TechnoBot An advanced, multi-purpose bot for Discord Explore this project » Visit Wiki · Report Bug · Request Feature Table of Contents About The Proj

Dec 28, 2022

EMP: Edge-assisted Multi-vehicle Perception (MobiCom '21)

EMP EMP is an edge-assisted multi-vehicle perception system for connected and autonomous vehicles (CAVs), designed for efficient and scalable sensor d

Dec 3, 2022

BungeeCord/Spigot plugin that fixes Multi-world detection by simulating mod presence on the server side

Companion for map mods Unofficial BungeeCord and Spigot (Paper) companion plugin for Xaero's Minimap (and their World Map), JourneyMap and VoxelMap. T

Sep 18, 2022

An Android library for managing images and the memory they use.

An Android library for managing images and the memory they use.

Fresco Fresco is a powerful system for displaying images in Android applications. Fresco takes care of image loading and display, so you don't have to

Jan 3, 2023
Owner
Jayshree Rathi
Masters student in Security and Cloud Computing at Aalto University.
Jayshree Rathi
Turismo Tierra Media: a system that stores the information of different attractions of Middle Earth amusement park

turismo-tierra-media is a system that stores the information of different attractions of Middle Earth amusement park. The system suggests visits based on the location of the visitors, and also generates itineraries based on the information on preferences available in the user's profile.

Gastón Pini 1 Feb 17, 2022
A simple Flash Card application to assist in learning and remembering something.

a-flash-deck A simple Flash Card application to assist in learning and remembering something. This project is intended for demo app for a-navigator an

null 16 Dec 30, 2022
Get device location by telephony (SIM card) or settings without using GPS tracker.

react-native-device-country Get device location by telephony (SIM card) or settings without using GPS tracker Installation yarn add react-native-devic

dev.family 46 Nov 29, 2022
Cardsystem - Digital card sign-in/sign-out system for the Indiana Academy

cardsystem Digital card sign-in/sign-out system for the Indiana Academy Requirements: Create system for inputing destination, companion, and estimated

null 1 Feb 23, 2022
An unofficial rules engine for the world's greatest card game.

Forge Official repo. Dev instructions here: Getting Started (Somewhat outdated) Discord channel here Requirements / Tools you favourite Java IDE (Inte

Forge 150 Dec 30, 2022
React Native plugin to manage Sim card(s) & eSim

react-native-sim-cards-manager A new library that merge multiple sim cards libraries into a single one: https://github.com/markneh/react-native-esim h

@odemolliens 11 Jan 3, 2023
Multi-Tenant Spring Boot Application with separate databases using Hibernate and H2.

Multi-Tenant Spring Boot Application A Spring Boot application that utilises a multi-tenancy architecture by providing multiple databases, one for eac

Alex Gschnitzer 15 May 9, 2022
Spring-boot application to demo JVM HEAP and Native memory leak

Description This repo can be used as demo repo for finding memory leaks. Example spring-boot project to show how to find and fix JVM HEAP memory leak

Iranna Nk 4 Jul 22, 2022
Bank Statement Analyzer Application that currently runs in terminal with the commands: javac Application.java java Application [file-name].csv GUI coming soon...

Bank Statement Analyzer Application that currently runs in terminal with the commands: javac Application.java java Application [file-name].csv GUI coming soon...

Hayden Hanson 0 May 21, 2022
Build criterion and ecosystem above multi-model databases

ShardingSphere - Building a Criterion and Ecosystem Above Multi-Model Databases Official Website: https://shardingsphere.apache.org/ Stargazers Over T

The Apache Software Foundation 17.8k Jan 9, 2023