c

com.digitalasset.canton.store

SessionKeyStoreWithInMemoryCache

final class SessionKeyStoreWithInMemoryCache extends SessionKeyStore with ConfirmationRequestSessionKeyStore

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SessionKeyStoreWithInMemoryCache
  2. ConfirmationRequestSessionKeyStore
  3. SessionKeyStore
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SessionKeyStoreWithInMemoryCache(sessionKeysCacheConfig: SessionEncryptionKeyCacheConfig)(implicit executionContext: ExecutionContext)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def convertStore(implicit executionContext: ExecutionContext): ConfirmationRequestSessionKeyStore

    If the session store is set, we use it to store our session keys and reuse them across transactions.

    If the session store is set, we use it to store our session keys and reuse them across transactions. Otherwise, if the 'global' session store is disabled, we create a local cache that is valid only for a single transaction.

    Definition Classes
    SessionKeyStore
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def getSessionKeyInfoIfPresent(recipients: RecipientGroup): Option[SessionKeyInfo]
    Attributes
    protected[canton]
    Definition Classes
    ConfirmationRequestSessionKeyStore
    Annotations
    @VisibleForTesting()
  11. def getSessionKeyRandomness(privateCrypto: CryptoPrivateApi, keySizeInBytes: Int, encryptedRandomness: AsymmetricEncrypted[SecureRandomness])(implicit tc: TraceContext, ec: ExecutionContext): EitherT[FutureUnlessShutdown, DecryptionError, SecureRandomness]
  12. def getSessionKeyRandomnessIfPresent(encryptedRandomness: AsymmetricEncrypted[SecureRandomness]): Option[SecureRandomness]
    Attributes
    protected[canton]
    Definition Classes
    ConfirmationRequestSessionKeyStore
  13. def getSessionKeysInfoIfPresent(recipients: Seq[RecipientGroup]): Map[RecipientGroup, SessionKeyInfo]
    Attributes
    protected[canton]
    Definition Classes
    ConfirmationRequestSessionKeyStore
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. def saveSessionKeysInfo(toSave: Map[RecipientGroup, SessionKeyInfo]): Unit
    Attributes
    protected[canton]
    Definition Classes
    ConfirmationRequestSessionKeyStore
  20. lazy val sessionKeysCacheReceiver: Cache[AsymmetricEncrypted[SecureRandomness], SecureRandomness]

    This cache keeps track of the matching encrypted randomness for the session keys and their correspondent unencrypted value.

    This cache keeps track of the matching encrypted randomness for the session keys and their correspondent unencrypted value. This way we can save on the amount of asymmetric decryption operations.

    Attributes
    protected
    Definition Classes
    SessionKeyStoreWithInMemoryCacheConfirmationRequestSessionKeyStore
  21. lazy val sessionKeysCacheSender: Cache[RecipientGroup, SessionKeyInfo]

    This cache keeps track of the session key information for each recipient tree, which is then used to encrypt the view messages.

    This cache keeps track of the session key information for each recipient tree, which is then used to encrypt the view messages.

    This cache may create interesting eviction strategies during a key roll of a recipient. Whether a key is considered revoked or not depends on the snapshot we're picking.

    So, consider two concurrent transaction submissions:

    • tx1 and tx2 pick a snapshot where the key is still valid
    • tx3 and tx4 pick a snapshot where the key is invalid

    However, due to concurrency, they interleave for the encrypted view message factory as tx1, tx3, tx2, tx4

    • tx1 populates the cache for the recipients' tree with a new session key;
    • tx3 notices that the key is no longer valid, produces a new session key and replaces the old one;
    • tx2 finds the session key from tx3, but considers it invalid because the key is not active. So create a new session key and evict the old on;
    • tx4 installs again a new session key

    Since key rolls are rare and everything still remains consistent we accept this as an expected behavior.

    Attributes
    protected
    Definition Classes
    SessionKeyStoreWithInMemoryCacheConfirmationRequestSessionKeyStore
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from SessionKeyStore

Inherited from AnyRef

Inherited from Any

Ungrouped