During contact, the Sharer learns the publicEncryptionKey and publicEncryptionKeyId of the Helper. From the information in the QR code, the Sharer creates a DeRecIdentity helperId and uses that helperId as a parameter to the addHelpers() API. Currently, the DeRecIdentity only stores the publicEncryptionKey, but not the publicEncryptionKeyId, which the library needs to use for prepending any subsequent message.
It makes the most sense to store this publicEncryptionKeyId along with the publicEncryptionKey (see issue #29) in the DeRecIdentity after establishing contact.
Solution
Add private int publicEncryptionKeyId as a class variable to DeRecIdentity.java. The constructor and getters were changed to accommodate the addition of publicEncryptionKeyId in the DeRecIdentity class.
Problem
During contact, the Sharer learns the
publicEncryptionKey
andpublicEncryptionKeyId
of the Helper. From the information in the QR code, the Sharer creates aDeRecIdentity helperId
and uses thathelperId
as a parameter to theaddHelpers()
API. Currently, theDeRecIdentity
only stores thepublicEncryptionKey
, but not thepublicEncryptionKeyId
, which the library needs to use for prepending any subsequent message.It makes the most sense to store this
publicEncryptionKeyId
along with thepublicEncryptionKey
(see issue #29) in theDeRecIdentity
after establishing contact.Solution
Add
private int publicEncryptionKeyId
as a class variable to DeRecIdentity.java. The constructor and getters were changed to accommodate the addition ofpublicEncryptionKeyId
in the DeRecIdentity class.