Class SignalOmemoRatchet

java.lang.Object
org.jivesoftware.smackx.omemo.OmemoRatchet<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
org.jivesoftware.smackx.omemo.signal.SignalOmemoRatchet

public class SignalOmemoRatchet extends OmemoRatchet<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
  • Method Details

    • doubleRatchetDecrypt

      Description copied from class: OmemoRatchet
      Decrypt a double-ratchet-encrypted message key.
      Specified by:
      doubleRatchetDecrypt in class OmemoRatchet<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
      Parameters:
      sender - sender of the message.
      encryptedKey - key encrypted with the ratchet of the sender.
      Returns:
      decrypted message key.
      Throws:
      CorruptedOmemoKeyException - if the OMEMO key is corrupted.
      NoRawSessionException - when no double ratchet session was found.
      CryptoFailedException - if the OMEMO cryptography failed.
      UntrustedOmemoIdentityException - if the OMEMO identity is not trusted.
      IOException - if an I/O error occurred.
    • doubleRatchetEncrypt

      public CiphertextTuple doubleRatchetEncrypt(OmemoDevice recipient, byte[] messageKey)
      Description copied from class: OmemoRatchet
      Encrypt a messageKey with the double ratchet session of the recipient.
      Specified by:
      doubleRatchetEncrypt in class OmemoRatchet<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
      Parameters:
      recipient - recipient of the message.
      messageKey - key we want to encrypt.
      Returns:
      encrypted message key.