KDE PIM/KItinerary/SNCF Barcodes

From KDE Community Wiki
Revision as of 20:14, 25 December 2021 by Vkrause (talk | contribs) (→‎Layout)

SNCF Tickets

General Observations

  • Aztec code on SNCF tickets, PDF417 code on printed SNCF tickets
  • fixed size, 132 ASCII characters
  • can contain one or two legs
  • has large similarities with what is described in "European Union Agency For Railways - Technical Document - Digital Security Elements For Rail Passenger Ticketing - TAP TSI TD B.12 - §8 ELB - Element List Barcode"

Layout

Offset Size Content Type Meaning Notes
0 4 'i0CV' or 'i1CV' constant the second version so far only seen on paper tickets
4 6 alpha-numeric PNR
10 9 numeric document id / e-ticket number
19 4 '1211' constant
23 10 dd'/'MM'/'yyyy traveller birth date
33 5 SNCF station id departure station first leg
38 5 SNCF station id arrival station first leg
43 5 numeric train number first leg
48 5 dd'/'MM travel date
53 19 numeric cliend id
72 19 string traveler last name blank padded, uppercase, right aligned (PDF) or left aligned (paper tickets)
91 19 string travel first name blank padded, uppercase, right aligned (PDF) or left aligned (paper tickets)
110 1 '1' or '2' class first leg
111 4 alpha-numeric tariff/price code can be blank, presumably for non-discounted tickets
115 1 '0', '1' or '2' class second leg '0' if single leg
116 5 SNCF station id departure station second leg blank if single leg
121 5 SNCF station id arrival station second leg blank if single leg
126 5 numeric train number second leg '00000' if single leg

SNCF Secutix Tickets

General Observations

  • Aztec code
  • found on some SNCF PDF tickets and in the app
  • fixed size, 686 byte, mix of byte-aligned binary blob and ASCII content

Layout

Offset Size Content Type Meaning Notes
0 4 '2200' constant
4 256 binary signature? seems largely random
260 4 '00T1' constant
264 4 number UIC issuer or operator code '0087' for SNCF
268 9 number ticket number
277 5 SNCF station id departure station
282 5 SNCF station id arrival station
287 5 SNCF station id or blank ???
292 50 blank
342 1 'S' constant
343 8 ddMMyyyy travel date
351 1 number class?
352 4 alpha-numeric tariff/price code
356 20 free text? tariff/price info?
376 19 string traveler last name left aligned, blank padded, uppercase
395 19 string traveler first name light aligned, blank padded, uppercase
414 8 ddMMyyyy traveler birth date
422 10 'ADULTE' or 'ENFANTE' traveler type 1
432 2 number traveler type quantity 1 zero-padded
434 10 'ADULTE'/'ENFANTE' or blank traveler type 2 blank if not present
444 2 number traveler type quantity 2 zero-padded, '00' if not present
446 8 ddMMyyyy travel date? again?
454 8 ddMMyyyy travel date? again??
462 12 '0' constant
474 12 ddMMyyyyhhmm purchase date/time
486 10 number price zero-padded, in Cent
496 190 text free text? blank-padded, right aligned

Ouigo Tickets

  • 174 bytes of a base64-like looking string, but apparently not valid base64
  • seems largely random even for closely adjacent tickets, so possibly encrypted or just a token?