java.lang.Object
net.i2p.router.crypto.ratchet.MuxedEngine

final class MuxedEngineextends Object
Multiplexed decryption engine supporting both ElGamal and ECIES+AEAD with adaptive ordering.
  • Field Details

    • _context

      private final RouterContext _context
      The router context the engine runs in.
    • _log

      private final Log _log
      Logger for this class.
  • Constructor Details

    • MuxedEngine

      public MuxedEngine(RouterContext ctx)
      Create the ratchet engine.
      Parameters:
      ctx - the router context
  • Method Details

    • decrypt

      public CloveSet decrypt(byte[] data, PrivateKey elgKey, PrivateKey ecKey, MuxedSKM keyManager) throws DataFormatException
      Decrypt the message with the given private keys.
      Parameters:
      data - the encrypted CloveSet to decrypt
      elgKey - must be ElG, non-null
      ecKey - must be EC, non-null
      keyManager - holds the session key material and ratchet preference
      Returns:
      decrypted data or null on failure
      Throws:
      DataFormatException - if the underlying garlic parse fails and cannot be recovered by trying the remaining crypto schemes