|
Botan 2.19.5
Crypto and TLS for C&
|
#include <monty.h>
|
inline |
Create a zero-initialized Montgomery_Int
Definition at line 28 of file monty.h.
Referenced by additive_inverse(), mul(), multiplicative_inverse(), operator*(), operator+(), operator-(), and square().
| Botan::Montgomery_Int::Montgomery_Int | ( | std::shared_ptr< const Montgomery_Params > | params, |
| const BigInt & | v, | ||
| bool | redc_needed = true |
||
| ) |
Create a Montgomery_Int
Definition at line 224 of file monty.cpp.
References BOTAN_ASSERT_NOMSG.
| Botan::Montgomery_Int::Montgomery_Int | ( | std::shared_ptr< const Montgomery_Params > | params, |
| const uint8_t | bits[], | ||
| size_t | len, | ||
| bool | redc_needed = true |
||
| ) |
Create a Montgomery_Int
Definition at line 241 of file monty.cpp.
References BOTAN_ASSERT_NOMSG.
| Botan::Montgomery_Int::Montgomery_Int | ( | std::shared_ptr< const Montgomery_Params > | params, |
| const word | words[], | ||
| size_t | len, | ||
| bool | redc_needed = true |
||
| ) |
Create a Montgomery_Int
Definition at line 255 of file monty.cpp.
References BOTAN_ASSERT_NOMSG.
| Montgomery_Int & Botan::Montgomery_Int::add | ( | const Montgomery_Int & | other, |
| secure_vector< word > & | ws | ||
| ) |
Definition at line 334 of file monty.cpp.
References Botan::BigInt::mod_add().
Referenced by operator+=().
| Montgomery_Int Botan::Montgomery_Int::additive_inverse | ( | ) | const |
Definition at line 415 of file monty.cpp.
References Montgomery_Int().
|
inline |
Definition at line 119 of file monty.h.
|
inline |
| void Botan::Montgomery_Int::fix_size | ( | ) |
Definition at line 269 of file monty.cpp.
References Botan::BigInt::grow_to(), and Botan::BigInt::sig_words().
| bool Botan::Montgomery_Int::is_one | ( | ) | const |
| bool Botan::Montgomery_Int::is_zero | ( | ) | const |
| Montgomery_Int Botan::Montgomery_Int::mul | ( | const Montgomery_Int & | other, |
| secure_vector< word > & | ws | ||
| ) | const |
Definition at line 358 of file monty.cpp.
References Montgomery_Int().
Referenced by Botan::monty_multi_exp().
| Montgomery_Int & Botan::Montgomery_Int::mul_by | ( | const Montgomery_Int & | other, |
| secure_vector< word > & | ws | ||
| ) |
Definition at line 364 of file monty.cpp.
Referenced by Botan::monty_multi_exp(), and operator*=().
| Montgomery_Int & Botan::Montgomery_Int::mul_by | ( | const secure_vector< word > & | other, |
| secure_vector< word > & | ws | ||
| ) |
| Montgomery_Int & Botan::Montgomery_Int::mul_by_2 | ( | secure_vector< word > & | ws | ) |
Definition at line 420 of file monty.cpp.
References Botan::BigInt::mod_mul().
| Montgomery_Int & Botan::Montgomery_Int::mul_by_3 | ( | secure_vector< word > & | ws | ) |
Definition at line 426 of file monty.cpp.
References Botan::BigInt::mod_mul().
| Montgomery_Int & Botan::Montgomery_Int::mul_by_4 | ( | secure_vector< word > & | ws | ) |
Definition at line 432 of file monty.cpp.
References Botan::BigInt::mod_mul().
| Montgomery_Int & Botan::Montgomery_Int::mul_by_8 | ( | secure_vector< word > & | ws | ) |
Definition at line 438 of file monty.cpp.
References Botan::BigInt::mod_mul().
| Montgomery_Int Botan::Montgomery_Int::multiplicative_inverse | ( | ) | const |
Definition at line 408 of file monty.cpp.
References Montgomery_Int().
|
inline |
| Montgomery_Int Botan::Montgomery_Int::operator* | ( | const Montgomery_Int & | other | ) | const |
Definition at line 352 of file monty.cpp.
References Montgomery_Int().
| Montgomery_Int & Botan::Montgomery_Int::operator*= | ( | const Montgomery_Int & | other | ) |
Definition at line 378 of file monty.cpp.
References mul_by().
| Montgomery_Int & Botan::Montgomery_Int::operator*= | ( | const secure_vector< word > & | other | ) |
| Montgomery_Int Botan::Montgomery_Int::operator+ | ( | const Montgomery_Int & | other | ) | const |
Definition at line 312 of file monty.cpp.
References Botan::BigInt::mod_add(), and Montgomery_Int().
| Montgomery_Int & Botan::Montgomery_Int::operator+= | ( | const Montgomery_Int & | other | ) |
Definition at line 328 of file monty.cpp.
References add().
| Montgomery_Int Botan::Montgomery_Int::operator- | ( | const Montgomery_Int & | other | ) | const |
Definition at line 320 of file monty.cpp.
References Botan::BigInt::mod_sub(), and Montgomery_Int().
| Montgomery_Int & Botan::Montgomery_Int::operator-= | ( | const Montgomery_Int & | other | ) |
Definition at line 340 of file monty.cpp.
References sub().
| bool Botan::Montgomery_Int::operator== | ( | const Montgomery_Int & | other | ) | const |
|
inline |
| std::vector< uint8_t > Botan::Montgomery_Int::serialize | ( | ) | const |
Definition at line 284 of file monty.cpp.
References Botan::BigInt::encode_1363(), size(), and value().
| size_t Botan::Montgomery_Int::size | ( | ) | const |
Definition at line 291 of file monty.cpp.
Referenced by serialize().
| Montgomery_Int Botan::Montgomery_Int::square | ( | secure_vector< word > & | ws | ) | const |
Definition at line 403 of file monty.cpp.
References Montgomery_Int().
Referenced by Botan::monty_multi_exp().
| Montgomery_Int & Botan::Montgomery_Int::square_this | ( | secure_vector< word > & | ws | ) |
Definition at line 397 of file monty.cpp.
Referenced by Botan::monty_multi_exp().
| Montgomery_Int & Botan::Montgomery_Int::square_this_n_times | ( | secure_vector< word > & | ws, |
| size_t | n | ||
| ) |
| Montgomery_Int & Botan::Montgomery_Int::sub | ( | const Montgomery_Int & | other, |
| secure_vector< word > & | ws | ||
| ) |
Definition at line 346 of file monty.cpp.
References Botan::BigInt::mod_sub().
Referenced by operator-=().
| BigInt Botan::Montgomery_Int::value | ( | ) | const |
Return the value to normal mod-p space
Definition at line 306 of file monty.cpp.
Referenced by Botan::monty_multi_exp(), and serialize().