Sending Felica Card ID to Web pages with IDm Reader App.(Supporting writing id and key)To exchange data with felica cards, you need Felica IDm Reader App for RC-S380.
This extension helps you to sending and recieving data between web pages and reader app.
Features:
* Sending felica card IDm, random chalenge response to web pages from reader app.
* Writing felica card user ID and Key with reader app.
* The custom event 'getId' is fired when the data recieved, so you can run your own script when recieved data.
* Veryfing random challenge response from the card.(Only for testing)
---------------------
How to use
---------------------
Please embed html elemnents with following id in your web pages.
The option page and script of this extension is an example of usage, so please check it.
"extension" means "Felica IDm Receiver Extension for RC-S380",
"app" means "Felica IDm Reader App for RC-S380".
Basically, extension sends requests to app, and recieves the result.
*** Reading IDm ***
(Both felica and felica lite-s available)
input:
startPolling : When it's clicked, extension makes app to start reading IDm.
output:
felicaIDm : IDm is inserted to the value of this element by extension. This extension fires 'getID' event in this element.
*** Reading user ID ***
(Only felica lite-s available)
input:
getCardId : When it's clicked, extension makes app to start reading IDm and user ID.
output:
felicaIDm : IDm and user ID are inserted together to the value of this element by extension.
*** Writing user ID and Key ***
(Only felica lite-s available)
If you don't enter master key and car key version, only user ID will be written.
You can't read card key written in the card directly.
input:
felicaUserId : 0 - 281474976710655 integral number
felicaCKVInput : 0 - 65535 integral number
felicaMasterKey : 24bytes hex number string
writeCardId : When it's clicked, extension makes app to start writing user ID, card key version, and card key.
output:
felicaIDm : IDm and user ID are inserted together to the value of this element by extension.
*** Writing Random Challenge ***
(Only felica lite-s available)
input:
authCard : When it's clicked, extension sends 16bytes random numbers and makes app to start writing random challenges.
output:
felicaIDm : IDm is inserted to the value of this element by extension.
felicaCKV : 16bytes hex numbers string including the card key version is inserted to the value of this element.
felicaRandomNum : Random 16bytes hex numbers used in random challenge is inserted to the value of this element.
felicaRandomRes : 16bytes hex numbers random challenge response is inserted to the value of this element.
*** Veryfing Random Challenge Response ***
(Only felica lite-s available)
Entering keys in web pages is NOT SAFE, so please use this feature only for testing!
After sending random challenge, enter master key and click 'verify' button,
extension calculates MAC_A value and compares it to response of thet card.
#####################
Cautions:
#####################
1.I won't take any responsibilities about installing and using this application, including changing drivers in your PCs.
2.The copyright of this application belongs to me, but you can check inside of this application from background pages.
3.The authentication functions are designed based on SONY's document(you can find on the web), but there is no guarantee about security.
This app is using CryptoJS, useful javascript encryption library, to write card key.
(https://code.google.com/p/crypto-js/)
Any comments would be appreciable.
FelicaカードのIDmをWebページを連携するための拡張機能です。
またFelicaLite-Sカードへのユーザ独自IDの書き込み・読み出しを行います。
(IDmの読み取りにはFelica IDm Reader App for RC-S380が必要です)