Skip to main content

Signature commands

Create signature

The request for creating a signature is a HTTP POST which contains a JSON object. The JSON objects consists of the password and the data to be signed (plain text).

For this call the transmitted data to_be_signed is first hashed and afterwards the ECDSA key is applied. According to 1(Ch. 3.1) the hash algorithm suitable for the key length is selected. At the moment an ECDSA P-256 key is used, therefore a SHA-256 hash function will be used, this results in the JWS ES256 algorithm.

The response consists of the signature data as reqired in 1(Ch. 3.4) in the following format.

 signature=Base64( R+ S)where R=first coordinate of ECDSA point S=second coordinate of ECDSA point\begin{aligned} ~signature &= Base64(~R + ~S ) \\ \text{where}~R &= \text{first coordinate of ECDSA point} \\ ~S &= \text{second coordinate of ECDSA point} \end{aligned}

Create signature, pass hash value

This call is similar to the signature creation from chapter Create signature, but instead of the plain text data a hash value is passed. Therefore the client program has to hash the data.

Which hash algorithm must be used depends on the key length of the certificate

and is defined in the table in 1(Ch. 3.1). The key length has to be extracted from the certificate, see chapter Request certificate information.

Create signature, plaintext data

This command is similar to the signature creation in Chapter Create signature, but without the base64 encoding of the plaintext data. For the plaintext value an example is given in Chapter Signatur Plain.

Create signature, JWS

The signature call is a HTTP POST with the contents of a JSON with password and data to be signed.

This call creates the JWS header in accordance with 2(Anlage Z 13), the data supplied will be formated as descripted in 1 and the entire JWS structure with signature will we returned.

Footnotes

  1. Jones, M.: JSON Web Algorithms (JWA). RFC 7518, May 2015. https://tools.ietf.org/html/rfc7518 2 3 4

  2. Bundesministers für Finanzen: Verordnung des Bundesministers für Finanzen über die technischen Einzelheiten für Sicherheitseinrichtungen in den Registrierkassen und andere, der Datensicherheit dienende Maßnahmen ( Registrierkassensicherheitsverordnung, RKSV), 2015