Class SharedKeyResealingSession

java.lang.Object
com.yahoo.security.SharedKeyResealingSession

public class SharedKeyResealingSession extends Object

Delegated resealing protocol for getting access to a shared secret key of a token whose private key we do not possess.

The primary benefit of the interactive resealing protocol is that none of the data exchanged can reveal anything about the underlying sealed secret itself.

Note that neither resealing requests nor responses are authenticated (this is a property inherited from the sealed shared key tokens themselves). It is assumed that an attacker can observe all requests and responses in transit, but cannot modify them.

Protocol details

Decryptor (requester):

  1. Create a resealing session instance that maintains an ephemeral X25519 key pair that is valid only for the lifetime of the session.
  2. Create a resealing request for a token T. The session emits a Base62-encoded binary representation of the tuple <ephemeral public key, T>.
  3. Send the request to the private key holder. The session must be kept alive until the response is received, or the ephemeral private key associated with the public key will be irrevocably lost.

Private key holder (re-sealer):

  1. Decode Base62-encoded request into tuple <ephemeral public key, T>.
  2. Look up the correct private key from the key ID contained in token T.
  3. Reseal token T for the requested ephemeral public key using the correct private key.
  4. Return resealed token TR to requester.

Decryptor (requester):

  1. Decrypt token TR using ephemeral private key.
  2. Use secret key in token to decrypt the payload protected by original token T.
Author:
vekterli