|
libkazv
|
#include <sas-desc.hpp>
Classes | |
| struct | Private |
Public Member Functions | |
| SasDesc () | |
| Construct an invalid SAS description. | |
| SasDesc (RandomTag, RandomData r) | |
| Construct a random SAS description. | |
| SasDesc (SasDesc &&that) | |
| SasDesc & | operator= (SasDesc &&that) |
| ~SasDesc () | |
| void | emplace (RandomTag, RandomData r) |
| Replace this with a random SAS description. | |
| bool | valid () const |
| std::string | publicKey () const |
| void | setTheirKey (std::string theirPublicKey) |
| Set the key of the other party. | |
| std::pair< immer::array< int >, immer::array< int > > | getDisplayCodesCurve25519HkdfSha256 (std::string starterUserId, std::string starterDeviceId, std::string starterKey, std::string accepterUserId, std::string accepterDeviceId, std::string accepterKey, std::string txnId) const |
| std::string | getKeyMacHkdfHMacSha256V2 (std::string key, std::string ourUserId, std::string ourDeviceId, std::string theirUserId, std::string theirDeviceId, std::string txnId, std::string keyId) const |
| Get the mac for a key using hkdf-hmac-sha256.v2. | |
| bool | verifyKeyMacHkdfHMacSha256V2 (std::string mac, std::string key, std::string ourUserId, std::string ourDeviceId, std::string theirUserId, std::string theirDeviceId, std::string txnId, std::string keyId) const |
| std::string | getKeyListMacHkdfHMacSha256V2 (std::set< std::string > keyList, std::string ourUserId, std::string ourDeviceId, std::string theirUserId, std::string theirDeviceId, std::string txnId) const |
| Get the mac for a key list using hkdf-hmac-sha256.v2. | |
| bool | verifyKeyListMacHkdfHMacSha256V2 (std::string mac, std::set< std::string > keyList, std::string ourUserId, std::string ourDeviceId, std::string theirUserId, std::string theirDeviceId, std::string txnId) const |
Static Public Member Functions | |
| static std::size_t | constructRandomSize () |
| Kazv::SasDesc::SasDesc | ( | ) |
Construct an invalid SAS description.
| Kazv::SasDesc::SasDesc | ( | RandomTag | , |
| RandomData | r | ||
| ) |
Construct a random SAS description.
|
default |
|
default |
|
static |
| void Kazv::SasDesc::emplace | ( | RandomTag | , |
| RandomData | r | ||
| ) |
Replace this with a random SAS description.
| std::pair< immer::array< int >, immer::array< int > > Kazv::SasDesc::getDisplayCodesCurve25519HkdfSha256 | ( | std::string | starterUserId, |
| std::string | starterDeviceId, | ||
| std::string | starterKey, | ||
| std::string | accepterUserId, | ||
| std::string | accepterDeviceId, | ||
| std::string | accepterKey, | ||
| std::string | txnId | ||
| ) | const |
| std::string Kazv::SasDesc::getKeyListMacHkdfHMacSha256V2 | ( | std::set< std::string > | keyList, |
| std::string | ourUserId, | ||
| std::string | ourDeviceId, | ||
| std::string | theirUserId, | ||
| std::string | theirDeviceId, | ||
| std::string | txnId | ||
| ) | const |
Get the mac for a key list using hkdf-hmac-sha256.v2.
| keyList | A set containing the key ids. |
| std::string Kazv::SasDesc::getKeyMacHkdfHMacSha256V2 | ( | std::string | key, |
| std::string | ourUserId, | ||
| std::string | ourDeviceId, | ||
| std::string | theirUserId, | ||
| std::string | theirDeviceId, | ||
| std::string | txnId, | ||
| std::string | keyId | ||
| ) | const |
Get the mac for a key using hkdf-hmac-sha256.v2.
| key | The unpadded base64-encoded public key. |
| keyId | The key id for the key. |
| std::string Kazv::SasDesc::publicKey | ( | ) | const |
| void Kazv::SasDesc::setTheirKey | ( | std::string | theirPublicKey | ) |
Set the key of the other party.
| bool Kazv::SasDesc::valid | ( | ) | const |
| bool Kazv::SasDesc::verifyKeyListMacHkdfHMacSha256V2 | ( | std::string | mac, |
| std::set< std::string > | keyList, | ||
| std::string | ourUserId, | ||
| std::string | ourDeviceId, | ||
| std::string | theirUserId, | ||
| std::string | theirDeviceId, | ||
| std::string | txnId | ||
| ) | const |
| bool Kazv::SasDesc::verifyKeyMacHkdfHMacSha256V2 | ( | std::string | mac, |
| std::string | key, | ||
| std::string | ourUserId, | ||
| std::string | ourDeviceId, | ||
| std::string | theirUserId, | ||
| std::string | theirDeviceId, | ||
| std::string | txnId, | ||
| std::string | keyId | ||
| ) | const |