You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the function com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper.ensureSessionEncryption assumes that if it's a reverse engagement, then it received a SessionData message without checking and returns early.
However this logic is wrong in the case where the EReader chose a initial curve type different from the EDevice curve type.
Draft ISO 18013-7, section A.7 Session Encryption point 2 specifies that if the EDevice key curve type in DeviceEngagement message is different from the EReader curve type in ReaderEngagementMessage, then the EReader should generate a new key-pair with the same curve as the EDevice key and send a SessionEstablishment message with the new public key and the request. Otherwise it should send a SessionData message with only the request.
I'm preparing a PR to fix this behavior.
The text was updated successfully, but these errors were encountered:
nicklaswj
pushed a commit
to nicklaswj/identity-credential
that referenced
this issue
Jan 24, 2024
In the context of reverse engagement, check whether the EReader sent a SessionEstablisment
message or a SessionData message. If the EReader sent a SessionEstablishment message, use the
public key in the message instead of the initial public key in the ReaderEngagement message.
In the context of reverse engagement, check whether the EReader sent a SessionEstablisment
message or a SessionData message. If the EReader sent a SessionEstablishment message, use the
public key in the message instead of the initial public key in the ReaderEngagement message.
Signed-off-by: Nicklas Warming Jacobsen <[email protected]>
Currently the function
com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper.ensureSessionEncryption
assumes that if it's a reverse engagement, then it received aSessionData
message without checking and returns early.However this logic is wrong in the case where the EReader chose a initial curve type different from the EDevice curve type.
Draft ISO 18013-7, section A.7 Session Encryption point 2 specifies that if the EDevice key curve type in
DeviceEngagement
message is different from the EReader curve type inReaderEngagementMessage
, then the EReader should generate a new key-pair with the same curve as the EDevice key and send aSessionEstablishment
message with the new public key and the request. Otherwise it should send aSessionData
message with only the request.I'm preparing a PR to fix this behavior.
The text was updated successfully, but these errors were encountered: