19 #ifndef ASYLO_IDENTITY_SEALING_SECRET_SEALER_H_ 20 #define ASYLO_IDENTITY_SEALING_SECRET_SEALER_H_ 26 #include "asylo/crypto/util/byte_container_view.h" 27 #include "asylo/identity/identity.pb.h" 28 #include "asylo/identity/sealing/sealed_secret.pb.h" 29 #include "asylo/platform/common/static_map.h" 30 #include "asylo/util/cleansing_types.h" 31 #include "asylo/util/status.h" 32 #include "asylo/util/statusor.h" 49 virtual std::string
RootName()
const = 0;
150 struct Namer<SecretSealer> {
152 return SecretSealer::GenerateSealerId(sealer.RootType(), sealer.RootName())
157 DEFINE_STATIC_MAP_OF_BASE_TYPE(SecretSealerMap, SecretSealer)
virtual ~SecretSealer()=default
virtual Status Unseal(const SealedSecret &sealed_secret, CleansingVector< uint8_t > *secret)=0
Unseals the sealed_secret and writes it to secret.
virtual StatusOr< size_t > MaxMessageSize(const SealedSecretHeader &header) const =0
Gets the maximum message size (in bytes) that can be sealed according to the cipher-suite configurati...
virtual Status Seal(const SealedSecretHeader &header, ByteContainerView additional_authenticated_data, ByteContainerView secret, SealedSecret *sealed_secret)=0
Seals the input per the header specification.
virtual std::string RootName() const =0
Gets the sealing root name of this SecretSealer.
virtual std::vector< EnclaveIdentityExpectation > RootAcl() const =0
Gets the sealing root ACL of this SecretSealer.
virtual StatusOr< uint64_t > MaxSealedMessages(const SealedSecretHeader &header) const =0
Gets the maximum number of messages that can safely be sealed according to the cipher-suite configura...
Definition: secret_sealer.h:36
virtual Status SetDefaultHeader(SealedSecretHeader *header) const =0
Generates the default sealed-secret header based on the configuration of the SecretSealer and writes ...
virtual SealingRootType RootType() const =0
Gets the sealing root type of this SecretSealer.
virtual Status Reseal(const SealedSecret &old_sealed_secret, const SealedSecretHeader &new_header, SealedSecret *new_sealed_secret)
Re-seals an already sealed secret to a new header.
static StatusOr< std::string > GenerateSealerId(SealingRootType type, const std::string &name)
Combines the specified sealing root type and sealing root name to form a string.