Infinite Peripherals Prima M

The Prima M is a small, convenient and mobile smart card reader from Infinite Peripherals. It is a Secure Reading and Exchange of Data (SRED) certified magnetic stripe reader (MSR) for end-to-end encryption capability. This 3-track encrypted MSR can be attached to the audio jack of Android™ and Apple mobile devices. Infinite Peripherals provides iOS and Android software development kits (SDKs) that point of sale (POS) systems use to communicate with the device.

Retrieving the Serial Number

iOS

To retrieve the device serial number on an iOS application, include the SDK library libAudioReaderSDK.a in your xCode project. Use an instance of the AudioSmartCardReader::sharedDevice class to obtain ASCDeviceInfo* data from the terminal. The Device's serial number will be contained in the field info.SerialNumber.

Android

To retrieve the device serial number on an Android application, include the com.datacs.audioreader.jar SDK library in your Android project. Use the AudioReaderManager class to obtain the reference to the AudioReader object. Use this object instance to call the getSerialNumber() method.

Retrieving Payload Data

iOS

To retrieve an encrypted payload on an iOS app, use a reference to AudioSmartCardReader::sharedDevice class to make a NSData* data.via call to msGetEncryptedCardData. Make sure to set the Encryption Mode to ASCEncryptionTypeIDTECH (int 3) via call to setMagneticCardModeEncryption. Once the magnetic card is swiped, the data is made available.

Android

To retrieve an encrypted payload on an Android app, use the AudioReaderManager class to obtain a reference to the AudioReader class. Use this reference to call the getCardData() method. Be sure to set encryption mode to ENCRYPTION_TYPE_IDTECH (int 3) via call to setMagneticCardMode(). Once the magnetic card is swiped, the data is made available.

Sample Payload

The device outputs a hexadecimal encoded payload string:

001B3224002542353431352A2A2A2A2A2A2A2A343434345E544553542F424C554546494E5E323231322A2A2A2A2A2A2A2A2A2A2A2A3F2A3B353431352A2A2A2A2A2A2A2A343434343D323231322A2A2A2A2A2A2A2A2A2A2A2A3F2A5AF652CD2F2EBB404759C0B197EF31AE99BD5887351BC30D07FB1A66B0F3892FBF95CA72A9C7FBFF949835813EEE26D243B14A0CC4A18B06CB21BBA1BC95E0DDE2426BDC0724F96087E3901EF6DA4739EE1CBE8A6C02545944320D218FB458B125BAB6FFD398045FFD6D56B927758D16D6DDE5F9BE68D896BDFC5B43540A9EA30000197136006560000C

This data is parsed as follows:

CharsValueDescription
1-200Card encoding byte; can be ignored
3-41BTrack status. Binary 0001 1011 is interpreted as follow:
Bits 0,1,2 = Track 1 and 2 are sent, Track 3 is not;
Bits 3,4,5 = Track 1 and 2 hashes are sent, Track 3 is not;
Bit 6: 0 = session ID is not included
5-632Unencrypted Track 1 length (50 bytes)
7-824Unencrypted Track 2 length (36 bytes)
9-1000Unencrypted Track 3 length (not present)
11-110254235...2A3F2A

Masked Track 1 data in hexadecimal. The ASCII value is:

%B5415********4444^TEST/BLUEFIN^2212************?*
111-1823B3534...2A3F2A

Masked Track 2 data in hexadecimal. The ASCII value is:

;5415********4444=2212************?*
183-3585AF652...025459

Track 1 and Track 2 encrypted data.

Total length of the Track 1 and Track 2 payloads rounded up to the nearest 8 byte. In this case the payload length is 50+36=86, it is then rounded to 88 bytes.

Decrypted data converted to ASCII is as follows:

%B5415244444444444^TEST/BLUEFIN^2212101123456789??;5415244444444444=2212101123456789?8
359-39844320D...6D56B920 bytes of Track 1 hash (SHA2)
399-43827758D...0A9EA320 bytes of Track 2 hash (SHA2)
439-458000019...60000C10 bytes of Key Sequence Number (KSN)

Did this page help you?