Skip to main content

Encryption of identity record

The signed ident record must be encrypted before being sent to the A-Trust web service.

To do this, the ident record is encrypted with an AES 256 key (algorithm: Galois/Counter Mode (GCM) 1 ), and this AES key is then further encrypted with the public RSA key of the A-Trust service (see 2). The result of the encryption is two binary blocks: the encrypted identity verification and the encrypted AES 256 key. These data are concatenated, first the encrypted identity verification and then the encrypted AES key.

Process:

  • Generate a new random AES256 key. A separate key must be used for each ident record.
  • Encrypt the signed ident record using AES256/GCM. (UTF-8 representation of the ident record)
    • Algorithm: AES256/GCM
    • IV: Byte array of length 16 filled with 0x00
    • The MAC generated by the GCM algorithm is appended to the encrypted block (default behavior)
  • Encrypting the AES256 key with the public RSA key (RSA-OAEP) of A-Trust
  • The encrypted ident record and the AES encryption are combined. Due to the key length of the RSA key, the data can be separated.

Footnotes

  1. Wikipedia: Galois/Counter Mode - Wikipedia, The Free Encyclopedia, 2016. https://de.wikipedia.org/wiki/Galois/Counter_Mode

  2. Wikipedia: Hybride Verschlüsselung - Wikipedia, The Free Encyclopedia, 2016. https://de.wikipedia.org/wiki/Hybride_Verschl%C3%BCsselung