If the challenge hasn't yet been set then return false for active value.
2.1. POST /challenge?idCode=38008020211
tests a plaintext andencypted` pair
{
plaintext: kfhdfJHnSHoHdhfrerrw098Hsda, // 32 bytes in base64
encrypted: mmdfs349)3jdskl44Nka98gj68klnbfde4VRer, // AES enc in base64
}
returns
{
plaintext: kfhdfJHnSHoHdhfrerrw098Hsda, // 32 bytes in base64
encrypted: mmdfs349)3jdskl44Nka98gj68klnbfde4VRer, // AES enc in base64
id: 38008020211
}
If the cryptogram is incorrect return 401.
PUT /challenge?idCode=38008020211
{
plaintext: kfhdfJHnSHoHdhfrerrw098Hsda, // 32 bytes in base64
encrypted: mmdfs349)3jdskl44Nka98gj68klnbfde4VRer, // AES enc in base64
newEncrypted: Am6ds249)3jdskl44Nka98gj68klnbfde4VRer, // AES enc in base64
id: 38008020211
}
Changes encrypted value (equivalent of changing password). Doesn't do anything to the keys - so the client would have to resync the keys with the new password.
user stories:
Things on server side
GET /challenge?idCode=38008020211
[protected with ID card / mobileID ] returnsIf the challenge hasn't yet been set then return
false
for active value.2.1.
POST /challenge?idCode=38008020211
tests aplaintext and
encypted` pairreturns
If the cryptogram is incorrect return 401.
PUT /challenge?idCode=38008020211
Changes encrypted value (equivalent of changing password). Doesn't do anything to the keys - so the client would have to resync the keys with the new password.
POST /keys takes encrypted challenge and new keys
returns encrypted keys for that challenge, including new ones