Skip to content

Commit

Permalink
Faster validity checks in evaluator for _plain operations' plaintext
Browse files Browse the repository at this point in the history
inputs
  • Loading branch information
kimlaine committed Nov 28, 2019
1 parent b2759db commit 9fc376c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/src/seal/evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ namespace seal
{
throw invalid_argument("encrypted is not valid for encryption parameters");
}
if (!is_valid_for(plain, context_))
if (!is_metadata_valid_for(plain, context_) || !is_buffer_valid(plain))
{
throw invalid_argument("plain is not valid for encryption parameters");
}
Expand Down Expand Up @@ -1784,7 +1784,7 @@ namespace seal
{
throw invalid_argument("encrypted is not valid for encryption parameters");
}
if (!is_valid_for(plain, context_))
if (!is_metadata_valid_for(plain, context_) || !is_buffer_valid(plain))
{
throw invalid_argument("plain is not valid for encryption parameters");
}
Expand Down Expand Up @@ -1864,7 +1864,7 @@ namespace seal
{
throw invalid_argument("encrypted is not valid for encryption parameters");
}
if (!is_valid_for(plain, context_))
if (!is_metadata_valid_for(plain, context_) || !is_buffer_valid(plain))
{
throw invalid_argument("plain is not valid for encryption parameters");
}
Expand Down

0 comments on commit 9fc376c

Please sign in to comment.