e-invoicing

EDIFACT signature segment reference

Segment-level field definitions and examples for the IDEAL/IDEAL2, GS1AT/GS1AT2, and AECOC/AECOC2 EDIFACT signature profiles supported by TrustWeaver.

Each EDIFACT signature profile uses a set of security segments placed in SG1 (header) and SG54 (trailer) segment groups. The following tables list the field codes, expected values, and an example segment string for each profile.

Note: Everything stated for IDEAL applies equally to IDEAL2, for GS1AT to GS1AT2, and for AECOC to AECOC2. The only difference between each pair is that the "2" variants use the SHA256 signature hash algorithm instead of SHA1.

IDEAL/IDEAL2

SG1/USH Segment (part of header)
Field Description Value
0501 Security service, coded 1
0534 Security reference number Random number
0541 Scope of security application, coded 1
0503 Response type, coded 1
0505 Filter function, coded 5 (EDA)
0507 Original character set encoding, coded 2
0509 Role of security provider, coded 1

S500

0577

Security identification details

Security party qualifier

Empty

S500

0577

Security identification details, security party qualifier Empty
0520 Security sequence number Empty

S501

0517

0338

0314

Security date and time

Date and time qualifier

Event date

Event time

1

CCYYMMDD (in UTC)

HHMMSS (in UTC)

Example: USH+1+657045723+1+1+5+2+1++++1:20090407:091557'

SG1/USA segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

1 (Owner hashing)

Empty

Empty

16 (SHA1)

1 (UN/CEFACT)

Example: USA+1:::16:1'

SG2/USC Segment (part of header)
Field Description Value
0536 Certificate reference Cert serial

S500

0577

0538

0511

Security identification details

Security party qualifier

Key name

Security party identification

4 (Issuer)

Empty

Issuer name

S500

0577

0538

0511

Security identification details

Security party qualifier

Key name

Security party identification

3 (Subject)

Empty

Subject name

