public abstract class OmemoRatchet<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected OmemoManager |
omemoManager |
protected OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> |
store |
Constructor and Description |
---|
OmemoRatchet(OmemoManager omemoManager,
OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> store)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
doubleRatchetDecrypt(OmemoDevice sender,
byte[] encryptedKey)
Decrypt a double-ratchet-encrypted message key.
|
abstract CiphertextTuple |
doubleRatchetEncrypt(OmemoDevice recipient,
byte[] messageKey)
Encrypt a messageKey with the double ratchet session of the recipient.
|
protected final OmemoManager omemoManager
protected final OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> store
public OmemoRatchet(OmemoManager omemoManager, OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> store)
omemoManager
- omemoManagerstore
- omemoStorepublic abstract byte[] doubleRatchetDecrypt(OmemoDevice sender, byte[] encryptedKey) throws CorruptedOmemoKeyException, NoRawSessionException, CryptoFailedException, UntrustedOmemoIdentityException
sender
- sender of the message.encryptedKey
- key encrypted with the ratchet of the sender.CorruptedOmemoKeyException
NoRawSessionException
- when no double ratchet session was found.CryptoFailedException
UntrustedOmemoIdentityException
public abstract CiphertextTuple doubleRatchetEncrypt(OmemoDevice recipient, byte[] messageKey)
recipient
- recipient of the message.messageKey
- key we want to encrypt.