352 Commits

Author SHA1 Message Date
Czarek Nakamoto bf759f79b5 minimal cmake example 2024-04-22 21:54:39 +02:00
Czarek Nakamoto 36e61433c7 yet another difference in wow... 2024-04-22 16:14:52 +02:00
Czarek Nakamoto fdd5c6848b sync changes to wownero. Wow. 2024-04-22 15:33:09 +02:00
Czarek Nakamoto 7e49b4ad69 add missing functionality from for cake's polyseed implementation 2024-04-22 12:49:17 +02:00
Czarek Nakamoto 90658235f6 update polyseed commit
change POLYSEED_COIN to wownero in the fork
update wownero patches
2024-04-22 09:33:21 +02:00
Czarek Nakamoto b736b3e465 fix memory allocation issue 2024-04-20 16:52:51 +02:00
Czarek Nakamoto 162dfa6683 fix signature 2024-04-20 15:27:51 +02:00
Czarek Nakamoto 6dfe04ddd7 unsigned long long 2024-04-19 16:44:01 +02:00
sneurlax b98653c32f iOS build: do not fail due to mv: Directory not empty 2024-04-19 16:39:09 +02:00
Czarek Nakamoto 22f6fb4b63 fix regarding the issues raised during security audit
In the polyseed-examples repository, the `utf8_nfc` and `utf8_nfkd` functions will never return a value exceeding `POLYSEED_STR_SIZE - 1`
In your code, the utf8_norm function has variable return behavior that seems odd
In case of a normalization error, the underlying normalizer will return a negative value, at which point your function just returns POLYSEED_STR_SIZE (this is unclear)
In case the buffer isn't large enough, the normalizer will return the required buffer size but have undefined internal behavior, at which point your function returns a value exceeding POLYSEED_STR_SIZE
Otherwise, it uses the normalizer's return value (indicating the written size) to continue with re-encoding

