Team,
When decoding the 200-bit FASC-N of the test cards and available documentation, I am finding discrepancies in some of its encoding versus what is actually being observed on real PIV cards in use, specifically related to the Longitudinal Redundancy Character (LRC).
SP 800-73 and several other SP800 documents reference the "Technical Implementation Guidance: Smart Card Enabled Physical Access Control Systems, Version 2.2" (TIG SCEPACS) for the decoding method of the FASC-N.
The 200-bit FASC-N is encoded in BCD 4-Bit Decimal Format with Odd Parity, beginning with a start sentinel, data, end sentinel, and ending with the LRC.
Quick context from the docs: The FASC-N consists of 32 numeric characters of meaningful data. In addition, it contains a single numeric character called the Longitudinal Redundancy Check (LRC) that serves as a means by which a reader can mathematically validate its reading of the preceding data.
The value of each bit in the LRC character, excluding the parity bit, is defined such that the total number of one bits encoded in the corresponding bit location of all characters of the data message, including the start sentinel, field separators, data, end sentinel, and LRC character, shall be even. The LRC parity bit is for the LRC character itself and is calculated as described in the preceding paragraph.
TIG SCEPACS provides an example decode where we see the LRC is 7.
For all 16 of the test cards, the LRC is a number within 0-9 as expected. However, I have encountered 2 PIV/CAC cards in the field where the LRC was 01110, a value that is not in the decoding table. Using BCD, this to my understanding will decode to hex 14, but this does not satisfy the statement that the LRC is a single numeric character.
This is posing a problem because it does not allow for the full 200-bit FASC-N to be stored or decoded under the direction of TIG SCEPACS, and it is unknown if there are other values that could appear in the LRC that could cause unexpected behavior in applications. Does anyone know why this value is unexpectedly being encountered only in real cards and what it should decode to?
TIG SCEPACS was published in 2005 and is one of the oldest still referenced documents in the 201 related collection. Many of the implementations and concepts referenced in it have been fully deprecated. Are there any plans to create an updated revision of that document in the form of a NIST special publication?
Thank You,
Michael Maz
m...@lokiani.com
The sentinel 5 codes are the A-F of the 16 bits.
The LRC has a parity bit for each of the bits in the data. Probably goes back to 60 years before ASCI was invented and using serial comunication.
I go back to using 7 track tapes and paper tape days.