aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce/mceliece_key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/mce/mceliece_key.cpp')
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index e0f8b4cd6..41392f695 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -139,13 +139,13 @@ bool McEliece_PrivateKey::check_key(RandomNumberGenerator& rng, bool) const
McEliece_Public_Operation pub_op(*this, get_code_length());
secure_vector<byte> plaintext((this->get_message_word_bit_length()+7)/8);
- rng.randomize(&plaintext[0], plaintext.size() - 1);
+ rng.randomize(plaintext.data(), plaintext.size() - 1);
const secure_vector<gf2m> err_pos = create_random_error_positions(this->get_code_length(), this->get_t(), rng);
mceliece_message_parts parts(err_pos, plaintext, this->get_code_length());
secure_vector<byte> message_and_error_input = parts.get_concat();
- secure_vector<byte> ciphertext = pub_op.encrypt(&message_and_error_input[0], message_and_error_input.size(), rng);
- secure_vector<byte> message_and_error_output = priv_op.decrypt(&ciphertext[0], ciphertext.size());
+ secure_vector<byte> ciphertext = pub_op.encrypt(message_and_error_input.data(), message_and_error_input.size(), rng);
+ secure_vector<byte> message_and_error_output = priv_op.decrypt(ciphertext.data(), ciphertext.size());
return (message_and_error_input == message_and_error_output);
}