Class LoopbackDecryptionService

java.lang.Object
org.refcodes.forwardsecrecy.AbstractDecryptionService
org.refcodes.forwardsecrecy.LoopbackDecryptionService
All Implemented Interfaces:
DecryptionService

@Deprecated public class LoopbackDecryptionService extends AbstractDecryptionService
Deprecated.
To prevent accidental use in productive environment this insecure implementation of the DecryptionService has been marked as being deprecated; please use only for testing purposes.
The LoopbackDecryptionService is an UNSECURE implementation of the DecryptionService managing the ciphers in the CipherVersion in plan text. This implementation's mere purpose is to provide means to easily set up a quick and dirty test setup. The LoopbackDecryptionService is the counterpart of the LoopbackEncryptionService which both work (insecurely) hand in hand.

The LoopbackDecryptionService must not be used in production environments!

  • Constructor Details

    • LoopbackDecryptionService

      @Deprecated public LoopbackDecryptionService(String aNamespace, InMemoryDecryptionServer aDecryptionServer)
      Deprecated.
      To prevent accidental use in productive environment this insecure implementation of the DecryptionService has been marked as being deprecated; please use only for testing purposes.
    • LoopbackDecryptionService

      @Deprecated public LoopbackDecryptionService(String aNamespace, InMemoryDecryptionServer aDecryptionServer, long aCipherVersionsExpireTimeMillis)
      Deprecated.
      To prevent accidental use in productive environment this insecure implementation of the DecryptionService has been marked as being deprecated; please use only for testing purposes.
      Parameters:
      aCipherVersionsExpireTimeMillis - The time in milliseconds after which them loaded cipher versions expire and are reloaded. A value of 0 indicates that them cipher versions expire immediately (default). A value of -1 indicate that them cipher versions expire never.
  • Method Details

    • toSignature

      protected String toSignature(String aMessage)
      Deprecated.
      Creates a signature for the given message.
      Specified by:
      toSignature in class AbstractDecryptionService
      Parameters:
      aMessage - The message for which a signature is to be generated
      Returns:
      The signature for the message
    • createMessage

      protected String createMessage()
      Deprecated.
      Creates a message for which a signature is to be created in order to authenticate for the retrieval of the cipher versions. A decryption server should deny any requests to get cipher versions in case the same message is used twice.
      Specified by:
      createMessage in class AbstractDecryptionService
      Returns:
      The message
    • toDecryptedCipherVersion

      @Deprecated protected <CV extends CipherVersion> CV toDecryptedCipherVersion(CV aEncryptedCipherVersion)
      Deprecated.
      To prevent accidental use in productive environment this insecure implementation of the DecryptionService has been marked as being deprecated; please use only for testing purposes.
      Hook factory method to be implemented by subclasses. The provided cipher is to be decrypted (e.g. with the private key of an asymmetric encryption approach) so that an decryption server only receives encrypted data. CAUTION: The encrypted CipherVersion argument is returned unmodified (not decrypted!). Please overwrite this method with a decrypting one!
      Specified by:
      toDecryptedCipherVersion in class AbstractDecryptionService
      Type Parameters:
      CV - The type of the CipherVersion to be used.
      Parameters:
      aEncryptedCipherVersion - The CipherVersion to be decrypted.
      Returns:
      The decrypted CipherVersion.