SpatiumCrypto
open class SpatiumCrypto(val cache: StorageDriver, val storage: StorageDriver) : Crypto
SpatiumCrypto Конструктор
Построен на Storage Drivers и независимых от состояний MPC алгоритмах, тем самым полностью инкапсулирует хранилище данных внутри MPC алгоритмов.
Построен на Storage Drivers и независимых от состояний MPC алгоритмах, тем самым полностью инкапсулирует хранилище данных внутри MPC алгоритмов.
SpatiumCrypto выступает в качестве программного CryptoDriver, имплементируя MPC алгоритмы к локально сохраненным данным. Подходит для использования в рамках SpatiumProtocol, для кейсов, в которых runtime security не требуется или невозможна.
Параметры
androidJvm
cache | временное хранилище для содержания промежуточных данных в ходе выполнения MPC процедуры |
storage | постоянное хранилище для сохранения долгосрочных данных, таких как секреты, данные синхронизации и т.д. |
Конструкторы
SpatiumCrypto | [androidJvm] constructor(cache: StorageDriver, storage: StorageDriver) |
Свойства
Имя | Описание |
---|---|
cache | [androidJvm] val cache: StorageDriver |
storage | [androidJvm] val storage: StorageDriver |
Функции
Имя | Описание |
---|---|
checkSecret | [androidJvm] open suspend override fun checkSecret(secretId: String): Boolean Проверяет занят ли текущий secretId |
createDistributedEcdsaKey | [androidJvm] open suspend override fun createDistributedEcdsaKey(syncSessionId: String, keyDecommitment: String) |
createDistributedEddsaKey | [androidJvm] open suspend override fun createDistributedEddsaKey(syncSessionId: String, keyDecommitment: String): String |
createEcdsaChallangeResponseDecommitment | [androidJvm] open suspend override fun createEcdsaChallangeResponseDecommitment(syncSessionId: String, challengeDecommitment: String): String |
createEcdsaChallengeCommitment | [androidJvm] open suspend override fun createEcdsaChallengeCommitment(syncSessionId: String): String |
createEcdsaChallengeDecommitment | [androidJvm] open suspend override fun createEcdsaChallengeDecommitment(syncSessionId: String, challengeResponseCommitment: String): String |
createEcdsaChallengeResponseCommitment | [androidJvm] open suspend override fun createEcdsaChallengeResponseCommitment(syncSessionId: String, challengeCommitment: String): String |
createEcdsaKeyCommitment | [androidJvm] open suspend override fun createEcdsaKeyCommitment(secretId: String, syncSessionId: String, curve: EcdsaCurve, derivationCoin: UInt, derivationAccount: UInt): String |
createEcdsaKeyDecommitment | [androidJvm] open suspend override fun createEcdsaKeyDecommitment(syncSessionId: String, keyGenerationDataProof: String): String |
createEcdsaKeyGenerationDataProof | [androidJvm] open suspend override fun createEcdsaKeyGenerationDataProof(secretId: String, syncSessionId: String, curve: EcdsaCurve, derivationCoin: UInt, derivationAccount: UInt, keyCommitment: String): String |
createEcdsaPartialSignature | [androidJvm] open suspend override fun createEcdsaPartialSignature(signSessionId: String, signingKeyDecommitment: String): String |
createEcdsaSignature | [androidJvm] open suspend override fun createEcdsaSignature(signSessionId: String, partialSignature: String): EcdsaSignature |
createEcdsaSigningKeyCommitment | [androidJvm] open suspend override fun createEcdsaSigningKeyCommitment(secretId: String, syncSessionId: String, signSessionId: String, message: String): String |
createEcdsaSigningKeyDecommitment | [androidJvm] open suspend override fun createEcdsaSigningKeyDecommitment(signSessionId: String, signingKeyGenerationDataProof: String): String |
createEcdsaSigningKeyGenerationDataProof | [androidJvm] open suspend override fun createEcdsaSigningKeyGenerationDataProof(secretId: String, syncSessionId: String, signSessionId: String, message: String, signingKeyCommitment: String): String |
createEddsaKeyCommitment | [androidJvm] open suspend override fun createEddsaKeyCommitment(secretId: String, syncSessionId: String, curve: EddsaCurve, derivationCoin: UInt, derivationAccount: UInt): String |
createEddsaKeyDecommitment | [androidJvm] open suspend override fun createEddsaKeyDecommitment(syncSessionId: String, keyGenerationDataProof: String): Pair<String, String> |
createEddsaKeyGenerationDataProof | [androidJvm] open suspend override fun createEddsaKeyGenerationDataProof(secretId: String, syncSessionId: String, curve: EddsaCurve, derivationCoin: UInt, derivationAccount: UInt, keyCommitment: String): String |
createEddsaPartialSignature | [androidJvm] open suspend override fun createEddsaPartialSignature(signSessionId: String, signingKeyDecommitment: String): String |
createEddsaSignature | [androidJvm] open suspend override fun createEddsaSignature(signSessionId: String, partialSignature: String): EddsaSignature |
createEddsaSigningKeyCommitment | [androidJvm] open suspend override fun createEddsaSigningKeyCommitment(secretId: String, syncSessionId: String, signSessionId: String, message: String): String |
createEddsaSigningKeyDecommitment | [androidJvm] open suspend override fun createEddsaSigningKeyDecommitment(signSessionId: String, signingKeyGenerationDataProof: String): String |
createEddsaSigningKeyGenerationDataProof | [androidJvm] open suspend override fun createEddsaSigningKeyGenerationDataProof(secretId: String, syncSessionId: String, signSessionId: String, message: String, signingKeyCommitment: String): String |
exportSecret | [androidJvm] open suspend override fun exportSecret(secretId: String): String? Экспортирует сохраненный секрет как строку |
generateSecret | [androidJvm] open suspend override fun generateSecret(secretId: String) Генерирует новый случайный секрет под данным secretId |
getCompoundEcdsaPublicKey | [androidJvm] open suspend override fun getCompoundEcdsaPublicKey(secretId: String, syncSessionId: String): String |
getCompoundEddsaPublicKey | [androidJvm] open suspend override fun getCompoundEddsaPublicKey(secretId: String, syncSessionId: String): String |
importSecret | [androidJvm] open suspend override fun importSecret(secretId: String, secret: String) Импортирует существующий секрет под определенным secretId |
removeDistributedEcdsaKey | [androidJvm] open suspend override fun removeDistributedEcdsaKey(secretId: String, syncSessionId: String) |
removeDistributedEddsaKey | [androidJvm] open suspend override fun removeDistributedEddsaKey(secretId: String, syncSessionId: String) |
removeSecret | [androidJvm] open suspend override fun removeSecret(secretId: String) Удаляет сохраненный секрет из хранилища |
verifyEcdsaChallengeResponseDecommitment | [androidJvm] open suspend override fun verifyEcdsaChallengeResponseDecommitment(syncSessionId: String, challengeResponseDecommitment: String): String |