Fixed a type of exception thrown

This commit is contained in:
Kim Laine (HE/HIM) 2022-12-28 10:28:48 -08:00
Родитель 8594903375
Коммит 998c79564b
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -103,7 +103,7 @@ namespace Microsoft.Research.SEAL
/// </remarks>
/// <param name="encrypted">The ciphertext</param>
/// <exception cref="ArgumentNullException">if encrypted is null</exception>
/// <exception cref="ArgumentException">if the scheme is not BFV or BGV</exception>
/// <exception cref="InvalidOperationException">if the scheme is not BFV or BGV</exception>
/// <exception cref="ArgumentException">if encrypted is not valid for the encryption parameters</exception>
/// <exception cref="ArgumentException">if encrypted is in NTT form</exception>
/// <exception cref="ArgumentException">if pool is uninitialized</exception>

Просмотреть файл

@ -78,4 +78,8 @@ SEAL_C_FUNC Decryptor_InvariantNoiseBudget(void *thisptr, void *encrypted, int *
{
return E_INVALIDARG;
}
catch (const logic_error &)
{
return COR_E_INVALIDOPERATION;
}
}

Просмотреть файл

@ -82,9 +82,9 @@ namespace seal
@par Invariant Noise Budget
The invariant noise polynomial of a ciphertext is a rational coefficient
polynomial, such that a ciphertext decrypts correctly as long as the
coefficients of the invariantnoise polynomial are of absolute value less
coefficients of the invariant noise polynomial are of absolute value less
than 1/2. Thus, we call the infinity-norm of the invariant noise polynomial
the invariant noise, and for correct decryption requireit to be less than
the invariant noise, and for correct decryption require it to be less than
1/2. If v denotes the invariant noise, we define the invariant noise budget
as -log2(2v). Thus, the invariant noise budget starts from some initial
value, which depends on the encryption parameters, and decreases when
@ -92,7 +92,7 @@ namespace seal
becomes too noisy to decrypt correctly.
@param[in] encrypted The ciphertext
@throws std::invalid_argument if the scheme is not BFV/BGV
@throws std::logic_error if the scheme is not BFV/BGV
@throws std::invalid_argument if encrypted is not valid for the encryption
parameters
@throws std::invalid_argument if encrypted is in NTT form