Interface DecryptionServer
-
- All Known Implementing Classes:
InMemoryDecryptionServerImpl
,PublicKeyDecryptionServerWrapperImpl
public interface DecryptionServer
TheDecryptionServer
containsCipherVersion
instances assigned to a namespace.Depending on the implementation, the
DecryptionServer
might as well contain a number of public keys (for an asymmetric encryption approach) also assigned to the individual namespaces identifying the owners of the private keys with which it is secure to communicate.The
DecryptionServer
might access persistedCipherVersion
instances. Depending on the implementation, theCipherVersion
instances to be persisted must be encrypted with theDecryptionServer
's public key. AnEncryptionService
having this public key then can do secure persisting.Requesting the
CipherVersion
instances from theDecryptionServer
might then be done by authenticating that the requester is entitled to request the cipher versions by verifying the signature of a requester's message with the public keys by theDecryptionServer
and by encrypting theCipherVersion
instances with that according public key. TheDecryptionServer
itself might use an asymmetric encryption approach to decrypt persistedCipherVersion
instances persisted by the encryption server (and being encrypted by theEncryptionService
).A
DecryptionServer
's wrapper could be hooked on top theDecryptionServer
which uses the private key used for encrypting the ciphers by theEncryptionService
to decrypt the ciphers and encrypts the ciphers again with a public key from a key pair of an accordingDecryptionService
. TheDecryptionService
authenticates itself with a message and a message's signature generated from its according private key. TheDecryptionServer
can validate the signature and use the trusted public key for encryption. By replacing the implementation of theDecryptionServer
, the wayCipherVersion
instances are persisted can be changed easily.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<CipherVersion>
getCipherVersions(java.lang.String aNamespace, java.lang.String aMessage, java.lang.String aSignature)
Returns the currently available cipher versions.
-
-
-
Method Detail
-
getCipherVersions
java.util.List<CipherVersion> getCipherVersions(java.lang.String aNamespace, java.lang.String aMessage, java.lang.String aSignature) throws SignatureVerificationException
Returns the currently available cipher versions. An implementation might just make use of anObjectOutputStream
. Though the stream is encrypted with the public key of the message signer. ------------------------------------------------------------------------- Another approach might not return a stream, it might return a list containing the cipher versions with the ciphers being encrypted by the public key. Or a stream is returned which is not encrypted but the ciphers in the cipher versions carried by the stream. -------------------------------------------------------------------------- Parameters:
aNamespace
- The namespace for which to get the cipher versions.aMessage
- A message to be signed by the requester of the cipher version.aSignature
- The signature of the requester so that the according public key for encryption can be determined and the origin can be verified.- Returns:
- A list as with the currently known cipher versions. The ciphers contained therein might be encrypted!
- Throws:
SignatureVerificationException
- in case verifying the signature for the message failed to to no public key found which successfully verified the signature
-
-