aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce/polyn_gf2m.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Avoid using double underscore in variable namesJack Lloyd2017-09-201-2/+1
| | | | | | | | Reserved identifiers, per C++ standard GH #512 [ci skip]
* Avoid `throw new Exception`Jack Lloyd2017-08-291-1/+1
| | | | Caught by Sonar, once I managed to wade through the noise.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-35/+35
| | | | | | 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.
* Avoid having source files start with /**Jack Lloyd2016-11-251-1/+1
| | | | | | | This caused Doxygen to dump the copyright notices for those files into the Botan namespace description, which is not helpful. [ci skip]
* fix dead assignment in mce/polyn_gf2m.cpp in polyn_gf2m() found by ↵Daniel Neus2016-03-021-3/+1
| | | | clang-analyzer
* Fix remaining Wshadow warnings and enable on gcc and clangRené Korthaus2016-02-181-6/+6
|
* Fix Coverity findings in McEliece codeJack Lloyd2016-02-091-9/+12
| | | | | | | | Initialize variables in constructor in gf2m_decomp_rootfind_state Add asserts on the degree where a positive value was assumed. How polyn_gf2m handles the degree needs some work but this should do for now.
* Fix McEliece key gen endian dependency.Jack Lloyd2015-10-271-7/+19
| | | | | | | | | | | The tests which generate McEliece keys using a deterministic RNG and fixed seed failed on PowerPC (or other big endian systems) because the vectors assumed we were creating elements little endian, which is what happend with rng.randomize(&u16, 2) on x86 Fix it to always be little endian. No particular reason to prefer one vs the other here (we're just trying for compatability with ourselves) and choosing little endian avoids having to regen the vectors.
* Merge pull request #286 from randombit/mce-cleanupJack Lloyd2015-09-301-21/+17
|\ | | | | Cleanup and document McEliece implementation
| * McEliece cleanupsJack Lloyd2015-09-291-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove and consolidate various headers Reduce memory usage of GF2m_Field by sharing the log and exponent tables across all instances of a particular word size. Remove McEliece_Public_Operation and McEliece_Private_Operation which were difficult to use safely. Instead only the KEM operations are exposed. Add McEliece_PublicKey::random_plaintext_element Add command line `mce` tool and some McEliece documentation Convert the speed program to check McEliece keys of the suggested size Add McEliece KATs for both key generation and KEM Fix HMAC_DRBG constructor which derefed a pointer before its time
* | Remove warning: assuming signed overflow does not occurSimon Warta2015-09-251-1/+1
|/ | | | | | warning: assuming signed overflow does not occur when reducing constant in comparison [-Wstrict-overflow] cond1 = r0.get_degree() <= break_deg - 1;
* Fix typosSimon Warta2015-07-241-1/+1
| | | | Thanks to @vlajos https://github.com/vlajos/misspell_fixer
* Silence some extra ';' warningsSimon Warta2015-07-221-1/+1
|
* Remove static castslloyd2015-02-061-7/+5
|
* Centralize where string.h/cstring is included to mem_ops.hlloyd2015-01-231-6/+3
| | | | See github 42 for background
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add an implementation of McEliece encryption based on HyMESfstrenzke2014-11-261-0/+804
(https://www.rocq.inria.fr/secret/CBCrypto/index.php?pg=hymes). The original version is LGPL but cryptsource GmbH has secured permission to release it under a BSD license. Also includes the Overbeck CCA2 message encoding scheme.