tobtoht: Czarek Nakamoto: polyseed asserts that the return value < POLYSEED_STR_SIZE, so if normalization fails the program crashes..
> I think my idea was to have have polyseed check the return value and return an error code instead of asserting, which would in turn throw the "Unicode normalization failed" error
> I'll upstream that. In the meantime you can replace the injected function with
```cpp
    inline size_t utf8_norm(const char* str, polyseed_str norm, utf8proc_option_t options) {
      utf8proc_int32_t buffer[POLYSEED_STR_SIZE];
      utf8proc_ssize_t result;

      result = utf8proc_decompose(reinterpret_cast<const uint8_t*>(str), 0, buffer, POLYSEED_STR_SIZE, options);
      if (result < 0 || result > (POLYSEED_STR_SIZE - 1)) {
        throw std::runtime_error("Unicode normalization failed");
      }

      result = utf8proc_reencode(buffer, result, options);
      if (result < 0 || result > POLYSEED_STR_SIZE) {
        throw std::runtime_error("Unicode normalization failed");
      }

      strcpy(norm, reinterpret_cast<const char*>(buffer));
      sodium_memzero(buffer, sizeof(buffer));
      return result;
    }
```
2024-04-19 16:37:42 +02:00
Czarek Nakamoto 05569f7b80 Wallet::reconnectDevice implementation 2024-04-19 16:28:59 +02:00
Czarek Nakamoto 53816c3610 legacy code removal + deprecation notice
can't remove the runTHread code just yet as xmruw depends on it, and I don't have enough hours in the day to fix that at the moment.
2024-04-19 16:28:07 +02:00
Czarek Nakamoto 7c0c08627c make vectorToString behave as it should, without appending separators when it isn't required 2024-04-19 16:25:05 +02:00
Czarek Nakamoto a1d03a28a7 add multi dest tx support 2024-04-17 16:16:22 +02:00
Czarek Nakamoto 19df009754 WIP: cake stuff 2024-04-15 22:18:55 +02:00
Czarek Nakamoto 1b58a960da polyseed fix
tobtoht:
Since only the composed languages are broken, it could also be that canonical composition is producing weird output. Try dumping whatever seed string is being fed to polyseed_decode to hex and we should be able to tell.
Or try removing UTF8PROC_LUMP from utf8_nfc
2024-04-15 16:17:54 +02:00
cyan 365e58bb9f Merge pull request #2 from cypherstack/scripts
fix openssl script re: previous commit
2024-04-12 19:23:41 +02:00
sneurlax 4fd90cdef1 fix openssl script re: previous commit
forgot to remove this one line.  Interestingly, Windows built fine with it, whereas iOS threw.
2024-04-12 17:06:12 -05:00
sneurlax ae57e3dc6f do not fail if repo already exists
build_single.sh will fail on Windows (WSL2) due to `git clone` if we already did a `git submodule update --init --recursive`
2024-04-12 16:43:52 -05:00
cyan 52db5c78f8 Merge pull request #1 from cypherstack/scripts
Windows fix: do not fail on `git clone` if repo already exists
2024-04-12 19:03:24 +02:00
Czarek Nakamoto f5a6dbdd8e credit tobtoht 2024-04-12 11:50:32 +02:00
Czarek Nakamoto 125e64f11f update patches
update readme
2024-04-12 11:13:43 +02:00
Czarek Nakamoto b003970d7f Revert "add polyseed language options"
This reverts commit a032a20221.
2024-04-11 17:15:42 +02:00
Czarek Nakamoto a032a20221 add polyseed language options 2024-04-11 08:53:29 +02:00
Czarek Nakamoto 95728838ee add comments explaining what does the code do? 2024-04-05 16:51:15 +02:00
Czarek Nakamoto 4adbc8667c update readme 2024-04-04 23:09:29 +02:00
Czarek Nakamoto d493a4d29b ~~fix~~ workaround wownero randomwow remote 2024-04-04 22:35:31 +02:00
Czarek Nakamoto 939a955cd7 if cases are difficult 2024-04-04 17:45:42 +02:00
Czarek Nakamoto 8c54a73672 fix patch number 2024-04-04 17:08:58 +02:00
Czarek Nakamoto 3789aba98d fix android (i hope) 2024-04-04 15:39:37 +02:00
Czarek Nakamoto 9c3871763a fix ios build script (how did it even work before!?!?!?) 2024-04-03 21:31:04 +02:00
Czarek Nakamoto f47a865bac randomx bump 2024-04-02 22:35:39 +02:00
Czarek Nakamoto 3eb727598b actually fix and not workaround the iOS issue. 2024-04-02 19:14:43 +02:00
Czarek Nakamoto 85756e631e update randomx commit 2024-04-02 17:43:13 +02:00
Czarek Nakamoto e2ad141007 feat: iOS builds
includes patches to
- randomx: https://github.com/tevador/RandomX/pull/294
- randomwow: https://git.wownero.com/wownero/RandomWOW/pulls/2
2024-04-02 17:09:22 +02:00
Czarek Nakamoto e4cde6dfb8 add wownero patch so it won't crash 2024-04-02 11:57:38 +02:00
Czarek Nakamoto 6f3f187592 monero: fix make debug-tests 2024-04-02 10:29:48 +02:00
Czarek Nakamoto d0b6e0d1f1 build debug by default 2024-04-02 00:14:52 +02:00
Czarek Nakamoto f6ca8ee9fb un-conflict exported symbols on macos 2024-04-01 14:00:33 +02:00
Czarek Nakamoto 365c444b05 feat: macos host builds 2024-04-01 08:51:37 +02:00
Czarek Nakamoto 809019417d update readme 2024-04-01 07:03:03 +02:00
Czarek Nakamoto f2057a2363 fix: wownero and monero wallets in the same process
ci: cache ~/.ccache directory
2024-04-01 06:54:50 +02:00
Czarek Nakamoto b72d2dff62 feat: split MONERO and WOWNERO prefixed functions
So basically: when we open the .so file, we define some
symbols, and it appears that if we load something else,
with the same symbols, under the same thread we cause
some funky behaviour - like calling function a wownero
function MONERO_Wallet_address() resulting in a monero
address being generated.
Needless to say, this is undesired, and a blocker for
https://github.com/cypherstack/stack_wallet/pull/818

I'm afraid that this may not solve all of our issues (but
will solve some significant roadblocks), because of the
"genesis block" issue, as output of
nm -gDC release/wownero/x86_64-linux-gnu_libwallet2_api_c.so | grep genesis
indicate that these functions may share *something* in
common across both WOW and XMR libraries.
In a case in which this fix won't be sufficient, I think that
the way forward would be to close the dynamic libraries,
but before we do that I want to check if maybe there is
a change to run multiple wallets at once.
2024-03-31 09:19:47 +02:00
Czarek Nakamoto b034340879 macos support 2024-03-28 10:43:54 +01:00
Czarek Nakamoto 0f206f4bc1 fixed coin control patch for wownero 2024-03-27 16:34:28 +01:00
Czarek Nakamoto 04d0262686 fix wownero coin control
use proper headers
properly apply patches
2024-03-27 15:46:01 +01:00
Czarek Nakamoto b2ce0ed438 wooof 2024-03-27 07:11:50 +01:00
Czarek Nakamoto 6abd77290c feat: wownero support 2024-03-26 10:00:45 +01:00
Czarek Nakamoto 53dbfbccea windows support + LICENSE 2024-03-23 08:43:12 +01:00
Czarek Nakamoto 40b85a693d remove external header-paresr 2024-03-22 14:22:53 +01:00