Example: USC+01e6f7+4::6UXNIC1NQ1AV0J(0N/2R791.6ZH6TH0ZYBX61GZ8WP6B)F(IF=F4K7E1=6 GQE6E4KJEPIEJMF(5E1WG5CF=KF=FE1(E02EPS4K)F0EE)VFYX4K4DL8E1)GG)F(8E1VFYJ9, ADQ56YR6SR0ZYBX61MX48)6CPEPMFA.DW=F(DFILDL8E0FAO EDRG3SBTJF=F6B16.*3::6UXKMB1NQ1AV0J(0N/2R791.6YB6SB0ZYBX61GZ1=DF(IF=FC4 DDLAE1/4K197350J4UO0J(0N,1T3BTJF=F4K9FCRFICDWW4KKF(IF=FC4DDLAE1/4K19732 .62RB0J(0N.2RH6/07-S73.6Y 7XM6.Y6YZ6SZ0Z.5,7A1XY8Z06706K4L8E1PDL7G52DL26I9F0FFILF/6G5BGBAG5GE1OGG )FYXDW=2N'

SG2/USA Segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

0591

0601

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

Padding mechanism, coded

Padding mechanism, coded list id

Padding mechanism code list id

6 (Owner signing)

16 (DSMR)

1 (UN/CEFACT)

10 (RSA)

1 (UN/CEFACT)

16 (RSASA-PKCS-v1_5)

1 (UN/CEFACT)

Example: USA+6:16:1:10:1:16:1'

SG54/UST segment (part of trailer)
Field Description Value
0534 Security reference number Random number
0588 Number of security segments 6

Example: UST+657045723+6'

SG54/USR segment (part of trailer)
Field Description Value

S508

0563

0560

Validation result

Validation value, qualifier

Validation value

1

Digital signature

Example: USR+1:CJKO5PM.XLG9JBM6XTQB87M4B96FBDK42Y2RFOP05JLFNJT3V9BR=9A/5E9WJG 0UF4JEDF/5L/2GS1P(UI/1VQF0.SG(50PDKOA6KEAH8U,WGLKJD63QJIU-G7ORTT4S 1,4D7V01N8BMXV55EF05X0WQSZE11RFP6ZD7PYR3T.4(0D,ZSS3UJWEXYT)5AF-'

GS1AT/GS1AT2

GS1AT uses the BASE64 filter function (field 0505). The SG2/USA and SG54 segments follow the same structure as IDEAL. The USC segment in GS1AT contains the certificate serial number and issuer DN (both mandatory for certificate lookup).

SG1/USH Segment (part of header)
Field Description Value
0501 Security service, coded 1
0534 Security reference number Random number
0541 Scope of security application, coded 1
0503 Response type, coded Empty
0505 Filter function, coded 7 (BASE64)
0507 Original character set encoding, coded 2
0509 Role of security provider, coded Empty

S500

0577

Security identification details

Security party qualifier

Empty

0520 Security sequence number Empty

S501

0517

0338

0314

Security date and time

Date and time qualifier

Event date

Event time

5

CCYYMMDD (in UTC)

HHMMSS (in UTC)

Example: USH+1+808190276+1++7+2++++5:20110620:115801'

Note: All other USH, USA, UST, and USR segment fields for GS1AT/GS1AT2 match the IDEAL/IDEAL2 structure. See the IDEAL section for field definitions.
SG1/USA Segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

1 (Owner hashing)

Empty

Empty

16 (SHA1)

1 (UN/CEFACT)

Example: USA+1:::16:1'

SG2/USC Segment (part of header)
Field Description Value
0536 Certificate reference Cert serial

S500

0577

0538

0511

0513

Security identification details

Security party qualifier

Key name

Security party identification

Security party code list qualifier

4 (Issuer)

Empty

Issuer name

ZZZ

0545 Certificate syntax and version, coded 3 (X.509)

Example: USC+025040+4::MIGpMQswCQYDVQQGEwJBVDFIMEYGA1UECgw/QS1UcnVzdCBHZXM uIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMSc wJQYDVQQLDB5hLXNpZ24tY29ycG9yYXRlLUxpZ2h0LVRlc3QtMDIxJzAlBgNVBAMMHmEt c2lnbi1jb3Jwb3JhdGUtTGlnaHQtVGVzdC0wMg==:ZZZ+3'

SG2/USA Segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

0591

0601

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

Padding mechanism, coded

Padding mechanism code list id

6 (Owner signing)

16 (DSMR)

1 (UN/CEFACT)

10 (RSA)

1 (UN/CEFACT)

16 (RSASA-PKCS-v1_5)

1 (UN/CEFACT)

Example: USA+6:16:1:10:1:16:1'

SG54/UST Segment (part of trailer)
Field Description Value
0534 Security reference number Random number
0588 Number of security segments 6

Example: UST+657045723+6'

SG54/USR example
Field Description Value

S508

0563

0560

Validation result

Validation value, qualifier

Validation value

1

Digital signature

Example: USR+1:baNPuqcwRar7ESH42NYVh4GD77JqaQlANlOh09yNo/PxylKAG6Aj1RJ927sFcwTeT PhAFhvwM31q?+vHqlQ9cyaZhCjeDoXyhpEpJbrFMrTRTfeZxoKMUkREb68wumAHsQIMR q?+Zk?+AlbsnYcleyeMuhQLb94fL8QIdvGST7jnNE='

AECOC/AECOC2

The AECOC profile uses the EDC filter function and RSA with ISO/IEC 9796-2 scheme 2. The sender and receiver GLN values (from UNB S002/0004 and S003/0010) are required in the SG1/USH segment.

SG1/USH Segment (part of header)
Field Description Value
0501 Security service, coded 1
0534 Security reference number Random number
0541 Scope of security application, coded 2
0503 Response type, coded 1
0505 Filter function, coded 6 (EDC)
0507 Original character set encoding, coded 2
0509 Role of security provider, coded 1

S500

0577

0538

0511

0513

0515

Security identification details

Security party qualifier

Key name

Security party identification

Security party code list qualifier

Security party code list responsible agency, coded

1

Empty

Sender GLN

Empty

9 (EAN)

S500

0577

0538

0511

0513

0515

Security identification details

Security party qualifier

Key name

Security party identification

Security party code list qualifier

Security party code list responsible agency, coded

2

Empty

Receiver GLN

Empty

9 (EAN)

0520 Security sequence number Empty

S501

0517

0338

0314

Security date and time

Date and time qualifier

Event date

Event time

5

CCYYMMDD, (in UTC)

HHMMSS, (in UTC)

Example:USH+1+272455624+2+1+6+2+1+1::7609999000324::9+2::7624400080337::9++5:20100 929:123337'

SG1/USA Segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

1 (Owner signing)

Empty

Empty

16 (SHA1)

1 (UN/CEFACT)

Example: USA+1:::16:1'

SG2/USC Segment (part of header)
Field Description Value
0536 Certificate reference Cert serial

Example: USC+69e4ede4ed9e724699f64d94aec09884'

SG2/USA Segment (part of header)
Field Description Value

S502

0523

0525

0533

0527

0529

0591

0601

Security algorithm

Use of algorithm, coded

Cryptographic mode of operation, coded

Mode of operation code list ID

Algorithm, coded

Algorithm code list identifier

Padding mechanism, coded

Padding mechanism code list id

6 (Owner signing)

16 (DSMR)

1 (UN/CEFACT)

10 (RSA)

1 (UN/CEFACT)

Empty

Empty

S503

0531

0554

Algorithm parameters

Algorithm parameter qualifier

Algorithm parameter value

14 (Modulus length)

Modulus length

S503

0531

0554

Algorithm parameters

Algorithm parameter qualifier

Algorithm parameter value

12 (Modulus)

Value of modulus (EDC encoded)

S503

0531

0554

Algorithm parameters

Algorithm parameter qualifier

Algorithm parameter value

13 (Exponent)

Value of exponent (EDC encoded)

Example: USA+6:16:1:10:1::+14:1024+12:þúÄßzE×ÔØeàGÕÊÖÉ÷jÒÿwÃÁgÎÄTBbÒíê{_fàÏ}òëUowÄ Ü\z\B Ô~ûoâÓÔ~î CElhQnßZàywãÒRBFaiRñÓ÷xÒwÖñiÇmk}î^ÁV÷ÆZçIþWòÄ^íWMôÝS ÃÞÕ{çsãn^|CìÞyÄÏ@JRGT÷èzEUüßæâFç@ÏÍ+13:ðA@A'

SG54/UST Segment (part of trailer)
Field Description Value
0534 Security reference number Random number
0588 Number of security segments 6

Example: UST+272455624+6'

SG54/USR Segment (part of trailer)
Field Description Value

S508

0563

0560

Validation result

Validation value, qualifier

Validation value

1

Digital signature

Example: USR+1:ÎAÈcðo{pfÇèqóý@tÎ\ÎöXifÖXà`JàÊwÚêdcÈëZëéGSÏBRMüÞêÇçNRçMkÇëÔÜõîòAmS ÑzpÍjKqÇawwMîþÏáËÜ{bÕÝFLeÎckÈéÄ_ÉePaåÒ_×QCtGÁ׿ìHò~á]ÙÚÀUÖæýfÝñÉêQoZÚ ýô^ñ^QHîÜàt~'

UNO Package segment header (part of trailer)
Field Description Value

0800

S020

0813

0802

Package reference number

Object identifier

Reference qualifier

Reference identification number

Random number

S021

0805

0809

Object type qualifier

46

EDC

S021

0805

0809

Object type qualifier

62

PKCS7

S022

0810

Object length in bytes PKCS7 object length

The EDC encoded PKCS7 object is located here.

UNP Package segment trailer (part of trailer)
Field Description Value
0810 Object length in bytes PKCS7 object length
0800 Package reference number Random number (same as in UNO/0800)

Examples: UNO+394289049+1:69e4ede4ed9e724699f64d94aec09884+46:EDC+62:PKCS7+1452' ÷pÂDòFIjׯHÆ÷MAGûBàÂDãpÂßDßBAAq@þpKFIjÆH߯÷MAGAàîÂDÇpÂDÃÿpÂCëàCB øABBPiäíRäíÞrFÙöwMÔîÀØÄpýMFIjÆHÆ ÷MAAEE@ßp[qKpIFÞCUDFSBS Eq]p[FC|UDJS TCoBmpany`I@ncorporGatedqmp÷kFCUDCSÀdCompan`y`Incor@poratedÁ`Trust`AServ er`_CAp^WMqÿppyryqrûrsspZWMÿqrpyryqýrtsspZpÿ{qKpIFC|UDFSBUSþqUpSFCUøDJSL ComDpany`In cnqUpSFÞCUDCSLs@ignDomeGsticpÁßþpMFIjÆH߯÷MAAAEÿ@CÁÍ@pÁ ÿÉBÁÁ@úÄúßzE×ÔeàãGÕÊÖÉjÒÞÿwÃÁgÄTyBbÒíê_fìàÏ}òëowÔÄÜ\z\ ÔJ~ûoâÓ~îÐ CElh n߯ZàywãRBÊFaiRñ÷xÎÒwÖñimk_}î^ÁVÆZÞçIþWò^íRWMôÝSÞÕL{çsãn|CøìÞyÄÏJR@GT÷ èzUüTßæâFçÏÍÿBCA@AãÂÿBepÂBap÷NFCU]OAßAÿDDCBDýðpSFCU]ÿeDLpJFHÿkFAEEGCý Ap]FCU]þNDVDTâëhsgÄUTÞõPzkÚFs~ÅÿÀãôàpÂA÷\FCU]`DÿÂASpÂAOÿpÂAKFKjÏÅpLAÆI ÆýnA@pÁûp @FHkFAEþEGBAVthGttpszooDtsodntr@ustweavQerncomo@repositHory oDefDaultnas_pxpÁöFHÿkFAEEGBÿBpÁé^ÁæÕ@U@s@e@ê`@p@e@rÕ@m@i@t@kt @e@d@`Õ@o@n@l@zy@`@f@oÝ@r@o@w@ji@t@h@iß@n@z@`@jS@e@c@u×@ r@e@`@ji@n@t@eÕ@r@n@a@zl@`@s@eÕ@r@v@e@zr@`@c@oÕ@m@m@u@jn@i@c@aÕ@t@i@o@on@s@n@`×@N@o@`@jl@i@a@bÕ@i@l@i@nt@y@npQÿFH kFAEEúGAADEpCßpAFHkFAÿEEGpBÆuGhttpzooPtsncompHanyncomÁotsdevoPdhnashx Ä get}caÀfformatÅ}pempGFÝCU]_D@pÿ~p|àzàxáÆvhttpzäootsncoBmpanyncPomotsd edvodhnasQhx get}HcrlfforHmat}binûp_FCU]cþDXpVÀTÜUáEÄüwoÔráßU~AVàÇãsÒtBp MúFIjÆHÆ÷ÿMAAEE@CùÂAA@mQHmöâfZßuKQéwUÊÒfóêõDúÏÈÉ]GkEóYqáBÛUåôêûT TúáO@xùÉÐçÚF@ëÙYæãTÊqXAÏ÷jÑÊfûóqEtÏWÀQZ×èÙîmöâçtÕÇIvirrÀÃíjüh@åQéÁHfSE `{CÇëõEñäsÎõKïOÕ{oÓbûÞ|^ÄâcÕoAKÖbÿòÃóKæÓÊ}MÓÌUÓa\[ðDC]ÀÃKgBëÃËÖAÌlcneò çmx íLÙÐkv_ÕÁ×àz~Ü~ÏOÂÆZcÇiÁÍuTòûÔJËÑÿxmyîíÛvèÁKâàÔ{ü[`SftkåPtKW\OK{uïÊàQ ÐeaãsWMgðgÀMÑÃpaóéUÀãÙqR×Ò^õFYùðýóWððtq@UNP+1452+394289049'