diff --git a/lib/utils/olm-utils.js b/lib/utils/olm-utils.js --- a/lib/utils/olm-utils.js +++ b/lib/utils/olm-utils.js @@ -8,8 +8,8 @@ } from '../shared/crypto-utils.js'; import { ONE_TIME_KEYS_NUMBER } from '../types/identity-service-types.js'; -const maxPublishedPrekeyAge = 30 * 24 * 60 * 60 * 1000; -const maxOldPrekeyAge = 24 * 60 * 60 * 1000; +const maxPublishedPrekeyAge = 30 * 24 * 60 * 60 * 1000; // 30 days +const maxOldPrekeyAge = 24 * 60 * 60 * 1000; // 24 hours type AccountKeysSet = { +identityKeys: string, diff --git a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp --- a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp +++ b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp @@ -469,8 +469,8 @@ } std::optional CryptoModule::validatePrekey() { - static const uint64_t maxPrekeyPublishTime = 10 * 60; - static const uint64_t maxOldPrekeyAge = 2 * 60; + static const uint64_t maxPrekeyPublishTime = 30 * 24 * 60 * 60; // 30 days + static const uint64_t maxOldPrekeyAge = 24 * 60 * 60; // 24 hours std::optional maybeNewPrekey; bool prekeyDoesntExist = this->prekeyDoesntExist();