Commit Graph

25 Commits

Author SHA1 Message Date
Jason Rhinelander 6aa9db9538
Overhaul and fix crypto::{public_key,ec_point,etc.} types
- Remove implicit `operator bool` from ec_point/public_key/etc. which
  was causing all sorts of implicit conversion mess and bugs.
- Change ec_point/public_key/etc. to use a `std::array<unsigned char,
  32>` (via a base type) rather than a C-array of char that has to be
  reinterpret_cast<>'ed all over the place.
- Add methods to ec_point/public_key/etc. that make it work more like a
  container of bytes (`.data()`, `.size()`, `operator[]`, `begin()`,
  `end()`).
- Make a generic `crypto::null<T>` that is a constexpr all-0 `T`, rather
  than the mishmash `crypto::null_hash`, crypto::null_pkey,
  crypto:#️⃣:null(), and so on.
- Replace three metric tons of `crypto::hash blahblah =
  crypto::null_hash;` with the much simpler `crypto::hash blahblah{};`,
  because there's no need to make a copy of a null hash in all these
  cases.  (Likewise for a few other null_whatevers).
- Remove a whole bunch of `if (blahblah == crypto::null_hash)` and `if
  (blahblah != crypto::null_hash)` with the more concise `if
  (!blahblah)` and `if (blahblah)` (which are fine via the newly
  *explicit* bool conversion operators).
- `crypto::signature` becomes a 64-byte container (as above) but with
  `c()` and `r()` to get the c() and r() data pointers.  (Previously
  `.c` and `.r` were `ec_scalar`s).
- Delete with great prejudice CRYPTO_MAKE_COMPARABLE and
  CRYPTO_MAKE_HASHABLE and all the other utter trash in
  `crypto/generic-ops.h`.
- De-inline functions in very common crypto/*.h files so that they don't
  have to get compiled 300 times.
- Remove the disgusting include-a-C-header-inside-a-C++-namespace
  garbage from some crypto headers trying to be both a C and *different*
  C++ header at once.
- Remove the toxic, disgusting, shameful `operator&` on ec_scalar, etc.
  that replace `&x` with `reinterpret_cast x into an unsigned char*`.
  This was pure toxic waste.
- changed some `<<` outputs to fmt
- Random other small changes encountered while fixing everything that
  cascaded out of the above changes.
2022-10-17 22:20:54 -03:00
Sean Darcy 415098f9e9 Wallet RPC calls for Get Balance, Get Address and Export Keys 2022-08-01 17:21:25 -04:00
Doyle 892469ded1 Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
Martijn Otto bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
moneromooo-monero ea37614efe
wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
moneromooo-monero 8ea3c4d544
simplewallet: new --use-english-language-names flag
On some Windows systems, displaying language names in their own
languages freezes the display.
2018-03-17 22:46:41 +00:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 2d1ccc1b88
mnemonics: support for arbitrary (if multiple of 4 bytes) length data 2017-11-09 10:58:10 +00:00
moneromooo-monero bb708ab8c3
electrum-words: fix seed mistakenly thought to be old style
It'd see "empty" words due to extraneous spaces
2017-06-22 16:47:07 +01:00
Nano Akron 12fff108ea
Change Old_English to English_Old - 'Old English' is actually a language 2017-04-24 20:27:12 +01:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Riccardo Spagni f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Oran Juice b94b8cd798
Added unit test. Fails for Japanese for some reason. 2014-10-08 00:44:26 +05:30
Oran Juice 443d46a6f1
Don't show Old English as an available option 2014-10-03 16:25:44 +05:30
Oran Juice d683c8c724
Use reference types on LHS when using language methods 2014-10-02 21:45:31 +05:30
Oran Juice 4517bac7f3
Restructured language sources to be singletons 2014-10-02 21:43:28 +05:30
Oran Juice 4cbf8d4243
Is forgiving of spelling mistakes beyond the 1st 4 characters. 2014-09-30 23:30:27 +05:30
Oran Juice 2b60646c9b
Minor comment changes and code clean-up 2014-09-28 14:10:23 +05:30
Oran Juice 8f587ba1c8
CRC Checksum for word seed. Gives a new 25 word seed with checksum if one without checksum is passed. Doxygen comment fix. 2014-09-28 02:29:25 +05:30
Oran Juice f31adbc977
Doxygen comments in 2014-09-27 18:20:15 +05:30
Oran Juice 91aa25e055
Informs about old style mnemonics from older wallet and provides a new one. CMakeLists.txt update. 2014-09-27 17:04:23 +05:30
Oran Juice a1ac92e185
Accepts seed language choice from user. 2014-09-25 18:04:30 +05:30
Oran Juice 09170b4d3b
Added code to separate old word list to raw input file and support for multiple new languages 2014-09-23 18:34:39 +05:30
Oran Juice 6be139b511
Moved mnemonics code to src/mnemonics 2014-09-23 17:04:04 +05:30
Renamed from src/crypto/electrum-words.h (Browse further)