lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTik1wb6Px+K+bBkzkt=dEMi_Xx3T3Q@mail.gmail.com>
Date:	Wed, 6 Apr 2011 19:17:19 -0300
From:	Lauro Ramos Venancio <lauro.venancio@...nbossa.org>
To:	linux-kernel@...r.kernel.org
Cc:	Aloisio Almeida <aloisio.almeida@...nbossa.org>,
	Arnd Bergmann <arnd@...db.de>, Waldemar.Rymarkiewicz@...to.com
Subject: [RFC] NFC subsystem prototype

As previously mentioned in this list, a NFC (Near Field Communication)
subsystem is required to standardize the NFC device drivers
development and create an unified userspace interface. This email
describes our NFC subsystem proposal.

The NFC protocols implementation is divided in some parts:

* The NFC subsystem in the kernel side is responsible for:
	- NFC adapters management;
	- Polling for targets;
	- Low level data exchange;

* All the commands to access the tags data (e.g. MIFARE commands:
READ, WRITE, SECTOR_SELECT) are implemented in the userspace using the
low level data exchange provided by kernel.

* The peer-to-peer NFC protocol (LLCP) will be implemented on kernel
side in order to provide a socket interface (DGRAM and STREAM) with
userspace. The LLCP will be implemented on top of the low level data
exchange provided by NFC subsystem.

+----------------------------------------------------+
|                    USER SPACE                      |
+----------------------------------------------------+
        ^                            ^
        | netlink                    |
        v                            |
+---------------+                    |
|     nlnfc     |                    | AF_NFC socket
+---------------+                    |
        ^                            |
        |                            |
        v                            v
+---------------+      +-----------------------------+
|    nfccore    | <--> | high-level-protocols (LLCP) |
+---------------+      +-----------------------------+
        ^
        |
        v
+---------------+
| Device driver |
+---------------+


In order to validate this idea, we developed a NFC subsystem prototype.
For testing purpose, we also implemented a device driver (PN533) and
an userspace test application.

The prototype implementation can be found at:
	git://186.215.206.130/linux-nfc.git

The userspace test application (list targets and read/write MIFARE
tags) can be found at:
	git://186.215.206.130/nfc-example.git

Prototype Scope:
	- Tag Reader/Writer
	- Protocols: MIFARE, ISO14443, FELICA, JEWEL

Subsystem Operations:
	- start poll - start polling for targets using the protocols given as parameter
	- stop poll - stop polling
	- activate target - activate a target for communication using a
specific protocol
	- deactivate target - deactivate a target
	- reset device - put the adapter in idle mode
	- data exchange - low level data exchange (send and receive data)

Subsystem Event:
	- targets found - report all targets found by the polling

Device Driver Interface:
The device driver interface is a direct correspondence from the NFC
subsystem interface.

User space interface:
When we were designing this subsystem, we were in doubt between
netlink (as in nl80211) and sockets (as in bluez) for userspace
communication. For this prototype, we decided to use generic netlink.

However, the netlink choice has not proven to be the best solution for
the data exchange operation. So we plan to have a new prototype
version using another solution. The options are:
	- sockets for all operations as in bluez implementation;
	- sockets for data exchange and keep netlink for the other operations.

Further work:
	- Define subsystem operations for adapters in "target mode"
	- Implement LLCP
	- Add support to the "secure elements"


Regards,

Lauro Ramos Venancio
INdT - Instituto Nokia de Tecnologia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