diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/pubkey/dsa/dsa.cpp | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff) |
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
Diffstat (limited to 'src/lib/pubkey/dsa/dsa.cpp')
-rw-r--r-- | src/lib/pubkey/dsa/dsa.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp index f6c5989db..c419eec97 100644 --- a/src/lib/pubkey/dsa/dsa.cpp +++ b/src/lib/pubkey/dsa/dsa.cpp @@ -50,7 +50,7 @@ DSA_PrivateKey::DSA_PrivateKey(RandomNumberGenerator& rng, } DSA_PrivateKey::DSA_PrivateKey(const AlgorithmIdentifier& alg_id, - const secure_vector<byte>& key_bits) : + const secure_vector<uint8_t>& key_bits) : DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_57) { m_y = power_mod(group_g(), m_x, group_p()); @@ -90,7 +90,7 @@ class DSA_Signature_Operation : public PK_Ops::Signature_with_EMSA size_t max_input_bits() const override { return m_q.bits(); } - secure_vector<byte> raw_sign(const byte msg[], size_t msg_len, + secure_vector<uint8_t> raw_sign(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) override; private: const BigInt& m_q; @@ -100,8 +100,8 @@ class DSA_Signature_Operation : public PK_Ops::Signature_with_EMSA std::string m_emsa; }; -secure_vector<byte> -DSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len, +secure_vector<uint8_t> +DSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) { BigInt i(msg, msg_len); @@ -154,8 +154,8 @@ class DSA_Verification_Operation : public PK_Ops::Verification_with_EMSA bool with_recovery() const override { return false; } - bool verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len) override; + bool verify(const uint8_t msg[], size_t msg_len, + const uint8_t sig[], size_t sig_len) override; private: const BigInt& m_q; const BigInt& m_y; @@ -164,8 +164,8 @@ class DSA_Verification_Operation : public PK_Ops::Verification_with_EMSA Modular_Reducer m_mod_p, m_mod_q; }; -bool DSA_Verification_Operation::verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len) +bool DSA_Verification_Operation::verify(const uint8_t msg[], size_t msg_len, + const uint8_t sig[], size_t sig_len) { if(sig_len != 2*m_q.bytes() || msg_len > m_q.bytes()) return false; |